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:
parent
397872ef4b
commit
a079ab886f
3 changed files with 1 additions and 9 deletions
|
@ -43,7 +43,6 @@ export function enableLinkTracking(
|
|||
}
|
||||
|
||||
function processClick(element: HTMLAnchorElement) {
|
||||
console.log(element)
|
||||
if (!element.hasAttribute("href")) {
|
||||
return
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue