Reputation: 591
export function useHeapAddEventCaseCode(caseData?: CaseEntity) {
return useEffect(() => {
if (caseData?.code) {
// As a best practice, we recommend calling clearEventProperties before addEventProperties on every page
window.heap.clearEventProperties()
window.heap.addEventProperties({ caseCode: caseData.code })
}
}, [caseData])
}
I'm using this effect on React SPA app in some page. Somehow it's only track first value, never see any other value even though I tried other case codes
heap array in console.log has other caseCode but none of those is sent to heap analysis or not appear
Upvotes: 0
Views: 677