Skip to main content

React Analytics Configuration

After you have enabled the analytics plugin on the tracker, per the Enabling Analytics on Optimize Tracker guide, you can push personalization events from the <Personalize /> component that will describe the personalizations that are taking place.

To enable this functionality on a component, we need to set the trackingEventName property on the component, for example:

<Personalize variations={variations} trackingEventName="heroPersonalized" />

When personalization is executed, an analytics event is sent with heroPersonalized as the label and metadata that occurred.