@mbinjamil/matomo-client / load
load(
trackerUrl
,siteId
):void
Injects the Matomo tracking script into the DOM and loads it asynchronously. It is idempotent, i.e. safe to call multiple times, because it will only load the script once
• trackerUrl: string
Your Matomo URL
• siteId: number
Site ID of the website you are tracking in Matomo
void
import { load } from "@mbinjamil/matomo-client";
load("https://your-matomo-url.com", 1);