Adding an event to an A/B Test experience in Contentstack allows you to evaluate variant performance for impressions and conversions.
Events serve as metrics within A/B tests, and you can add up to 5 events (1 primary and 4 secondary) to each test.
The primary metric determines the winning variant, while secondary metrics provide additional insights into user behavior.
Note: For this guide, we have assumed that you have already created a Personalize project and an event.
To add the created event to an A/B Test experience, log in to your Contentstack account and perform the following steps:
Note: If you have an A/B Test experience already created then click the existing A/B Test experience to open it or click the corresponding vertical ellipses under the Actions section, select Edit, and jump directly to step 6.
In the Select Experience Type modal, click the A/B Test experience type.
You can add multiple events to an A/B Test experience as Metrics. Use the Personalize Edge SDK to trigger the events for your experiences using the triggerImpressions and triggerEvent methods.
Note: When adding an event for the first time, it is automatically set as ‘primary’. The 'primary' metric determines A/B test winners from the variants, while secondary metrics offer additional insights. When any of the listed events occur, metrics calculate an increase in unique conversions per visitor which you can view in the Experience Analytics.
This adds the new event as a reference in your A/B Test experience.
Additional Resource: You can use the Personalize Management API to create, edit, delete, and get all existing events.