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

remove console.log

This commit is contained in:
Lukas Winkler 2022-04-26 15:16:23 +02:00
parent 397872ef4b
commit a079ab886f
Signed by: lukas
GPG key ID: 54DE4D798D244853
3 changed files with 1 additions and 9 deletions

View file

@ -43,7 +43,6 @@ export function enableLinkTracking(
}
function processClick(element: HTMLAnchorElement) {
console.log(element)
if (!element.hasAttribute("href")) {
return
}

View file

@ -30,10 +30,8 @@ export class PerformanceMetric {
if (!performanceData) {
return;
}
console.log(performanceData)
if (performanceData.connectEnd && performanceData.fetchStart) {
this.pf_net = diff(performanceData.connectEnd, performanceData.fetchStart)
console.info(performanceData.connectEnd - performanceData.fetchStart)
}
if (performanceData.responseStart && performanceData.requestStart) {
this.pf_srv = diff(performanceData.responseStart, performanceData.requestStart)

View file

@ -175,7 +175,6 @@ export class MatomoLiteTracker {
parameters.action_name = customTitle ? customTitle : documentAlias.title
const performanceMetric = this.performanceMetric
if (performanceMetric) {
console.log(performanceMetric)
Object.entries(performanceMetric).forEach(([key, value]) => {
if (typeof value !== "undefined") {
parameters[key] = value
@ -233,13 +232,11 @@ export class MatomoLiteTracker {
}
sendRequest(parameters: Request, forceBeacon: boolean = false) {
console.log(parameters)
const requestMethod = this.requestMethod
const params = new URLSearchParams(parameters)
let url = this.matomoURL
+ (this.matomoURL.endsWith("/") ? "" : "/")
+ this.phpFileName
console.log(url)
if (this.useSendBeacon || forceBeacon) {
navigatorAlias.sendBeacon(url, params)
} else {
@ -255,9 +252,7 @@ export class MatomoLiteTracker {
if (requestMethod === "POST") {
options.body = params
}
fetch(url, options).then(value => {
console.info(value)
})
fetch(url, options).then()
}
}
}