The availability of features may depend on your plan type. Contact your Customer Success Manager if you have any questions.

Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideLegal TermsGitHubDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

Integrate Hotjar

Describes how to tag Hotjar recordings with Optimizely experiment and campaign data, create specific Hotjar Heatmaps for your experiment and campaign, and integrate Hotjar with Optimizely Web Experimentation and Optimizely Personalization for Hotjar Heatmaps & Recordings

📘

Note

See Optimizely's Third-Party Add-Ons & Platform Integration Terms.

This integration lets you tag Hotjar Heatmaps and Recordings with Optimizely experiment and campaign information.

  • Hotjar Heatmaps – See if changes in a variation lead to visitors scrolling further down or clicking on redesigned elements. You can look at each variation and better understand your visitors' scrolls, clicks, and moves. 
  • Hotjar Recordings – See if your visitor's behavior has changed because of a variation. You can filter recordings by variation.

📘

Note

The Hotjar integration is owned by Hotjar. The integration currently only supports Hotjar Recordings and Feedback. Development on the integration to enable Heatmaps is ongoing/on the roadmap. If you have any questions regarding the Hotjar integration, contact Hotjar's Support Team.

Prerequisites

Set up

  1. Get your experiment's variation IDs by going to the experiment in Optimizely, clicking on the experiment you want to integrate, and clicking API Names. The variation IDs are in the Variations section. 

  2. Go to the experiment for the Hotjar integration and click the Integrations tab. You should see the following:

    If you do not see this, the integration is not enabled in your account. See the prerequisites to enable it.  

  3. Ensure the Heatmaps field is set to ON and enter an Event prefix. This can be any string, and you should use a short name of your experiment name. This does not appear in Hotjar and is only used by Optimizely to trigger the right heatmap matching your experiment. Avoid the use of special characters. Example of the acceptable prefix: homepageRedesign.

  4. Go to Hotjar and create one heatmap per variation.

  5. Go to Session Targeting and select Start capturing sessions on specific pages or when a custom event fires.

  6. Select Event for Enter Page URL.

  7. Enter the prefix you picked with an underscore \_ and the variation ID for the Event value. Example: homepageRedesign\_8575810288.

  8. Go to Custom Screenshot URL and enter the URL of a page where the experiment is running and append to this URL Optimizely's force variation parameters. The final URL should look something like this: www.example.com/my-page/?optimizely\_x=\[variationId\]

  9. Generate the heatmap and start the Optimizely experiment. 

📘

Note

If you are running a personalization campaign with a holdback that is not set to 0%, create a Hotjar Heatmap for the holdback. When creating this heatmap, input the Event in Hotjar as follows: your prefix with an underscore ( _ ) and holdback. For example if the prefix is homepageRedesign, then the Event is homepageRedesign_holdback. Leave Custom Screenshot URL in Hotjar empty.

Set up integration with Hotjar Recordings

Pre-requisite – The Hotjar Heatmaps and Recordings integration must be added to your account and enabled. You can get the extension on GitHub.

This integration adds a tag to Hotjar Recordings labeled with the Optimizely experiment, audience, and variation information.

To enable this integration, go to the experiment for the recording tag, and set the Recordings field to ON. Check the Tracked box and click Save. 

This experiment now tags all visitors with Optimizely experiment and campaign information. This tag displays in your Hotjar recordings.