1
0
Fork 0
mirror of https://github.com/Findus23/MatomoLiteTracker.git synced 2024-09-19 16:03:45 +02:00
MatomoLiteTracker/example/main.ts

17 lines
657 B
TypeScript

import {MatomoLiteTracker} from "../src/tracker";
import {BrowserFeatures, detectBrowserPlugins} from "../src/browserfeatures";
import {defaultDownloadFileExtensions, enableLinkTracking} from "../src/linktracking";
import {PerformanceMetric} from "../src/performancetracking";
const matomo = new MatomoLiteTracker("https://dev.matomo", 1)
matomo.performanceMetric = new PerformanceMetric()
const features = new BrowserFeatures()
features.addBrowserPlugins(detectBrowserPlugins())
matomo.browserFeatures = features
matomo.customDimensions = {
2: "something"
}
enableLinkTracking(matomo, defaultDownloadFileExtensions)
matomo.trackPageviewOnPageload()