Skip to content

Commit

Permalink
Merge pull request #209 from jhudsl/KCox-google-analytics
Browse files Browse the repository at this point in the history
Fix wonky html for Google Analytics
  • Loading branch information
KatherineCox authored May 25, 2023
2 parents f395134 + 5f94baf commit fcb2c69
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 20 deletions.
20 changes: 0 additions & 20 deletions GA_Script.Rhtml

This file was deleted.

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={MeasurementID}"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', '{MeasurementID}');
</script>
1 change: 1 addition & 0 deletions _output.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ bookdown::gitbook:
# When using multiple css files, the default file path will be the first one #
css: [assets/style.css, assets/AnVIL_style/anvil.css]
includes:
in_header: GA_Script.html
before_body: assets/AnVIL_style/big-image_anvil.html
after_body: assets/AnVIL_style/footer.html
highlight: tango
Expand Down

0 comments on commit fcb2c69

Please sign in to comment.