Skip to content

Commit

Permalink
Add custom google-analytics.html
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Kofink <[email protected]>
  • Loading branch information
akofink committed Jun 16, 2024
1 parent 9f5d947 commit 7497807
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions _includes/google-analytics.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
<script>
window['ga-disable-{{ site.google_analytics }}'] = window.doNotTrack === "1" || navigator.doNotTrack === "1" || navigator.doNotTrack === "yes" || navigator.msDoNotTrack === "1";
window.dataLayer = window.dataLayer || [];
function gtag(){window.dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', '{{ site.google_analytics }}');
</script>

0 comments on commit 7497807

Please sign in to comment.