From 3a326056fd41ee6b0ba88ab2fab8f347ea2eb229 Mon Sep 17 00:00:00 2001 From: "David B. Kinder" Date: Tue, 7 Apr 2020 15:54:34 -0700 Subject: [PATCH] doc: some additional google analytics code Signed-off-by: David B. Kinder --- doc/conf.py | 1 + doc/static/acrn-custom.js | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/doc/conf.py b/doc/conf.py index aba265a42..d494cd8a4 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -218,6 +218,7 @@ html_static_path = ['static'] def setup(app): app.add_stylesheet("acrn-custom.css") app.add_javascript("https://www.googletagmanager.com/gtag/js?id=UA-831873-64") + # note more GA tag manager calls are in acrn-custom.js app.add_javascript("acrn-custom.js") # Custom sidebar templates, must be a dictionary that maps document names diff --git a/doc/static/acrn-custom.js b/doc/static/acrn-custom.js index 6b90fe56c..e0e235899 100644 --- a/doc/static/acrn-custom.js +++ b/doc/static/acrn-custom.js @@ -3,3 +3,9 @@ $(document).ready(function(){ $( ".icon-home" ).attr("href", "https://projectacrn.org/"); }); + +/* Global site tag (gtag.js) - Google Analytics */ + window.dataLayer = window.dataLayer || []; + function gtag(){dataLayer.push(arguments);} + gtag('js', new Date()); + gtag('config', 'UA-831873-64');