Huy Nguyen
Huy Nguyen

Reputation: 591

Heap Analysis - only first value of custom event properties is tracked

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 enter image description here heap array in console.log has other caseCode but none of those is sent to heap analysis or not appear enter image description here

Upvotes: 0

Views: 677

Answers (0)

Related Questions