Skip to main content

Microsoft Clarity

Web Source code Package

Microsoft Clarity provides session replays, heatmaps and behavioural insights for web products, free and without sampling caps. This destination forwards walkerOS events to Clarity via the official @microsoft/clarity SDK, translating events into Clarity.event(...) calls, resolving custom tags, identities, session priority, and consent state.

Where this fits

Clarity is a web destination in the walkerOS flow:

Installation

Loading...
Loading...

Configuration

This destination uses the standard destination config wrapper (consent, data, env, id, ...). For the shared fields see destination configuration. Package-specific fields live under config.settings and are listed below.

Settings

PropertyTypeDescriptionMore
apiKey*stringYour Microsoft Clarity project ID (e.g. "3t0wlogvdz"). Find it in your Clarity dashboard under Settings → Setup.
consentRecord<string, string>Translation table from walkerOS consent keys to Clarity ConsentV2 categories. Example: { "analytics": "analytics_Storage", "marketing": "ad_Storage" }. Required to get meaningful consent behavior — Clarity expects its own category names.
identifyanywalkerOS mapping value resolving to positional arguments for Clarity.identify(). Keys: customId (required), customSessionId?, customPageId?, friendlyName?.
* Required fields

Mapping

Per-event rules under config.mapping. For the standard rule fields (consent, condition, data, batch, name, policy) see mapping.

PropertyTypeDescriptionMore
identifyanyPer-event identity mapping. Resolves to { customId, customSessionId?, customPageId?, friendlyName? } → Clarity.identify(...).
setanyExplicit custom tag mapping. Resolved object keys become Clarity.setTag(key, value) calls. Array values pass through as string[] unchanged.
upgradeanySession priority reason. Resolves to a string → Clarity.upgrade(reason). Used to flag important sessions for retention beyond sampling.

Examples

Array tag values

Array values such as product tags are passed through to Clarity.setTag preserving the array shape.

Event
Mapping
Out

Combined features

A purchase identifies the user, sets an order tag, upgrades the session, and fires the Clarity event in order.

Event
Mapping
Out

Consent granted

A walker consent command translates analytics and marketing grants into a Clarity.consentV2 call.

Event
Out

Consent revoked

A walker consent command with analytics and marketing denied calls Clarity.consentV2 with denied flags.

Event
Out

Default event

A walker event becomes a Clarity.event call with the event name as the Clarity custom event.

Event
Out

Destination identify

Destination-level identify calls Clarity.identify with the user id on every push as Clarity recommends.

Event
Out

Include data as tags

A mapping include flattens the event data section into Clarity.setTag calls before the event fires.

Event
Mapping
Out

Upgrade session

A completed order upgrades the Clarity session priority so it is retained beyond the sampling cap.

Event
Mapping
Out

Tags without event

A page view sets Clarity tags while skip suppresses the event, letting Clarity handle page tracking itself.

Event
Mapping
Out

Custom tags

A product view sets Clarity session tags such as product color and id before firing the event.

Event
Mapping
Out

User login identify

A user login fires Clarity.identify with custom id, session id, page id, and friendly name then tracks the event.

Event
Mapping
Out

Clarity expects its own category names (analytics_Storage, ad_Storage). walkerOS uses arbitrary consent keys, so translation is explicit: configure settings.consent once and the destination maps every walker consent event into Clarity.consentV2({ ... }). When all mapped keys are revoked, the destination additionally calls Clarity.consent(false) (the legacy v1 API that erases cookies and ends the session).

💡 Need implementation support?
elbwalker offers hands-on support: setup review, measurement planning, destination mapping, and live troubleshooting. Book a 2-hour session (€399)