Add Matomo Tracking Script (#685)

This commit is contained in:
Brandon Hopkins
2026-04-08 07:06:10 -07:00
committed by GitHub
parent 1d942ae531
commit 6755dbdb00
2 changed files with 16 additions and 0 deletions

14
src/components/Matomo.jsx Normal file
View File

@@ -0,0 +1,14 @@
import Script from "next/script";
export function MatomoTagManager() {
return (
<Script id="matomo-tag-manager" strategy="afterInteractive">
{`var _mtm = window._mtm = window._mtm || [];
_mtm.push({'mtm.startTime': (new Date().getTime()), 'event': 'mtm.Start'});
(function() {
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src='https://cdn.matomo.cloud/netbird.matomo.cloud/container_hvVzPZGH.js'; s.parentNode.insertBefore(g,s);
})();`}
</Script>
);
}