Skip to main content
Web Design

Clarity Filters, Segments and Custom Tags: A Setup Guide

KD

Kaleb Dickhaut

Founder, ClickWerxs

October 8, 2026
8 min read
Two nested brass-rimmed laboratory sieves on a pale grey concrete table, the top sieve holding a small handful of grey and tan pebbles, with fine pale sand spilled around the base.

TL;DR: Clarity's dashboards, recordings and heatmaps are only as good as the sessions inside them. Exclude your own traffic first, filter by the page and the action you care about, save the combination as a segment, and add custom tags for the facts Clarity can't see, like which form version a visitor got.

The one-sentence answer: Use Clarity filters to choose which sessions you're looking at, save the useful combinations as segments so the whole team reuses them, and send custom tags with one line of code (window.clarity("set", "key", "value")) to filter by anything specific to your business.


In late September 2026, we blocked an IP address in our own Clarity project so our team's visits would stop showing up in the data. On October 3, we checked the connection we were working from. Its IPv4 address no longer matched the one we'd blocked, and the connection also runs IPv6.

Microsoft's documentation warns about exactly this. IP blocking supports IPv4 only, and it can't block a connection that uses both IPv4 and IPv6, or a dynamic address. A week after setting it up, our block wasn't covering the connection we were using. That's why this guide treats IP blocking as one layer, not the answer.

Prerequisites: Clarity installed on your site (see our guide to installing it without hurting PageSpeed), project admin access for IP blocking, and someone who can edit your site's code if you want custom tags. About an hour.


Step 1: Exclude your own traffic, in two layers

Start with IP blocking, then back it up with a filter, because neither layer covers everything. Your team visits your own site more than anyone, clicks around more than a prospect does, and returns constantly. Left in, those sessions make every frustration rate, scroll map and click map describe your staff.

Layer one, IP blocking. In Clarity, go to Settings, then IP blocking, then Block IP address. Microsoft notes three limits: IPv4 only, no dynamic or VPN addresses, and no connections running both IPv4 and IPv6. You also need to be a project admin. Microsoft says blocked addresses stop counting toward dashboard metrics, recordings and heatmaps about 15 minutes after you add them. It doesn't say blocking removes sessions already recorded, so treat it as going forward only.

Layer two, an exclusion filter for history and the visitors you've already identified. Open the Filters panel in Recordings. Under User info, the Clarity user ID field shows an Exclude selection checkbox in the product, though Microsoft's filter documentation lists exclusion only for browser, operating system and location in that group. Enter the IDs of visitors you've identified as internal. A teammate on a new browser or device gets a new Clarity ID, so recheck the list when you review. We found four repeat visitor IDs, not yet confirmed as internal, behind 23 of the 27 zero-click sessions that entered on our quote page, covered in our guide to session recordings.

If IP blocking doesn't stop your sessions: confirm the block first. Wait 15 minutes, open your site, and check the browser console for Microsoft's message that "Data from this session isn't being collected." If it's missing, check whether your connection uses IPv6 or a changing address, rely on the user-ID exclusion, save it as a segment (Step 4), and apply that segment every time you open Clarity.

Step 2: Filter to the page you care about, with the right path filter

Clarity has three path filters, and choosing the wrong one quietly drops sessions. Entry URL keeps sessions that started on a page. Exit URL keeps sessions that ended there. Visited URL keeps any session that included the page at any point. For most questions about a single page, Visited URL is the right one.

In our sample of 100 recent recordings (September 3 to 25, 2026), ten sessions entered or exited on the quote page and clicked something, and six of those had started on the homepage. An Entry URL filter would have hidden all six.

Path filters also accept regular expressions, per Microsoft's filters overview, so you can group pages. One pattern can cover every service page or every blog post in a category, which matters when individual pages have too few sessions to read on their own.

If a filter returns almost nothing: widen the time frame first, then switch from Entry to Visited URL, then group similar pages with a regex. If it's still thin, the page doesn't have enough traffic for patterns yet, and individual recordings are the right tool instead.

Step 3: Add the action or signal you're investigating

Once you're on the right page, narrow to the behaviour. Clarity's User actions group covers Insights filters (rage clicks, dead clicks, excessive scrolling, quick backs), actions such as entered text or selected text, page scroll depth, smart events and funnels. The Session and Page groups add click counts, page counts and durations.

