# Hotjar

URL: https://docs.ablyft.com/developers/integrations/hotjar/

> Send the experiments and variations a visitor saw to Hotjar as a user attribute, to filter recordings and heatmaps.



ABlyft has a built-in Hotjar integration. Once it is active, ABlyft sets a user attribute in Hotjar with the experiment
and variation a visitor saw. You can then filter Hotjar recordings and heatmaps by variation.

## What you need

* The Hotjar tracking code is installed on the pages where your experiments run.

## Activate the integration

1. Open **Project → Integrations**.
2. Find the **Hotjar** card and switch the toggle from **Not active** to **Activated**.
3. Confirm. ABlyft republishes the project.

There are no settings for this integration.

## What you get

| Name           | Value                                                                   |
| -------------- | ----------------------------------------------------------------------- |
| User attribute | `ab_test`                                                               |
| Value          | `<experiment ID>-<variation ID>`, for example `42-107` (IDs, not names) |

The attribute is sent on **Experiment viewed**: every time the experiment runs for the visitor, which means on every page
view where the experiment runs.

Need a different format, for example with names? [Build a custom integration](https://docs.ablyft.com/developers/integrations/custom-integrations/).

## Where you see the data in Hotjar

The value of the user attribute `ab_test` is `<experiment ID>-<variation ID>`. Use it to filter in Hotjar. For a
comparison of two variations, filter once per variation, for example `ab_test` equals `42-107` and `ab_test` equals
`42-108`.

## Check the setup

1. Open your site with a running experiment.
2. In Hotjar, record a session on that page and check that the user attribute `ab_test` appears for the session.

> **Notes:** The integration does not run when tracking is disabled for the visitor (opt-out or Do Not Track). Hotjar may need its
> own consent category in your consent tool.

[Hotjar Identify API reference](https://help.hotjar.com/hc/en-us/articles/36820006120721-Identify-API-Reference)

