Skip to content

Commit

Permalink
google analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
nevvkid committed May 14, 2024
1 parent f653671 commit 3adfbdc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ sass:
style: compressed
source_dir: _sass

google_analytics: UA-63710315-1
google_analytics: G-FRSRLSQFN5

defaults:
-
Expand Down
3 changes: 2 additions & 1 deletion _includes/google-analytics.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<!-- Google tag (gtag.js) -->
<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(){dataLayer.push(arguments);}
gtag('js', new Date());

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

0 comments on commit 3adfbdc

Please sign in to comment.