Skip to content

Commit cc9cc83

Browse files
committed
update ga tags
1 parent 14a2cdf commit cc9cc83

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

_includes/google-analytics.html

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
1-
<!--
2-
The GA snippet
3-
-->
4-
<!-- Global site tag (gtag.js) - Google Analytics -->
5-
<script defer src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics.id }}"></script>
1+
<!-- Google tag (gtag.js) -->
2+
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics.id }}"></script>
63
<script>
7-
document.addEventListener("DOMContentLoaded", function(event) {
8-
window.dataLayer = window.dataLayer || [];
9-
function gtag(){dataLayer.push(arguments);}
4+
window.dataLayer = window.dataLayer || [];
5+
function gtag(){dataLayer.push(arguments);}
6+
gtag('js', new Date());
107

11-
gtag('js', new Date());
12-
gtag('config', '{{ site.google_analytics.id }}');
13-
});
8+
gtag('config', '{{ site.google_analytics.id }}');
149
</script>

0 commit comments

Comments
 (0)