From 37d09f0299fe14329b4fae5002c3a1950e4f563e Mon Sep 17 00:00:00 2001 From: Jonathan Date: Tue, 29 Aug 2023 10:45:10 +0200 Subject: [PATCH] use new GA --- website/siteConfig.js | 4 ++-- website/static/js/analytics.js | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 website/static/js/analytics.js diff --git a/website/siteConfig.js b/website/siteConfig.js index f47c290c..2438787a 100644 --- a/website/siteConfig.js +++ b/website/siteConfig.js @@ -100,6 +100,8 @@ const siteConfig = { "/js/code-block-buttons.js", "//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.0.3/highlight.min.js", "/js/start_highlight.js", + "https://www.googletagmanager.com/gtag/js?id=G-0V7XX3QG4C", + "/js/analytics.js", ], stylesheets: ["/css/code-block-buttons.css", "/css/sphinx_basic.css"], @@ -108,8 +110,6 @@ const siteConfig = { // No .html extensions for paths. cleanUrl: true, - gaTrackingId: "G-0V7XX3QG4C", - // Open Graph and Twitter card images. ogImage: "img/T.png", twitterImage: "img/T.png", diff --git a/website/static/js/analytics.js b/website/static/js/analytics.js new file mode 100644 index 00000000..6aca13c2 --- /dev/null +++ b/website/static/js/analytics.js @@ -0,0 +1,6 @@ +window.dataLayer = window.dataLayer || []; +function gtag() { + dataLayer.push(arguments); +} +gtag("js", new Date()); +gtag("config", "G-0V7XX3QG4C");