feat: add matomo tracking
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
9328c598f5
commit
0215373c0b
@ -3,6 +3,17 @@ interface SimplifiedHeader {
|
||||
content: [any];
|
||||
}
|
||||
|
||||
const matomoTrackingCode = `var _paq = window._paq = window._paq || [];
|
||||
_paq.push(['trackPageView']);
|
||||
_paq.push(['enableLinkTracking']);
|
||||
(function() {
|
||||
var u="https://matomo.phundrak.com/";
|
||||
_paq.push(['setTrackerUrl', u+'matomo.php']);
|
||||
_paq.push(['setSiteId', '4']);
|
||||
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
||||
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
|
||||
})();`;
|
||||
|
||||
const simplifiedHead = [
|
||||
{
|
||||
tag: 'meta',
|
||||
@ -128,6 +139,7 @@ simplifiedHead.map((tag: SimplifiedHeader) => {
|
||||
{ rel: 'me', href: 'https://emacs.ch/@phundrak' },
|
||||
'Mastodon',
|
||||
]);
|
||||
head.push(['script', {}, matomoTrackingCode]);
|
||||
});
|
||||
|
||||
export default head;
|
||||
|
Loading…
Reference in New Issue
Block a user