Skip to content

Latest commit

 

History

History
34 lines (19 loc) · 686 Bytes

load.md

File metadata and controls

34 lines (19 loc) · 686 Bytes

@mbinjamil/matomo-client / load

Function: 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

Parameters

trackerUrl: string

Your Matomo URL

siteId: number

Site ID of the website you are tracking in Matomo

Returns

void

Example

import { load } from "@mbinjamil/matomo-client";

load("https://your-matomo-url.com", 1);

Source

index.ts:21