session activity identify stitching

This commit is contained in:
Francis Cao committed 2026-07-15 11:20:27 -07:00
1 parent 8a75208d5b
commit 7afc4ccf6b
15 files changed
+374 -23

No files matched your search

@@ -5,15 +5,17 @@ export function useSessionActivityQuery(
sessionId: string,
startDate: Date,
endDate: Date,
distinctId?: string,
) {
const { get, useQuery } = useApi();
return useQuery({
queryKey: ['session:activity', { websiteId, sessionId, startDate, endDate }],
queryKey: ['session:activity', { websiteId, sessionId, startDate, endDate, distinctId }],
queryFn: () => {
return get(`/websites/${websiteId}/sessions/${sessionId}/activity`, {
startAt: +new Date(startDate),
endAt: +new Date(endDate),
...(distinctId && { distinctId }),
});
},
enabled: Boolean(websiteId && sessionId && startDate && endDate),