Analytics Waypoint
Last updated
Last updated
The AnalyticsWaypoint
component provides a way to track user impressions of any feature or block in Phoenix. It tracks if & when the component enters the , and triggers an analytics event to track the impression.
Simply render the AnalyticsWaypoint
component from the start and and end of the component you'd like to track with the following props
:
name
: Used as the label
and added as context.name
for the event
context
(optional): Used as the context
for the event
So if we wanted to track users impression of the ContentBlock
component's start & end:
It triggers an analytics event with the following properties:
The component makes use of the NPM package which utilizes the to detect when the element intersects with the viewport.