Skip to content

Commit 088a6bd

Browse files
committed
google analytics
1 parent 52c2bcc commit 088a6bd

File tree

1 file changed

+7
-17
lines changed

1 file changed

+7
-17
lines changed

_includes/google-analytics.html

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

17-
gtag("config", "{{ site.google_analytics }}");
18-
</script>
2+
<!-- Google Tag Manager -->
3+
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
4+
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
5+
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
6+
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
7+
})(window,document,'script','dataLayer','GTM-PKWJ5RV');</script>
8+
<!-- End Google Tag Manager -->

0 commit comments

Comments
 (0)