mirror of
https://github.com/gcushen/hugo-academic.git
synced 2025-07-26 19:15:16 +02:00
Refactor footer JS
This commit is contained in:
parent
d6d9f0ea76
commit
e721c992a2
1 changed files with 4 additions and 6 deletions
|
@ -9,13 +9,11 @@
|
||||||
|
|
||||||
{{ with .Site.GoogleAnalytics }}
|
{{ with .Site.GoogleAnalytics }}
|
||||||
<script>
|
<script>
|
||||||
(function(i,s,o,g,r,a,m){
|
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||||
i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},
|
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||||
i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;
|
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||||
m.parentNode.insertBefore(a,m)
|
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||||
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
|
|
||||||
ga('create', '{{ . }}', 'auto');
|
ga('create', '{{ . }}', 'auto');
|
||||||
ga('set', 'anonymizeIp', true);
|
|
||||||
ga('send', 'pageview');
|
ga('send', 'pageview');
|
||||||
|
|
||||||
/* Send outbound link click events */
|
/* Send outbound link click events */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue