The Google Optimize integration is available on Observe or
plans.
The Google Optimize integration enables you to filter session data in Hotjar by the Optimize Experiment ID.
- How to enable the Google Optimize integration
- How to filter session data by the Google Optimize Experiment ID
- FAQ and troubleshooting tips
How to enable the Google Optimize integration
Admin or Account Owner permissions are required
Only an Admin in your Hotjar Organization, or the Account Owner of your Hotjar account can enable the integration. Find out who the Admins and Account Owner are from your Team page.
Visit your Integrations page and select the site that will receive the integration, then click Connect for Google Optimize.
Turn on Automatically mark recordings with the active experiment. This enables the integration.
How to filter session data by the Google Optimize Experiment ID
The Google Optimize integration must be enabled and at least one experiment session captured in Hotjar
This integration first needs to be enabled inside Hotjar to start using Google Optimize Experiment IDs with Hotjar filters. You will only see an Experiment ID in your Hotjar filter dropdown after Hotjar has captured at least one session that contains the experiment page(s).
The Google Optimize Experiment ID can be used to filter Hotjar session data. Hotjar tools that use session data include Heatmaps, Recordings, and the Dashboard and Trends pages. It doesn't include Feedback widgets or Surveys.
Inside a Hotjar tool that uses session data, click Add filter and select Google Optimize.
For Heatmaps, ensure you've first generated a heatmap for your experiment page
Your heatmap will need to be generated with the URL of the page where your Google Optimize experiment is running.
Enter your Google Optimize Experiment ID.
You can use the Experiment ID field to search and select an Experiment ID from the list. If you're unsure which Experiment ID you should use, click the experiment details page link that appears above the Experiment ID field. This will take you to your Google Optimize dashboard, where you can find the Experiment ID that you'd like to use.
Why can't I see any experiments listed?
Hotjar will only receive Google Optimize Experiment IDs after at least one session from the experiment has been captured. If this is taking longer than expected, ensure that Session Capture is enabled and that any targeting settings will capture pages that are included in your experiments. If you're still seeing issues, check our FAQ section below for further troubleshooting help.
Select one or more Variants if applicable.
Depending on the experiment you're running, you'll see one or more checkboxes appear listing each Variant from your experiment. Select the one(s) you'd like to filter your session data by. If your experiment doesn't include variants then you can skip this step.
Only the Google Optimize Experiment ID can be linked to Hotjar
At this time, Hotjar is only able to access the Experiment ID from Google Optimize. No other data can be retrieved from your Google Optimize account.
Click Apply.
You'll now see only those sessions from users associated with the selected Google Optimize experiment, based on the variant(s) you selected.
FAQ and troubleshooting tips
Why doesn't my Optimize filter detect any active experiments?
Hotjar is only able to detect Google Optimize experiments after at least one session from the experiment has been recorded. Ensure that Session Capture is enabled and targeting pages that will be included in your experiments. As soon as an experiment is triggered in a captured session, you should be able to filter by that experiment.
I've collected Recordings that show the pages in my experiment, but the filter still doesn't recognize them.
There are a couple of possible causes for this:
- Check your Optimize experiment to see if it's a Redirect test experiment. Hotjar is unable to detect redirect experiments because the page changes before Hotjar can recognize the Optimize experiment on the initial page.
- Check to see how your experiments are being communicated to Optimize. In the past, Optimize could be added using analytics.js but this is a legacy method that is not compatible with the Hotjar Optimize integration. Sending the data using gtag.js will resolve this issue.
Why am I seeing optimize.callback events in Google Tag Manager or in my DataLayer?
When the Google Optimize integration is enabled inside Hotjar, it triggers an optimize.callback event to determine whether or not there are any Optimize experiments running on a given page, even if you're not using Google Optimize.
The optimize.callback event only looks for active Optimize experiments, but serves no other purpose and can be ignored.
If needed, you can disable the Google Optimize integration from your list of integrations by turning off the toggle mentioned in the How to enable the Google Optimize integration steps.