projects
/
working
/
eg-antora.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d7653ac
)
try another variant of the gtag code
author
Dan Allen
<dan@opendevise.com>
Fri, 23 Mar 2018 03:29:10 +0000
(21:29 -0600)
committer
Dan Allen
<dan@opendevise.com>
Fri, 23 Mar 2018 03:29:10 +0000
(21:29 -0600)
src/partials/head-scripts.hbs
patch
|
blob
|
history
diff --git
a/src/partials/head-scripts.hbs
b/src/partials/head-scripts.hbs
index
85fde65
..
2e8f175
100644
(file)
--- a/
src/partials/head-scripts.hbs
+++ b/
src/partials/head-scripts.hbs
@@
-1,6
+1,14
@@
{{#if site.keys.googleAnalytics}}
{{#with site.keys.googleAnalytics}}
<script async src="https://www.googletagmanager.com/gtag/js?id={{this}}"></script>
+ <!--
<script>(window.dataLayer=window.dataLayer||[]).push(['js',new Date],['config','{{this}}'])</script>
+ -->
+ <script>
+window.dataLayer=window.dataLayer||[]
+function gtag(){dataLayer.push(arguments)}
+gtag('js',new Date())
+gtag('config','{{this}}')
+ </script>
{{/with}}
{{/if}}