Connect Microsoft Clarity
Microsoft Clarity records how people use a website: where they click, how far they scroll, where they get stuck, and which pages and sources bring them in. StackJack connects an AI assistant to…
Written By Christopher Scaminaci
Last updated About 3 hours ago
Microsoft Clarity records how people use a website: where they click, how far they scroll, where they get stuck, and which pages and sources bring them in. StackJack connects an AI assistant to Clarity's Data Export API.
Connecting Microsoft Clarity to StackJack gives your AI assistant the clarity_get_project_live_insights MCP tool. MCP (Model Context Protocol) tools are the
standardized commands an AI assistant can call through StackJack. With it, your AI can:
- Export the dashboard data of a Clarity project for the last one, two or three days: traffic, engagement time, scroll depth, popular pages, browsers, devices, operating systems, countries, page titles, referrers, and dead, rage, quickback and error clicks, excessive scrolls and script errors
- Break it down by up to three dimensions: Browser, Device, Country/Region, OS, Source, Medium, Campaign, Channel or URL
Clarity allows 10 calls a day per project
The Data Export API allows 10 calls a day per project. The 10 calls are shared by every token of the project, including tokens that other integrations use. A call over the limit is refused until the limit resets. StackJack reports the refusal as the daily limit, and it does not count against the connection.
To make the most of the 10 calls, ask for every dimension you need in one call. Each call returns at most 1,000 rows, with no paging, in UTC.
How StackJack authenticates to Clarity
Clarity uses a project's Data Export API token, sent as a Bearer token. One token reads one Clarity project. If you manage several projects, connect each project's token as its own connection.
Generating the token
- Sign in to Clarity as a project admin and open the project. Only project admins can manage tokens.
- Open Settings, then Data Export, then Generate new API token.
- Give the token a name of 4 to 32 characters: letters, numbers, hyphens, underscores and periods, with no spaces.
- Copy the token when it is shown and keep it safe.
If a person with access to the project leaves it, Microsoft recommends that you replace the token.
Connect it in StackJack
- Open Connectors, then Microsoft Clarity.
- Paste the API Token and save.
Test connection checks the token in StackJack only (that it is present, on one line, and not past its expiry) and does not call Clarity, so it never spends one of the 10 daily calls. A token that Clarity itself refuses shows on the first real call.
Paste the token again whenever you save the connection, including when you only rename it.
What is worth knowing before you start
The arguments
numOfDaysis 1, 2 or 3: the last 24, 48 or 72 hours.dimension1,dimension2anddimension3are optional. Filldimension1first, and do not use a dimension twice.
StackJack checks both before it calls Clarity, so a mistyped value costs no call of the day.
StackJack does not retry a failed call
A retried call would spend another of the 10 daily calls, so StackJack does not retry, not even after an outage. Try again yourself when Clarity recovers.
When Clarity refuses a call
- The daily limit is spent (429): try again after the limit resets. This does not count against the connection.
- The token is refused (401): the token is missing, invalid, expired, or was replaced. Generate a new token and paste it again.
- The token is not authorized (403): check that the token belongs to the project you mean to read.
- A value is rejected (400): check
numOfDaysand the dimensions. - An outage (5xx): wait and try again.
Plans and limits
The export is a read, available on the Free tier. Pro and Business reach the same tool and differ by monthly call quota. Clarity's own limit of 10 calls a day per project applies on every plan.
See the generated Microsoft Clarity tool reference for the current inventory, plan assignment and input schema.
Microsoft Clarity tools
clarity_ · 1 tool · Free 1
Data export
Was this helpful?
More in Connector guides
Connect 3CXConnect AbleSignConnect Acronis Cyber Protect CloudConnect Action1Still need help? Ask the team