Three combinations we reuse:

  • Visited the quote page, entered text, no form submission smart event. Visitors who started the form and didn't finish. The smart event in that segment only helps if it fires on the right action; here is how to verify one.
  • Dead clicks, any page, desktop. For finding things that look clickable and aren't, like the self-linking "Get Started" button we found in our frustration signals guide.
  • Page scroll depth below the average fold. Microsoft suggests this one directly, to understand visitors who left before reaching the fold.

If a filter seems to drop out when you switch views: some filters apply only to certain views. Microsoft notes that filters set in the dashboard, recordings or heatmaps "usually remain in effect" when you switch views, except filters specific to one area, such as session filters. Look for the badge on the filter; Microsoft marks filters that can't apply in the current view. Run that combination in Recordings instead.

Step 4: Save the combination as a segment

A segment is a saved group of filters, and it's how you stop rebuilding the same view every week. Apply your filters, select Save as segment, then Save as new, and name it. Microsoft says saved segments "are available to everyone on your Project," and each needs a unique name.

Name segments after the question, not the filters. "Quote page, started form, didn't submit, no team" tells a colleague what they're looking at. "Visited URL + entered text + smart event exclude" doesn't.

Two cautions from Microsoft's documentation: deleting a segment removes it for everyone, and not every filter in a segment works in every view. Unsupported filters show as disabled.

If your team keeps forgetting to apply the exclusion: build it into every segment you save. A segment that already excludes internal traffic can't be misread.

Step 5: Add custom tags for what Clarity can't see

Custom tags let you filter by facts that only your site knows: which version of a form a visitor saw, which campaign they came from, whether they're a returning customer. You set them in your site's code, and they appear under custom filters in recordings, heatmaps and the dashboard.

The call is one line:

window.clarity("set", "form_variant", "short-form");

The value can also be an array, which Microsoft treats the same as setting each value separately:

window.clarity("set", "service_interest", ["roofing", "gutters"]);

Microsoft's limits: the tag and its value can't exceed 255 characters, a single page can carry no more than 128 tags, and new tags take "30 minutes to 2 hours" to appear in your filters. Until then, you can see them in a recording's event details.

Place the call after the Clarity snippet. Microsoft's snippet defines a small queue, so a call made before the Clarity library finishes loading is held and sent once it arrives. Without the snippet, the call throws an error.

We don't send any custom tags on clickwerxs.com yet. The first one we'd add is the lead source a visitor selects on our quote form, so recordings can be split by how people found us.

If a tag never shows up: wait the full two hours, then open a recording from after the change and check its event details for the tag. If it isn't there, the line isn't running. Check that it's on the page, after the snippet, and not inside code that only runs for logged-in staff.

Step 6: Use custom IDs only when you need cross-device journeys

Clarity's Identify API ties sessions to your own ID for a visitor, so one person's phone and laptop sessions show up as one journey. The call takes a required custom ID plus optional session ID, page ID and a friendly name shown in the dashboard. Microsoft says Clarity hashes the custom ID in the browser before sending it.

window.clarity("identify", "crm-4821");

Use an internal ID from your CRM rather than an email address. Microsoft's own examples use an email, and the hashing means Clarity doesn't store it as plain text, but there's no reason to send personal data when an opaque ID works just as well. Microsoft also recommends calling Identify on every page for the best tracking.

If you aren't sure you need it: you probably don't yet. On a lead-generation site, most visitors never log in, so there's no ID to send until they become customers.

How do you know it's working?

You're done when three things are true: your team's sessions no longer appear in your saved segments, you have at least one named segment for the question you care about most, and any custom tag you added appears as a filter. Then open the dashboard with your main segment applied and compare it with the unfiltered view.

If the two views look almost the same, your traffic was already clean. If they differ a lot, every number you read before today was describing the wrong people. Either way, you now know which one to trust.

When you've got clean segments, the next step is measuring the sessions that matter: our guide to Clarity heatmaps shows how to read them, and our Microsoft Clarity overview covers the rest of the tool.

Frequently Asked Questions

Do filters change the data Clarity collects?

