Sign inBlogAboutSupportContact
Analytics

Tag Clarity sessions with events so heatmaps and recordings are actually filterable

Fire custom Clarity events on form submissions and clicks, then attach session tags so you can filter recordings by plan, intent, or any label that matters to your funnel.

4 min read May 2026 create clarity event

Clarity gives you recordings. You can't find the useful ones.

Microsoft Clarity records sessions automatically. The problem is volume: thousands of recordings, all labelled "session," with no way to separate visitors who submitted the contact form from visitors who bounced on the hero section. You end up watching random recordings hoping one of them shows what you care about.

Clarity supports custom events and session tags specifically for this. But wiring them up means writing clarity('event', ...) and clarity('set', ...) calls into theme files or a custom plugin. Each new event is another code change, another deploy, another thing that breaks on the next update.

What most people do instead

Watch random recordings Scroll through the session list hoping to find a useful one. You can filter by rage-clicks or dead-clicks, but not by what the visitor actually did on your form.
Hardcode clarity() calls in the theme Add inline JavaScript to functions.php or a child theme. Works until the theme updates, the developer leaves, or you need to rename an event for a new test.
Route through Google Tag Manager Create a custom HTML tag in GTM to call clarity(). More containers to publish, more moving parts, and still zero connection to your WordPress forms.

A better way: define the event from the navigator

TrueCommander attaches a lightweight listener to the trigger you specify. When the visitor hits it, the command calls clarity('event', name). If you add a session tag, it also calls clarity('set', tag_name, tag_value) in the same moment. That tag is now searchable in the Clarity dashboard for the entire session.

No theme files touched. No GTM container. Run the command, and the next form submission is already tagged in Clarity.

TrueCommander
Clarity event "lead_form_submit" created
Clarity Event Active
Event Name lead_form_submit
Target cf7_form #42
Session Tag plan = premium

Clarity must be installed first. Run enable clarity as a startup command before creating events. That command loads window.clarity on every page. Without it, create clarity event has no Clarity instance to fire into.

How it works

1
Install Clarity with enable clarity Run it once as a startup command. It injects the Clarity script on every page load and initialises window.clarity.
2
Define the event with create clarity event Name the event, pick the target (CF7 form ID, Elementor form ID, CSS class, email link, phone link), and optionally add a session tag. The command registers a listener on the frontend.
3
The event and tag fire on the trigger When the visitor hits the target, clarity('event', name) fires. If you set a tag, clarity('set', tag_name, tag_value) runs in the same call, labelling the whole session.
DetailValue
Command namecreate clarity event
-nameClarity custom event name (any string, e.g. lead_form_submit). Required.
-targetemail | phone | css_class | css_id | elementor_form | cf7_form
-form_idRequired when target is elementor_form or cf7_form
-class / -idRequired when target is css_class or css_id
-tag_nameOptional session tag key. When set, fires clarity('set', tag_name, tag_value) alongside the event.
-tag_valueRequired when -tag_name is set. The value attached to the session tag.
Prerequisiteenable clarity must run first so window.clarity exists
Can be used in

Real example

You're running A/B copy on a pricing page. The premium plan form is a Contact Form 7 (ID 42). Clarity is recording sessions, but you have no way to filter recordings to "visitors who submitted the premium form" versus everyone else.

You open the navigator and run enable clarity as a startup command, then run tp create clarity event -name="lead_form_submit" -target="cf7_form" -form_id=42 -tag_name=plan -tag_value=premium. From that point, every session that includes a form submission is tagged with plan=premium in Clarity.

The next day you open Clarity, filter sessions by the tag plan=premium, and watch exactly those recordings. You see users hesitate on the price row, then submit anyway. You move the price below the feature list. Submissions go up 18 percent. The insight came from 12 filtered recordings, not 4,000 random ones.

Goes further with TrueCommander

Ready?

Filter Clarity recordings by what matters.

This is one of 91 commands. All included with every license.

Cookies. The short version.

Essential cookies keep the cart and theme working. Analytics only fire if you say yes. Read our policy.