-
-
Save hristiank/bd6c3e6cde151f335f30cfda7d82e9ba to your computer and use it in GitHub Desktop.
Hotjar JS Trigger for Unbounce Variations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
if (window.ub && window.ub.page) { | |
hj('trigger', window.ub.page.variantId); | |
} | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
if (window.ub && window.ub.page) { | |
hj('trigger', window.ub.page.variantId + '_' + window.ub.page.id); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you or your clients are on the Plus or Business tiers in Hotjar, you can use a JavaScript trigger for heatmaps.
Add the above piece of code after your main Hotjar script.
Publish/republish your landing page
When creating a heatmap in Hotjar select the JS trigger option. The value for the trigger would be the letter of your variation.
3.1 Yes, you need to create a separate heatmap for each variation ;)
Enjoy!