From be64c03d06516e584de8d5faf972ec6b0f53542a Mon Sep 17 00:00:00 2001 From: Zach Pomerantz Date: Thu, 22 Sep 2022 14:02:57 -0500 Subject: [PATCH] fix: track origin (#4700) fix: add origin --- src/analytics/Trace.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/analytics/Trace.tsx b/src/analytics/Trace.tsx index 4aa4c3836f..011058e14f 100644 --- a/src/analytics/Trace.tsx +++ b/src/analytics/Trace.tsx @@ -44,7 +44,8 @@ export const Trace = memo( useEffect(() => { if (shouldLogImpression) { - sendAnalyticsEvent(name ?? EventName.PAGE_VIEWED, { ...combinedProps, ...properties }) + const origin = window.location.origin + sendAnalyticsEvent(name ?? EventName.PAGE_VIEWED, { ...combinedProps, ...properties, origin }) } // Impressions should only be logged on mount. // eslint-disable-next-line react-hooks/exhaustive-deps