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");