You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Page view (`page-views`) and visit (`visit`) events are not controlled by this component. They are tracked from the Optimizely `DECISION` notification listener in [`withOptimizelyProvider`](../../legacy/containers/PageHandlers/withOptimizelyProvider/index.tsx). See [Page views per visit ratio metric](#page-views-per-visit-ratio-metric) below.
@@ -87,10 +87,8 @@ The page views per visit ratio metric is built from two Optimizely events:
87
87
- numerator: `page-views`
88
88
- denominator: `visit`
89
89
90
-
Visit counting is session based. A new visit is counted when there has been at least 30 minutes of inactivity since the last tracked page view. Each tracked page view updates the last activity timestamp so that continued browsing keeps the same visit.
91
-
92
-
When `trackPageView` and `trackVisit` are both enabled, the visit event is sent before the page view event on the same page load. This ensures the ratio metric counts the page view within Optimizely's 48 hour attribution window for the denominator.
90
+
Both events are tracked from the `DECISION` notification listener in [`withOptimizelyProvider`](../../legacy/containers/PageHandlers/withOptimizelyProvider/index.tsx), not from this component. Tracking them from the listener ensures the visit (denominator) is always sent before the page view (numerator) on the same page load, so the page view falls inside Optimizely's 48 hour attribution window for the denominator. Tracking from the listener also guarantees the events fire for every activated experiment, independent of this component's render lifecycle.
93
91
94
-
For page views per visit, enable both `trackPageView`and `trackVisit`. Visit events are emitted from the page view tracker to preserve ordering and avoid duplicate visits.
92
+
Events are de-duplicated per navigation: while the current URL (pathname + query string) is unchanged, multiple `DECISION` notifications will only emit `page-views` (and `visit`) once; navigating to a different URL and later returning may emit `page-views` again, and `visit` will only emit when the 30-minute inactivity window has elapsed.
95
93
96
94
For interpretation, add the numerator and denominator events as separate metrics alongside the ratio metric in Optimizely.
0 commit comments