fix google tag manager script
authorDan Allen <dan@opendevise.com>
Fri, 23 Mar 2018 01:03:25 +0000 (19:03 -0600)
committerDan Allen <dan@opendevise.com>
Fri, 23 Mar 2018 01:03:25 +0000 (19:03 -0600)
src/partials/head-scripts.hbs

index 9e7c6ce..85fde65 100644 (file)
@@ -1,6 +1,6 @@
 {{#if site.keys.googleAnalytics}}
 {{#with site.keys.googleAnalytics}}
     <script async src="https://www.googletagmanager.com/gtag/js?id={{this}}"></script>
-    <script>function gtag(){$gtag.push(arguments)}$gtag=window.dataLayer||[],gtag("js",new Date),gtag("config","{{this}}");</script>
+    <script>(window.dataLayer=window.dataLayer||[]).push(['js',new Date],['config','{{this}}'])</script>
 {{/with}}
 {{/if}}