Skip to content

Commit

Permalink
Moved Google Analytics to header so it can appear on all pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Robinson committed Nov 4, 2016
1 parent 29af612 commit 65a87c9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions _includes/analytics.html
@@ -0,0 +1,10 @@
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-68765210-2', 'auto');
ga('send', 'pageview');

</script>
2 changes: 2 additions & 0 deletions _output.yml
Expand Up @@ -9,6 +9,8 @@ bookdown::gitbook:
<li><a href="https://github.com/rstudio/bookdown" target="blank">Published with bookdown</a></li>
edit:
link: https://github.com/dgrtwo/tidy-text-mining/edit/master/%s
includes:
in_header: _includes/analytics.html
bookdown::pdf_book:
includes:
in_header: preamble.tex
Expand Down

0 comments on commit 65a87c9

Please sign in to comment.