projects
/
eg-antora.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cab27f3
)
fix google analytics code for real
author
Dan Allen
<dan@opendevise.com>
Fri, 5 Jul 2019 21:35:15 +0000
(15:35 -0600)
committer
Dan Allen
<dan@opendevise.com>
Fri, 5 Jul 2019 21:35:15 +0000
(15:35 -0600)
src/partials/head-scripts.hbs
patch
|
blob
|
history
diff --git
a/src/partials/head-scripts.hbs
b/src/partials/head-scripts.hbs
index
ddbaa95
..
41ad69e
100644
(file)
--- a/
src/partials/head-scripts.hbs
+++ b/
src/partials/head-scripts.hbs
@@
-1,4
+1,4
@@
{{#if site.keys.googleAnalytics}}
<script async src="https://www.googletagmanager.com/gtag/js?id={{site.keys.googleAnalytics}}"></script>
- <script>
(window.dataLayer=window.dataLayer||[]).push(['js',new Date()],['config','{{site.keys.googleAnalytics}}']
)</script>
+ <script>
function gtag(){dataLayer.push(arguments)};window.dataLayer=window.dataLayer||[];gtag('js',new Date());gtag('config','{{site.keys.googleAnalytics}}'
)</script>
{{/if}}