Skip to content

Commit ece61cb

Browse files
committed
Update Google Analytics Code
1 parent 8a72e59 commit ece61cb

File tree

2 files changed

+10
-16
lines changed

2 files changed

+10
-16
lines changed

_includes/layout.pug

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ body
135135

136136
//- Footer Blocks and Javascript
137137
138-
//- Matomo Analytics
138+
//- Analytics
139139
if meta.build.env === 'production'
140140
<!-- Global site tag (gtag.js) - Google Analytics -->
141141
script(async src="https://www.googletagmanager.com/gtag/js?id=UA-1173222-28")

_includes/redirect.pug

+9-15
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ doctype
22
html(style="height: 100%;")
33
head
44
meta(charset="UTF-8")
5-
meta(name="viewport", content="width=device-width, initial-scale=1.0, maximum-scale=1.0")
5+
meta(name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0")
66
meta(http-equiv="refresh", content=`0; URL='${redirect.destination}'`)
77
title Redirecting to: #{redirect.destination}
88
style.
@@ -19,18 +19,12 @@ html(style="height: 100%;")
1919
br
2020
| please use #[a(href=redirect.destination) the link directly].
2121
p ☺️ Enjoy ☺️
22-
//- Matomo Analytics
22+
//- Analytics
2323
if meta.build.env === 'production'
24-
script(type="text/javascript").
25-
var _paq = window._paq || [];
26-
_paq.push(["setDoNotTrack", true]);
27-
_paq.push(["disableCookies"]);
28-
_paq.push(['trackPageView']);
29-
_paq.push(['enableLinkTracking']);
30-
(function() {
31-
var u="https://matomo.spiegl.co/";
32-
_paq.push(['setTrackerUrl', u+'matomo.php']);
33-
_paq.push(['setSiteId', '1']);
34-
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
35-
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
36-
})();
24+
<!-- Global site tag (gtag.js) - Google Analytics -->
25+
script(async src="https://www.googletagmanager.com/gtag/js?id=UA-1173222-28")
26+
script().
27+
window.dataLayer = window.dataLayer || [];
28+
function gtag(){dataLayer.push(arguments);}
29+
gtag('js', new Date());
30+
gtag('config', 'UA-1173222-28');

0 commit comments

Comments
 (0)