doc: add google analytics tracking to docs

This adds code to each page needed for gathering google analytics
tracking data to the LF-provided Global site tag.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
This commit is contained in:
David B. Kinder 2019-06-06 14:13:56 -07:00 committed by Anas Nashif
parent eeb2e67f2b
commit aa9b602e00
2 changed files with 13 additions and 0 deletions

View file

@ -555,4 +555,7 @@ linkcheck_anchors = False
def setup(app):
app.add_stylesheet("zephyr-custom.css")
app.add_javascript("https://www.googletagmanager.com/gtag/js?id=UA-831873-47")
app.add_javascript("ga-tracker.js")
app.add_javascript("zephyr-custom.js")

10
doc/static/ga-tracker.js vendored Normal file
View file

@ -0,0 +1,10 @@
// <!-- Global site tag (gtag.js) - Google Analytics -->
// Copyright (c) 2019, Intel Corporation
// SPDX-License-Identifier: Apache-2.0
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-831873-47');