mirror of
https://github.com/NeonGamerBot-QK/saahild.com.git
synced 2025-05-10 23:53:05 +00:00
a little bit of analytics
This commit is contained in:
parent
f6167cb3e6
commit
54b62c3ebf
3 changed files with 49 additions and 0 deletions
30
src/Ackee.ts
Normal file
30
src/Ackee.ts
Normal file
|
@ -0,0 +1,30 @@
|
|||
import * as ackeeTracker from 'ackee-tracker'
|
||||
const doNotTrack = navigator.doNotTrack == "1" || localStorage.doNotTrack || sessionStorage.doNotTrack || false;
|
||||
const isDev = process.env.NODE_ENV !== "production"
|
||||
export enum Actions {
|
||||
LCP="05296971-2faa-431b-ae01-e7d68e5d6ec4"
|
||||
}
|
||||
export default class Ackee {
|
||||
client: ackeeTracker.AckeeInstance
|
||||
domainId: string
|
||||
constructor({
|
||||
server_url, id
|
||||
}: {
|
||||
server_url: string,
|
||||
id: string
|
||||
} = {
|
||||
server_url: "https://ackee.saahild.com",
|
||||
id: ""
|
||||
}) {
|
||||
this.client = ackeeTracker.create(server_url, {
|
||||
detailed: doNotTrack ? false : true,
|
||||
ignoreLocalhost: !isDev,
|
||||
ignoreOwnVisits: false,
|
||||
})
|
||||
this.domainId = id
|
||||
|
||||
}
|
||||
handleWebVitals(d) {
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue