mirror of
https://github.com/Findus23/MatomoLiteTracker.git
synced 2024-09-19 16:03:45 +02:00
18 lines
684 B
TypeScript
18 lines
684 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()
|
||
|
console.log(matomo.performanceMetric)
|
||
|
const features = new BrowserFeatures()
|
||
|
features.addBrowserPlugins(detectBrowserPlugins())
|
||
|
matomo.browserFeatures = features
|
||
|
matomo.customDimensions = {
|
||
|
2: "something"
|
||
|
}
|
||
|
|
||
|
enableLinkTracking(matomo, defaultDownloadFileExtensions)
|
||
|
matomo.trackPageview()
|