21 lines
405 B
TypeScript
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
|
|
}
|
|
})
|
|
}
|
|
} |