> ## Documentation Index
> Fetch the complete documentation index at: https://vexidata.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Microsoft Clarity

> Connect Microsoft Clarity to VexiData to query behavioral analytics with your AI assistant.

Connect Microsoft Clarity and ask your AI assistant about recent visitor behavior — traffic, engagement, and frustration signals such as rage clicks, dead clicks, and quick-backs. Clarity connects with an API token instead of OAuth.

## Prerequisites

* A [Microsoft Clarity](https://clarity.microsoft.com) project you can administer, so you can generate API tokens
* The **Connect sources** capability in your VexiData organization, to connect the platform — Owners and Admins have it by default

## Connect Microsoft Clarity

**1. Generate an API token in Clarity**

1. Open your project in [Microsoft Clarity](https://clarity.microsoft.com)
2. Go to **Settings** > **Data Export**
3. Click **Generate new API token**
4. Name the token (for example, `VexiData`) and copy it — Clarity shows it only once

**2. Paste the token into VexiData**

Go to the [**Integrations**](https://vexidata.com/integrations) page in VexiData, click **Connect** on **Microsoft Clarity**, enter a **Project name** (for example, your website's address), paste the token into **API token**, and click **Connect**. The project name is the label VexiData shows for this connection.

> [!NOTE]
>
> **Clarity's data export limits**, enforced by Microsoft:
>
> * **10 API requests per project per day** — each tool call spends one, so make questions count
> * Data covers a rolling window of the **last 1 to 3 days** only
> * Up to **3 dimensions** per request
> * Responses are capped at **1,000 rows**
> * Aggregated metrics only — session recordings and heatmaps are not available through the API

## Managing the connection

To connect more Clarity projects, click **Add account** on the Microsoft Clarity card on the [**Integrations**](https://vexidata.com/integrations) page, enter a different project name, and paste that project's token — each project keeps its own token.

The connection with the **Primary** badge is the primary, which tools use when a request doesn't name one. To change it, open another connection and click **Make primary** in its **Connection** card.

To rotate a token, generate a new one in Clarity and connect again with the same project name and the new token — VexiData updates the existing connection. To remove a project, open its connection and click **Disconnect** in the **Connection** card.

## What the AI can do

| Tool | What it does | Access |
| - | - | - |
| `microsoft_clarity_read` | Exports aggregated behavioral metrics — traffic, engagement time, scroll depth, and frustration signals such as rage clicks, dead clicks, and quick-backs — broken down by up to three dimensions (for example URL, device, or country). | Read |

The tool is read-only, so **Members** can use it. Try asking: *"Which pages had the most rage clicks in the last three days?"*

## Troubleshooting

> [accordion] Requests fail with an authorization error
>
> The token was revoked or copied incompletely. Generate a new token in Clarity under **Settings** > **Data Export**, then connect again in VexiData with the same project name and the new token.

> [accordion] Daily request limit reached
>
> Clarity allows 10 API requests per project per day, and the counter resets daily. Until it does, further calls are rejected — ask broader questions so one request answers more, or wait for the reset.

> [accordion] The AI can't report on older data
>
> Clarity's export API returns at most the last 3 days. For longer histories and trends, pair Clarity with [Google Analytics](https://vexidata.com/docs/integrations/google-analytics.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.