Files
housesof/src/utils/analytics.ts
2022-06-23 19:07:31 +02:00

21 lines
405 B
TypeScript

// @ts-nocheck
// Send page
export const sendPage = (path: string) => {
if (Countly) {
Countly.track_pageview()
}
}
// Send event
export const sendEvent = ({ action, segments = {}, amount = 1 }) => {
if (Countly) {
Countly.add_event({
key: action,
count: amount,
segmentation: {
...segments
}
})
}
}