mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00: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);
|
||
|
}
|
||
|
};
|