diff options
Diffstat (limited to 'layouts/partials/google-analytics-async.html')
-rw-r--r-- | layouts/partials/google-analytics-async.html | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/layouts/partials/google-analytics-async.html b/layouts/partials/google-analytics-async.html new file mode 100644 index 0000000..8a58c07 --- /dev/null +++ b/layouts/partials/google-analytics-async.html @@ -0,0 +1,10 @@ +{{ if not $.Site.IsServer }} + {{ with $.Site.GoogleAnalytics }} + <script> + window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date; + ga('create', '{{ . }}', 'auto'); + ga('send', 'pageview'); + </script> + <script async src='https://www.google-analytics.com/analytics.js'></script> + {{ end }} +{{ end }}
\ No newline at end of file |