From fd00872b952baec93d3a97d24461284c604cea99 Mon Sep 17 00:00:00 2001 From: kovacsv Date: Sun, 5 May 2024 07:52:52 +0200 Subject: [PATCH] Separate analytics data for website and embed. --- tools/create_package.py | 12 ++++++++---- website/embed.html | 4 ++-- website/index.html | 4 ++-- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/tools/create_package.py b/tools/create_package.py index 9a96f33d..03d36b1c 100644 --- a/tools/create_package.py +++ b/tools/create_package.py @@ -67,10 +67,14 @@ def CreateWebsite (rootDir, websiteDir, version, testBuild): if os.path.exists (metaFile): metaContent = Utils.GetFileContent (metaFile) replacer.ReplaceTokenContent ('', '', metaContent) - analyticsFile = os.path.join (rootDir, 'plugins', 'website_analytics_data.txt') - if os.path.exists (analyticsFile) and not testBuild: - analyticsContent = Utils.GetFileContent (analyticsFile) - replacer.ReplaceTokenContent ('', '', analyticsContent) + websiteAnalyticsFile = os.path.join (rootDir, 'plugins', 'website_analytics_data.txt') + if os.path.exists (websiteAnalyticsFile) and not testBuild: + websiteAnalyticsContent = Utils.GetFileContent (websiteAnalyticsFile) + replacer.ReplaceTokenContent ('', '', websiteAnalyticsContent) + embedAnalyticsFile = os.path.join (rootDir, 'plugins', 'embed_analytics_data.txt') + if os.path.exists (websiteAnalyticsFile) and not testBuild: + embedAnalyticsContent = Utils.GetFileContent (embedAnalyticsFile) + replacer.ReplaceTokenContent ('', '', embedAnalyticsContent) replacer.WriteToFile (htmlFilePath) def CreateEnginePackage (rootDir, engineDir, websiteDir): diff --git a/website/embed.html b/website/embed.html index b9097f8d..fdb41c0b 100644 --- a/website/embed.html +++ b/website/embed.html @@ -16,7 +16,7 @@ - + - + - +