mirror of
https://github.com/kremalicious/portfolio.git
synced 2024-12-22 09:13:19 +01:00
matomo fixes
This commit is contained in:
parent
d4e3f66f23
commit
9a32ff4c63
32
src/@types/matomo.d.ts
vendored
Normal file
32
src/@types/matomo.d.ts
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
interface Dimensions {
|
||||
dimension1?: string
|
||||
dimension2?: string
|
||||
dimension3?: string
|
||||
dimension4?: string
|
||||
dimension5?: string
|
||||
dimension6?: string
|
||||
dimension7?: string
|
||||
dimension8?: string
|
||||
dimension9?: string
|
||||
dimension10?: string
|
||||
}
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
_paq?:
|
||||
| (
|
||||
| Dimensions
|
||||
| number[]
|
||||
| string[]
|
||||
| number
|
||||
| string
|
||||
| null
|
||||
| undefined
|
||||
)[][]
|
||||
| null
|
||||
}
|
||||
}
|
||||
|
||||
window._paq = window._paq || {}
|
||||
|
||||
export {}
|
@ -14,6 +14,7 @@ export default function Site({ children }: { children: React.ReactNode }) {
|
||||
|
||||
// init Matomo tracking
|
||||
useEffect(() => {
|
||||
if (window._paq) return
|
||||
init({ url: meta.matomoUrl, siteId: meta.matomoSite })
|
||||
}, [])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user