No. Filters and segments change what you see, not what Clarity records. IP blocking is the exception, because it stops collection for blocked addresses going forward. If you later remove a filter, the sessions it hid are still there.

Can I exclude bots myself?

Clarity excludes the bot sessions it detects and reports the count on the dashboard; in our 30 days to October 3, 2026, it excluded 91. Microsoft notes some bot-like sessions still slip through, so if a session looks automated, exclude its user ID the same way you exclude your team's.

Can people I add to the project change our segments?

Yes. Clarity has two roles, Admin and Team member, and team members get read and write access, including saving segments. A deleted segment disappears for everyone, so agree who owns the shared ones before you add an agency or contractor.

Should custom tags ever contain personal information?

Avoid it. A tag value like a customer's name or email shows up as plain text in filters. Use categories (form version, service interest, campaign) or opaque internal IDs, and keep anything personal in your CRM where it belongs.


Clean data is the part most teams skip, and it's the part that decides whether any later number means anything. If you want a second set of eyes on your site's setup, see how we approach web design or get in touch.


Sources

  1. Microsoft Learn, "Filters overview": filter groups and exclusion support; Clarity user ID filter; path filters (Entry, Exit, Visited URL) with RegEx; User actions filters; page scroll depth suggestion; filters "usually remain in effect" across views, except area-specific filters such as session filters. learn.microsoft.com (page dated 2026-05-21, retrieved 2026-10-03)
  2. Microsoft Learn, "Exclusion filters": filters that support Exclude selection. learn.microsoft.com (page dated 2024-12-10, retrieved 2026-10-03)
  3. Microsoft Learn, "Segments in Clarity": saving, unique names, "available to everyone on your Project," deletion for all users, unsupported filters disabled. learn.microsoft.com (page dated 2025-01-16, retrieved 2026-10-03)
  4. Microsoft Learn, "Custom tags in Clarity": clarity("set", "key", "value"); 255-character limit; 128 tags per page; appears "within 30 minutes to 2 hours." learn.microsoft.com (page dated 2025-01-27, retrieved 2026-10-03)
  5. Microsoft Learn, "Clarity client API": custom tags accept a string or an array of strings; identify syntax. learn.microsoft.com (page dated 2025-08-08, retrieved 2026-10-03)
  6. Microsoft Learn, "Identify API": custom ID hashed on the client before being sent; call on each page; friendly name shown on the dashboard. learn.microsoft.com (page dated 2024-12-19, retrieved 2026-10-03)
  7. Microsoft Learn, IP blocking: IPv4 only; no IPv6, dual IPv4/IPv6, VPN or dynamic IPs; admin required; takes effect in about 15 minutes; blocked visitors excluded from dashboard metrics, recordings and heatmaps; console message for blocked sessions. learn.microsoft.com (page dated 2025-12-01, retrieved 2026-10-03) 7a. Microsoft Learn, CMP integration guide: Clarity stub queues calls "in case the Clarity script has not yet loaded." learn.microsoft.com (page dated 2026-02-03, retrieved 2026-10-03) 7b. Microsoft Learn, Team management: Admin and Team member roles; team members have read and write access. learn.microsoft.com (page dated 2024-10-30, retrieved 2026-10-03) 7c. Microsoft Learn, Clarity FAQ: some bot-like sessions may slip through. learn.microsoft.com (retrieved 2026-10-03)
  8. ClickWerxs, Clarity project for clickwerxs.com: one IP address blocked in late September 2026; on October 3, 2026 the connection we worked from had a different IPv4 address and IPv6 connectivity; 91 bot sessions excluded in the 30 days to October 3, 2026; no custom tags set on clickwerxs.com; quote-page recording sample of 100 recordings, September 3 to 25, 2026 (four repeat IDs behind 23 of 27 zero-click quote-page sessions; six of ten clicking sessions that entered or exited on the quote page started on the homepage). Operator data.

Kaleb Dickhaut — Founder, ClickWerxs. Kaleb built ClickWerxs from the ground up, from payment processing ISO to the Command Center platform to the AI SEO methodology the blog runs on. He has onboarded hundreds of small businesses onto payment and CRM systems. linkedin.com/in/kaleb-dickhaut

Ready to Stop Overpaying on Payment Processing?

Get a free rate comparison and see how much you can save with interchange-plus pricing.