When A/B testing, you may wish to run Recordings to see the behavior of your users on different variations of your site.
Only paid plans will be able to benefit from the Hotjar Events API. Learn more about the differences between each of our Hotjar Plans.
To add events in a session recordings, add the following code to page variation(s) that you'd like to track, replacing 'viewed_homepage_A' with the name of each of your test variations.
If you're comparing two variants, be sure each page has a separate event. An example of this would having the event 'viewed_homepage_A' on variant A and 'viewed_homepage_B' on variant B.
A step by step guide to setting up these events can be found in our Events API Reference article.
After you've added the events on the desired pages on your site, Hotjar will be able to detect the events during your users sessions. Once at least one recording has been collected with the associated event, you should be able to see your events appear in the Events filter on your Recordings list page.
For more information about these filters, check out What are Recording Filters?