diff --git a/src/@types/matomo.d.ts b/src/@types/matomo.d.ts deleted file mode 100644 index 781fee7..0000000 --- a/src/@types/matomo.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -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 {} diff --git a/src/@types/umami.d.ts b/src/@types/umami.d.ts new file mode 100644 index 0000000..5f2a358 --- /dev/null +++ b/src/@types/umami.d.ts @@ -0,0 +1,17 @@ +declare global { + interface Window { + umami?: (eventName: string) => void | { + trackEvent: ( + event_name: string, + event_data?: { [key: string]: string }, + url?: string, + website_id?: string + ) => void + trackView: (url: string, referrer?: string, website_id?: string) => void + } + } +} + +window.umami = window.umami || {} + +export {}