Skip to content

Commit 6f46770

Browse files
authored
Upgrade to Google Analytics 4
1 parent 16791f9 commit 6f46770

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

resources/templates/page.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11

22
{% extends "templates/page.html" %}
33
{% block script %}
4+
<!-- Google tag (gtag.js) -->
5+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-TQQ0SJ6HC8"></script>
46
<script>
5-
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
6-
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
7-
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
8-
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
9-
ga('create', 'UA-82943814-1', 'auto');
10-
ga('require', 'displayfeatures');
11-
ga('send', 'pageview');
7+
window.dataLayer = window.dataLayer || [];
8+
function gtag(){dataLayer.push(arguments);}
9+
gtag('js', new Date());
10+
11+
gtag('config', 'G-TQQ0SJ6HC8');
1212
</script>
1313
{% endblock %}
1414

0 commit comments

Comments
 (0)