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];
|
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 = [
|
const simplifiedHead = [
|
||||||
{
|
{
|
||||||
tag: 'meta',
|
tag: 'meta',
|
||||||
@ -128,6 +139,7 @@ simplifiedHead.map((tag: SimplifiedHeader) => {
|
|||||||
{ rel: 'me', href: 'https://emacs.ch/@phundrak' },
|
{ rel: 'me', href: 'https://emacs.ch/@phundrak' },
|
||||||
'Mastodon',
|
'Mastodon',
|
||||||
]);
|
]);
|
||||||
|
head.push(['script', {}, matomoTrackingCode]);
|
||||||
});
|
});
|
||||||
|
|
||||||
export default head;
|
export default head;
|
||||||
|
Loading…
Reference in New Issue
Block a user