Skip to content
This repository was archived by the owner on Jan 19, 2025. It is now read-only.

Commit d86ac0d

Browse files
committed
Migration from ga to gtag 🚀
1 parent 4eae347 commit d86ac0d

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

_includes/analytics.html

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
1+
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-97399890-1"></script>
12
<script>
23
if (window.location.host.search('fabrizioduroni.it') !== -1) {
3-
(function (i, s, o, g, r, a, m) {
4-
i['GoogleAnalyticsObject'] = r;
5-
i[r] = i[r] || function () {
6-
(i[r].q = i[r].q || []).push(arguments)
7-
}, i[r].l = 1 * new Date();
8-
a = s.createElement(o),
9-
m = s.getElementsByTagName(o)[0];
10-
a.async = 1;
11-
a.src = g;
12-
m.parentNode.insertBefore(a, m)
13-
})(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');
4+
window.dataLayer = window.dataLayer || [];
5+
function gtag(){dataLayer.push(arguments);}
6+
gtag('js', new Date());
147

15-
ga('create', 'UA-97399890-1', 'auto');
16-
ga('send', 'pageview');
8+
gtag('config', 'UA-97399890-1');
179
}
1810
</script>

0 commit comments

Comments
 (0)