Hotjar and A/B testing

  • 12 June 2017
  • 5 replies
  • 30 views

Hi,

Is it possible to track different variations with Hotjar? How can I do it?

Thanks!


5 replies

Userlevel 7
Badge +3

Hi @Maciej,

If you are talking about capturing heatmaps for your different variations, it is possible.

You’ll need to be on a paid Hotjar plan and use a JavaScript trigger.

You also need to adjust the standard Hotjar implementation to actually send the page ID and variation letter to Hotjar in order to be able to use them as a trigger.

Best,
Hristian

I was also looking for this.

I may have misunderstood something but in a video from Hotjar I saw that you could use something called a regular expressions (which are available on the free / test account). Or does this type of integration not work with unbounce? https://docs.hotjar.com/docs/using-regular-expressions

Thanks,

Brendan

Userlevel 7
Badge +3

Hi @Brendan,

Regular expressions allow you to capture pages that have a certain pattern to their URL.
Example: If all of your product pages (eCommerce) or landing pages contain …/awesome/, you can write a regular expression that would capture traffic from all of the pages that contain that particular string in the URL. Even if you have 1,000 pages that have it.

However, you can’t use a regular expression for capturing a variation since your visitors will always be opening up the main landing page …/awesome/landing-page rather than the exact variation …/awesome/landing-page/a.html

Best,
Hristian

Hey, I’m looking for this solution too. Can you give a more detailed/step by step approach to tracking different Unbounce variations in Hotjar?

Userlevel 5
Badge +2

Hi @Abhi_Lamba!

This documentation has a step-by-step guide to tracking different Unbounce variants in Hotjar: https://help.hotjar.com/hc/en-us/articles/115015712548-Using-JavaScript-Triggers-to-Start-Recordings

You will first need to have your Hotjar script on your landing page in the global script manager. Once that is working, and you just need to add the small java snippet on the variant you wish to track in the scripts. It will look something like this:

<script>
hj('trigger', 'variant-b');
</script>

So next time you go to set up a heat map you will select ‘JavaScript Trgger’ as you trigger and enter in the identification you chose for your variant (in this case, ‘variant-b’)

Hope this helps!

Reply