8000 Add current version of Google Analytics code, Global Site Tag (gtag.js). · ArduinoBot/website@0fa8ff5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0fa8ff5

Browse files
committed
Add current version of Google Analytics code, Global Site Tag (gtag.js).
1 parent eda181d commit 0fa8ff5

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

layouts/partials/footer-scripts.html

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
<button class="flyout-button" onclick="kub.toggleToc()"></button>
22

33
<script>
4-
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
5-
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
6-
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
7-
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
8-
ga('create', 'UA-36037335-10', 'auto');
9-
ga('send', 'pageview');
10-
114
// hide docs nav area if no nav is present, or if nav only contains a link to the current page
125
(function () {
136
window.addEventListener('DOMContentLoaded', init)

layouts/partials/head.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
<!-- Global site tag (gtag.js) - Google Analytics -->
2+
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-36037335-10"></script>
3+
<script>
4+
window.dataLayer = window.dataLayer || [];
5+
function gtag(){dataLayer.push(arguments);}
6+
gtag('js', new Date());
7+
8+
gtag('config', 'UA-36037335-10');
9+
</script>
110
<meta charset="utf-8">
211
<title>{{ if .Title }}{{ .Title }} - {{ end }}{{ .Site.Title }}</title>
312
<meta name="viewport" content="width=device-width, initial-scale=1">

0 commit comments

Comments
 (0)
0