diff options
-rw-r--r-- | gentoobrowse/js/googletracking.js | 17 | ||||
-rw-r--r-- | gentoobrowse/xslt/base.xslt | 1 |
2 files changed, 8 insertions, 10 deletions
diff --git a/gentoobrowse/js/googletracking.js b/gentoobrowse/js/googletracking.js index 62c38cd..27e4f92 100644 --- a/gentoobrowse/js/googletracking.js +++ b/gentoobrowse/js/googletracking.js @@ -1,10 +1,7 @@ -var _gaq = _gaq || []; -_gaq.push(['_setAccount', 'UA-19177673-1']); -_gaq.push(['_trackPageview']); - -(function() { - var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; - ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; - var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); -})(); - +window.dataLayer = window.dataLayer || []; +function gtag() +{ + dataLayer.push(arguments); +} +gtag('js', new Date()); +gtag('config', 'G-0JDJB4S82Q'); diff --git a/gentoobrowse/xslt/base.xslt b/gentoobrowse/xslt/base.xslt index 4df49f6..73e906f 100644 --- a/gentoobrowse/xslt/base.xslt +++ b/gentoobrowse/xslt/base.xslt @@ -170,6 +170,7 @@ <script src="https://code.jquery.com/jquery-latest.min.js"></script> <script src="{$tbscdn}/js/bootstrap.min.js"></script> <script src="/js/js.js"></script> + <script async="async" src="https://www.googletagmanager.com/gtag/js?id=G-0JDJB4S82Q"/> <script src="/js/googletracking.js" /> </body> </html> |