Skip to content

Commit 0b84c0f

Browse files
Merge pull request #540 from UBC-DSCI/analytics
Add analytics
2 parents 9cff7d0 + b01e87c commit 0b84c0f

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

_output.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ bookdown::gitbook:
77
edit: null
88
download: null
99
pandoc_args: ["--verbose", "--bibliography=source/references.bib", "--citeproc"]
10+
includes:
11+
in_header: source/analytics.html
12+
1013
bookdown::epub_book: default
1114
bookdown::pdf_book:
1215
includes:

source/analytics.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<!-- Google tag (gtag.js) -->
2+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-JJ9MD0LBF5"></script>
3+
<script>
4+
window.dataLayer = window.dataLayer || [];
5+
function gtag(){dataLayer.push(arguments);}
6+
gtag('js', new Date());
7+
8+
gtag('config', 'G-JJ9MD0LBF5');
9+
</script>

0 commit comments

Comments
 (0)