Skip to content

Commit d9cc202

Browse files
committed
update google analytics
1 parent 56a4ac0 commit d9cc202

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

_includes/google-analytics.html

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
2+
<script>
3+
window['ga-disable-{{ site.google_analytics }}'] = window.doNotTrack === "1" || navigator.doNotTrack === "1" || navigator.doNotTrack === "yes" || navigator.msDoNotTrack === "1";
4+
window.dataLayer = window.dataLayer || [];
5+
function gtag(){window.dataLayer.push(arguments);}
6+
gtag('js', new Date());
7+
8+
gtag('config', '{{ site.google_analytics }}');
9+
</script>
10+

0 commit comments

Comments
 (0)