Skip to content

Commit

Permalink
Add google analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
hadley committed May 31, 2019
1 parent 54ca45d commit 56c2e10
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions _output.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
bookdown::gitbook:
css: style.css
includes:
in_header: [ga_script.html]
config:
toc:
collapse: section
Expand Down
10 changes: 10 additions & 0 deletions ga_script.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-141197094-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'UA-141197094-1');
</script>

0 comments on commit 56c2e10

Please sign in to comment.