# Setting up Microsoft Clarity Integration with AB Tasty

## Setting up Microsoft Clarity Integration with AB Tasty

When integrated with AB Tasty, Microsoft Clarity receives exposure data from your campaigns (e.g. Campaign ID, Variation ID, Visitor ID). This enables you to analyze user behavior within the context of A/B tests or personalization experiences, helping you understand **how variations influence engagement**.

### Use cases <a href="#h_01jskjby0fw920wj81p76d470j" id="h_01jskjby0fw920wj81p76d470j"></a>

* Watch session replays of visitors who saw a specific variation
* Identify UX friction or drop-off on test variations
* Combine behavioral data with AB Tasty audience targeting to validate hypotheses
* Prioritize UX improvements with qualitative evidence

### About Microsoft Clarity <a href="#h_01jskjby0fa0cfrh3gh5ejze8d" id="h_01jskjby0fa0cfrh3gh5ejze8d"></a>

<div align="left"><img src="/files/bRylW7plmKbwWGFkwIcN" alt="" width="128"></div>

[Microsoft Clarity](https://clarity.microsoft.com/) is a free behavioral analytics tool that helps you understand how users interact with your website. It provides features like:

* **Session recordings**
* **Heatmaps** (click, scroll, and area)
* **Insights** on user friction (rage clicks, dead clicks, etc.)

![](/files/voY9j8plrsCcDpDxvAue)

The conditions of processing and storage of data related to the Microsoft Clarity tag (if deposited by AB Tasty upon activation of this integration) are governed by Microsoft Clarity’s general terms and conditions of use (visible upon creation of the Microsoft Clarity account).

## Prerequisites <a href="#h_01jskjby0fhmwe2z1vcms6qwca" id="h_01jskjby0fhmwe2z1vcms6qwca"></a>

* An active [Microsoft Clarity account](https://clarity.microsoft.com/)
* Your Microsoft Clarity **Project ID**
* AB Tasty tag installed on your website

## Setup instructions <a href="#h_01jskjby0fkx9669s4vegxpz9j" id="h_01jskjby0fkx9669s4vegxpz9j"></a>

<figure><img src="/files/HCKGkAtfYeXqhsz1b60B" alt="" width="375"><figcaption></figcaption></figure>

### 1. Create a new connector <a href="#h_01jskjby0fd8k9jj1064hts10j" id="h_01jskjby0fd8k9jj1064hts10j"></a>

1. Log in to AB Tasty
2. Navigate to Integrations
3. Look for Microsoft Clarity
4. Click Create a new connector
5. Fill the **Connector name** and **Tag domain** fields.&#x20;
6. Select the Clarity tag injection method.

   You have two options:

   * **By ABTasty**\
     → AB Tasty will automatically add the Microsoft Clarity script to your website\
     → Choose this if Microsoft Clarity is **not already installed**
   * **On your side**\
     → Use this if Microsoft Clarity is present (e.g. via Google Tag Manager, hardcoded, etc.) on your website.
7. Paste your Microsoft Clarity Project ID.&#x20;
   1. You can find it in your Microsoft Clarity account URL. Ex:&#x20;

      ```
      https://clarity.microsoft.com/projects/view/YOURPROJECTID
      ```
   2. Or in the general settings:&#x20;

![](/files/G3GUfb5pHnTZ0bdXRrA9)

![c1e6aa60-f8eb-4e0e-8f18-ce2492838aa1.png](/files/uv8vBLiLhAhGipttHP7F)

### 2. Future campaigns default (optional) <a href="#h_01jskjby0gj7wt3arcb16a5r1p" id="h_01jskjby0gj7wt3arcb16a5r1p"></a>

You can automatically apply this connector to all campaigns by checking the corresponding box.

### 3. Launching a campaign <a href="#h_01jskjby0gm0c7dkxztwamccna" id="h_01jskjby0gm0c7dkxztwamccna"></a>

{% hint style="warning" %}
💡 **Important:** Make sure the **Microsoft** **Clarity connector is attached at Step 6** of your AB Tasty campaign setup.
{% endhint %}

* Create or edit a campaign in AB Tasty.
* At **Step 6 (Connectors)**, ensure **Microsoft Clarity** is selected and enabled.

![Capture d’écran 2025-04-16 à 10.21.09.png](/files/2t5h2cSjNyKucMW7bWn3)

### 4. Filtering Results by campaign or variation <a href="#h_01jskjby0gw716275mmxy8zxzh" id="h_01jskjby0gw716275mmxy8zxzh"></a>

{% hint style="info" %}
AB Tasty sends to Clarity 2 variables\
AB TASTY Campaign : \[CampaignID] Campaign name\
AB Tasty variation: \[VariationID] Variation name
{% endhint %}

* Log in at [clarity.microsoft.com](https://clarity.microsoft.com/).
* Open your project dashboard.
* Click on **Filters** in the top bar.
* Navigate to **Custom Tags**.
* Search for your **AB Tasty campaign name** or **variation name**.

<figure><img src="/files/vUpfX8R9Xn6HvXkUVxfX" alt="" width="375"><figcaption></figcaption></figure>

### 5. Test your integration <a href="#h_01jskje7emvhp4jcze6r94qyjp" id="h_01jskje7emvhp4jcze6r94qyjp"></a>

Once your campaign is live and traffic is running:

1. Go to your [Microsoft Clarity dashboard](https://clarity.microsoft.com/)
2. Open **Recordings** or **Heatmaps**
3. Filter by **Page URL** where the campaign is running
4. Check the **console** of the page in your browser:
   * You should see a global clarity object
   * Check that AB Tasty metadata is sent by inspecting the data layer or network requests

## **Privacy** <a href="#h_01jskjby0gn4nwpj52ctwp86nf" id="h_01jskjby0gn4nwpj52ctwp86nf"></a>

We've updated our connector to make it compliant with Microsoft Clarity's **new UUE obligation.** If we're managing the injection of Microsoft Clarity Tag, we'll also call Microsoft Clarity Consent API before sending data to Microsoft Clarity.

![](/files/bS528Y2hLiZdb191fxkz)

## Additional notes <a href="#h_01jskjby0gadq3kk1m3fyq09sb" id="h_01jskjby0gadq3kk1m3fyq09sb"></a>

* You can only get one connector per account at the moment.
* This integration does **not** retroactively tag past traffic. It only applies to sessions after the active campaign and the connector is created & attached.
* If you disable tag injection, please ensure that the Microsoft Clarity script is present on **all pages targeted by the test**.

  <figure><img src="/files/c5R9HQ3CbMOtZtDPyMj8" alt="" width="540"><figcaption></figcaption></figure>
* AB Tasty automatically pushes the following values to Microsoft Clarity:
  * AB Tasty Campaign
  * AB Tasty Variation

For more information on Microsoft Clarity, refer to <https://docs.microsoft.com/en-us/clarity/>[.](https://docs.microsoft.com/en-us/clarity/)

*Microsoft and Microsoft Clarity are either registered trademarks or trademarks of the Microsoft group of companies.*


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.abtasty.com/integrations/push-integrations/setting-up-microsoft-clarity-integration-with-ab-tasty.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
