mirror of
https://github.com/makeplane/plane.git
synced 2026-07-11 21:10:13 +02:00
12 lines
241 B
TypeScript
12 lines
241 B
TypeScript
|
|
import posthog from "posthog-js";
|
||
|
|
|
||
|
|
export const trackEvent = (eventName: string, payload: object | [] | null = null) => {
|
||
|
|
try {
|
||
|
|
posthog?.capture(eventName, {
|
||
|
|
...payload,
|
||
|
|
});
|
||
|
|
} catch (error) {
|
||
|
|
console.log(error);
|
||
|
|
}
|
||
|
|
};
|