Skip to content

Commit 7f9c36b

Browse files
committed
move to Google Analytics
1 parent 7d97575 commit 7f9c36b

File tree

1 file changed

+9
-15
lines changed

1 file changed

+9
-15
lines changed

_includes/layout.pug

+9-15
Original file line numberDiff line numberDiff line change
@@ -137,19 +137,15 @@ body
137137
138138
//- Matomo Analytics
139139
if meta.build.env === 'production'
140-
//- script(type="text/javascript").
141-
//- var _paq = window._paq || [];
142-
//- _paq.push(["setDoNotTrack", true]);
143-
//- _paq.push(["disableCookies"]);
144-
//- _paq.push(['trackPageView']);
145-
//- _paq.push(['enableLinkTracking']);
146-
//- (function() {
147-
//- var u="https://matomo.spiegl.co/";
148-
//- _paq.push(['setTrackerUrl', u+'matomo.php']);
149-
//- _paq.push(['setSiteId', '1']);
150-
//- var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
151-
//- g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
152-
//- })();
140+
<!-- Global site tag (gtag.js) - Google Analytics -->
141+
script(async src="https://www.googletagmanager.com/gtag/js?id=UA-1173222-28")
142+
script().
143+
window.dataLayer = window.dataLayer || [];
144+
function gtag(){dataLayer.push(arguments);}
145+
gtag('js', new Date());
146+
gtag('config', 'UA-1173222-28');
147+
//- Google Adsense
148+
script(async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-3261283140705533" crossorigin="anonymous")
153149

154150
//- Littlefoot - Footnotes
155151
script(src="https://cdn.jsdelivr.net/npm/littlefoot@3.3/dist/littlefoot.min.js")
@@ -173,5 +169,3 @@ body
173169
})
174170
Array.prototype.forEach.call(document.querySelectorAll('.footnotes.footnote-print-only, .footnotes .footnote-print-only'), e => e.classList.remove('footnote-print-only'))
175171
Array.prototype.forEach.call(document.querySelectorAll('.footnote-backref'), (el) => { el.href = el.href.replace('#', '#lf-') })
176-
//- Google Adsense
177-
script(async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-3261283140705533" crossorigin="anonymous")

0 commit comments

Comments
 (0)