On this page
What this issue is
Microsoft Clarity is a free tool that records visitor sessions and builds heatmaps. Each Clarity project has a project ID, a short string of letters and numbers (for example abcd1234ef). The tracking script contains that ID. If the script is absent, or the ID is wrong, Clarity cannot link visits to your project.
Why it costs you leads or sales
Clarity does not change how your site works, so the direct impact is low. The cost is blind spots. You cannot see where people give up on a form, which button they miss, or where rage clicks happen. You may also make design decisions from a wrong or partial sample. With a wrong ID, you could even mix another site's visitors into your analysis.
- Visitor landsPage loads normally
- Clarity script runsMissing, or ID is wrong
- Session recordedNothing sent to your project
- Heatmaps and insightsEmpty or misleading
With a wrong ID, the visit happens but nothing reaches your Clarity project.
How to check if your site has it
Get the right ID
In Clarity, open your project, then Settings, then Overview. Copy the Project ID.
Check the page source
Open your live site, right-click, choose View page source, and search for clarity.ms. Compare the ID in the script with the one from Settings.
Check the network request
Open browser DevTools, Network tab, reload, and filter for clarity. You should see a request to clarity.ms/tag/ followed by your ID, and later collect requests.
Check Clarity itself
In Settings, Setup, Clarity shows whether it is receiving data. Recordings can take a short while to appear, so allow some time after your test visit.
Test every page type
Check the home page, a landing page, the form page and the thank-you page. Some builders and templates only add scripts to certain pages.
How to fix it
Install Clarity in one place only. Running it from both the theme and Google Tag Manager can cause duplicate or conflicting setups. This is the standard Clarity snippet; replace YOUR_PROJECT_ID with your own ID.
<script type="text/javascript">
(function(c,l,a,r,i,t,y){
c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
})(window, document, "clarity", "script", "YOUR_PROJECT_ID");
</script>Use the official plugin or a header tool
Clarity offers a WordPress plugin. In Clarity go to Settings, Setup, and follow the WordPress option, or paste the snippet into the head with a header-and-footer plugin.
Replace the old ID
If a plugin or theme option already holds an ID, correct it there and remove any duplicate copy of the snippet in the theme files.
Clear caches
Purge your caching plugin and CDN so the live page serves the new code.
Install from the Clarity integration
In Clarity, Settings, Setup, choose the Shopify option and follow the prompts, or add the snippet to theme.liquid just before the closing head tag.
Check the ID
Compare the ID in Online Store, Themes, Edit code, theme.liquid, with the one in Clarity Settings.
Open the Clarity tag
In your container, find the Microsoft Clarity tag (or a Custom HTML tag holding the snippet) and correct the project ID.
Set the trigger
Use All Pages, or a consent-based trigger if you gate analytics behind consent.
Preview and publish
Use Preview mode to confirm the tag fires, then publish the container.
Edit custom code
Go to Site settings, Custom code, and paste the snippet into Head code with the correct ID.
Publish
Publish the site. Custom code does not appear on the live site until you do.
Add to funnel or site tracking code
Paste the snippet into the Head tracking code of each funnel or website, in the Settings of that funnel or site.
Repeat per funnel
Each funnel has its own tracking code field, so check every one.
Use Custom Code
In Settings, Custom code, add a new code snippet with the Clarity script, place it in Head, and apply it to All pages.
Publish
Publish the site and recheck the source. Custom code needs a paid plan with a connected domain.
Use Code Injection
Go to Settings, Advanced, Code Injection, and paste the snippet into the Header box with your project ID.
Check the plan
Code Injection needs a plan that supports it.
Edit the shared head template
Add the snippet once in the layout that wraps every page, so no page is missed.
Use environment config
Keep the ID in a config value per environment so staging does not use the live ID, or the reverse.
How to confirm it's fixed
- The page source contains your exact project ID, once
- The Network tab shows a request to clarity.ms/tag/ with that ID
- A test visit appears under Recordings in the right project
- Heatmaps start to populate for key pages
- Staging and other client sites use their own IDs
- Every page type, including thank-you pages, loads the script
How to prevent it happening again
- Keep a record of each site's Clarity project ID
- Install Clarity in one place only
- Recheck the script after theme changes, migrations and redesigns
- Use separate projects for staging and live
- Name Clarity projects clearly so agency clients are not mixed up
- Glance at Clarity weekly: a sudden drop to zero sessions is a warning sign
How FunnelGuard handles this
FunnelGuard does not check this yet. Verifying a Clarity project ID is a possible future check, not a current feature.
What FunnelGuard does cover nearby: a robot visitor runs your real journeys, such as lead forms and checkouts, on a schedule, and checks each step, the tracking hits sent to ad and analytics platforms like GA4, Google Ads and Meta, and whether test leads reach your inbox and CRM. That protects the funnel itself, but it will not tell you that Clarity has the wrong ID.
Questions people ask
Why is Microsoft Clarity not recording my site?
The most common reasons are that the script is not on the page, the project ID is wrong, or a consent tool or ad blocker is stopping it. View the page source, search for clarity.ms and compare the ID with the one in Clarity under Settings, Overview.
How do I find my Microsoft Clarity project ID?
Open your project in Clarity, go to Settings, then Overview. The Project ID is shown there. It is also the last part of the script line that loads clarity.ms/tag/.
Can I use the same Clarity project ID on several websites?
You can, but the data will be mixed into one project, which makes analysis confusing. Create a separate project per site, and per environment if you test on staging.
How long does it take for Clarity data to show up?
Recordings and heatmaps are not always instant after installation. Allow some time after a test visit. If nothing appears after a reasonable wait, recheck the ID and the Network request.
Does a wrong Clarity ID affect my ad tracking or conversions?
No. Clarity is separate from GA4, Google Ads and Meta tracking. A wrong ID only affects your Clarity recordings and heatmaps, though a broken script setup can hint at wider tag problems.
Should I install Clarity through Google Tag Manager or directly?
Either works. Pick one and do not use both, because double installs can cause confusion. Tag Manager makes it easier to tie Clarity to consent rules.
Does FunnelGuard check my Clarity project ID?
Not yet. It is a possible future check. FunnelGuard currently monitors funnel steps, ad and analytics tracking hits and test lead delivery, so check Clarity manually in the meantime.
Related issues
- TRK-238Hotjar script missing or wrong site IDFix guide
- TRK-240Session recording capturing form fields (PII in recordings)Fix guide
- TRK-241Session recording loading before consentFix guide
- TRK-242Heatmap tool slowing page (heavy script)Fix guide
- TRK-247Matomo tracking with wrong site IDFix guide
- TRK-248Two analytics tools disagreeing on conversion countsFix guide