Skip to content

Commit c8948f8

Browse files
committed
Use Hugo's Google Analytics template
1 parent 3f02ffc commit c8948f8

File tree

4 files changed

+8
-14
lines changed

4 files changed

+8
-14
lines changed

layouts/_default/baseof.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99

1010
{{ .Content }}
1111

12-
{{ partial "footer.html" }}
12+
{{ partial "footer.html" . }}
1313
</div>
1414

15-
{{ partial "default-js.html" }}
15+
{{ partial "default-js.html" . }}
1616
</body>
1717
</html>

layouts/_default/list.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
</p>
1616
{{ end }}
1717

18-
{{ partial "footer.html" }}
18+
{{ partial "footer.html" . }}
1919
</div>
2020

21-
{{ partial "default-js.html" }}
21+
{{ partial "default-js.html" . }}
2222
</body>
2323
</html>

layouts/_default/single.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99

1010
{{ .Content }}
1111

12-
{{ partial "footer.html" }}
12+
{{ partial "footer.html" . }}
1313
</div>
1414

15-
{{ partial "default-js.html" }}
15+
{{ partial "default-js.html" . }}
1616
</body>
1717
</html>

layouts/partials/default-js.html

+2-8
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,6 @@
77
greetings[Math.floor(Math.random() * greetings.length)];
88

99
anchors.add();
10-
11-
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
12-
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
13-
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
14-
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
15-
16-
ga('create', 'UA-90320718-1', 'auto');
17-
ga('send', 'pageview');
1810
</script>
11+
12+
{{ template "_internal/google_analytics_async.html" . }}

0 commit comments

Comments
 (0)