mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-15 01:21:48 +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,
|
|
};
|
|
};
|