mirror of
https://github.com/StanGirard/quivr.git
synced 2024-12-12 11:26:07 +03:00
27 lines
697 B
TypeScript
27 lines
697 B
TypeScript
import { useEventTracking } from "@/services/analytics/june/useEventTracking";
|
|
|
|
import { useOnboarding } from "./useOnboarding";
|
|
|
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
export const useOnboardingTracker = () => {
|
|
const { onboarding } = useOnboarding();
|
|
|
|
const { track } = useEventTracking();
|
|
|
|
const trackOnboardingEvent = (
|
|
event: string,
|
|
properties: Record<string, unknown> = {}
|
|
): void => {
|
|
void track(event, {
|
|
HOW_TO_USER_QUIVR: onboarding.onboarding_b1,
|
|
WHAT_IS_QUIVR: onboarding.onboarding_b2,
|
|
WHAT_IS_BRAIN: onboarding.onboarding_b3,
|
|
...properties,
|
|
});
|
|
};
|
|
|
|
return {
|
|
trackOnboardingEvent,
|
|
};
|
|
};
|