mirror of
https://github.com/NeonGamerBot-QK/saahild.com.git
synced 2024-11-21 20:33:40 +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
|
@ -12,6 +12,7 @@
|
|||
"@types/node": "^16.18.98",
|
||||
"@types/react": "^18.3.3",
|
||||
"@types/react-dom": "^18.3.0",
|
||||
"ackee-tracker": "^5.1.0",
|
||||
"animate.css": "^4.1.1",
|
||||
"react": "^18.2.0",
|
||||
"react-animate-on-scroll": "^2.1.9",
|
||||
|
@ -49,6 +50,7 @@
|
|||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/ackee-tracker": "^5.0.4",
|
||||
"@types/react-animate-on-scroll": "^2.1.8",
|
||||
"daisyui": "^4.12.2",
|
||||
"tailwindcss": "^3.4.4"
|
||||
|
|
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) {
|
||||
|
||||
}
|
||||
}
|
17
yarn.lock
17
yarn.lock
|
@ -1901,6 +1901,11 @@
|
|||
resolved "https://registry.npmjs.org/@trysound/sax/-/sax-0.2.0.tgz"
|
||||
integrity sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==
|
||||
|
||||
"@types/ackee-tracker@^5.0.4":
|
||||
version "5.0.4"
|
||||
resolved "https://registry.yarnpkg.com/@types/ackee-tracker/-/ackee-tracker-5.0.4.tgz#14c881b746552d9b1dc0345e41d58bba48f19d13"
|
||||
integrity sha512-WzQyQmV+hQEV2XptOepaQNPuV9XwAk4J39Ep7VjO5Bl6BNLugEFXj7r0jg6Qk0OQtNDgxJ2FpFxPAfi45sduog==
|
||||
|
||||
"@types/aria-query@^5.0.1":
|
||||
version "5.0.4"
|
||||
resolved "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz"
|
||||
|
@ -2476,6 +2481,13 @@ accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.8:
|
|||
mime-types "~2.1.34"
|
||||
negotiator "0.6.3"
|
||||
|
||||
ackee-tracker@^5.1.0:
|
||||
version "5.1.0"
|
||||
resolved "https://registry.yarnpkg.com/ackee-tracker/-/ackee-tracker-5.1.0.tgz#6c41ea5357973347c7c67a26009053bcc0345def"
|
||||
integrity sha512-A7iKkGyUnEXuOzxultQB7hnm4bStYCo1c38MYRRihBfqUP8AImhtZOODb00t9xrXs/BTsg06bz1MKpXeMs9sYw==
|
||||
dependencies:
|
||||
platform "^1.3.6"
|
||||
|
||||
acorn-globals@^6.0.0:
|
||||
version "6.0.0"
|
||||
resolved "https://registry.npmjs.org/acorn-globals/-/acorn-globals-6.0.0.tgz"
|
||||
|
@ -7117,6 +7129,11 @@ pkg-up@^3.1.0:
|
|||
dependencies:
|
||||
find-up "^3.0.0"
|
||||
|
||||
platform@^1.3.6:
|
||||
version "1.3.6"
|
||||
resolved "https://registry.yarnpkg.com/platform/-/platform-1.3.6.tgz#48b4ce983164b209c2d45a107adb31f473a6e7a7"
|
||||
integrity sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg==
|
||||
|
||||
possible-typed-array-names@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz"
|
||||
|
|
Loading…
Reference in a new issue