Skip to content

Commit

Permalink
Add current version of Google Analytics code, Global Site Tag (gtag.j…
Browse files Browse the repository at this point in the history
  • Loading branch information
chenopis authored and k8s-ci-robot committed Jul 13, 2018
1 parent ad6e65d commit 13bc6ff
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
7 changes: 0 additions & 7 deletions layouts/partials/footer-scripts.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
<button class="flyout-button" onclick="kub.toggleToc()"></button>

<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-36037335-10', 'auto');
ga('send', 'pageview');

// hide docs nav area if no nav is present, or if nav only contains a link to the current page
(function () {
window.addEventListener('DOMContentLoaded', init)
Expand Down
9 changes: 9 additions & 0 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-36037335-10"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'UA-36037335-10');
</script>
<meta charset="utf-8">
<title>{{ if .Title }}{{ .Title }} - {{ end }}{{ .Site.Title }}</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
Expand Down

0 comments on commit 13bc6ff

Please sign in to comment.