How To Set Up Microsoft Clarity On Your Website
There are very few tools in the digital marketing world that are completely free, genuinely powerful, and yet remain largely underused by the people who would benefit from them most. Microsoft Clarity...

There are very few tools in the digital marketing world that are completely free, genuinely powerful, and yet remain largely underused by the people who would benefit from them most. Microsoft Clarity is one of those tools. If you are running a website and you are not yet using Clarity, you are almost certainly missing out on a layer of behavioural insight that no amount of traffic data alone can give you. Understanding how to set up Microsoft Clarity on your website is not complicated, but knowing why you should and what to do with it once it is live is where the real value lies.
Microsoft Clarity is a free behaviour analytics tool that gives you session recordings, heatmaps, and a wealth of user interaction data. It shows you exactly how real visitors move around your site, where they click, where they scroll, where they drop off, and where they get frustrated. For anyone serious about improving their website performance, conversion rates, or general user experience, this is not a tool you can afford to ignore.
What Microsoft Clarity Actually Does
Before diving into the setup process, it is worth understanding what you are actually getting access to. Microsoft Clarity records real user sessions on your website, which means you can watch back how individual visitors interacted with your pages. You can see where the cursor moved, what was clicked, how far down the page they scrolled, and whether they exhibited signs of frustration, such as rage clicking or excessive back-and-forth navigation.
Alongside session recordings, Clarity generates heatmaps for your pages. These heatmaps show aggregated click data, scroll depth, and areas of high engagement across all your visitors, giving you a visual representation of what is working and what is not. For UX designers, marketers, and business owners alike, this kind of data is invaluable because it moves beyond vanity metrics and shows you the actual human experience of using your site.
Clarity also integrates natively with Google Analytics, which means you can combine quantitative traffic data with qualitative behavioural insights in a way that was previously only possible with expensive enterprise tools.
Creating Your Microsoft Clarity Account
Getting started with Microsoft Clarity begins with creating a free account. Head to clarity.microsoft.com and sign in using a Microsoft account. If you already use products like Outlook, Teams, or Azure, you will already have the credentials you need. If not, creating a Microsoft account takes only a couple of minutes and is straightforward.
Once you are signed in, you will be prompted to create a new project. Give your project a name, which would typically be your website or brand name, and then enter your website URL. Clarity will ask you to select the category that best describes your site, whether that is e-commerce, blog, business services, or another type. This helps Clarity configure some of its default reporting to be more relevant to your use case.
After setting up your project, you will be taken to the installation screen where Clarity provides you with a unique tracking code snippet. This is the piece of JavaScript that you need to add to your website in order to begin collecting data.
Installing the Clarity Tracking Code
Want more insights like this?
Join thousands of marketers getting weekly tips and strategies.
This is the step that often causes the most hesitation for people who are not developers, but it is considerably more straightforward than it might look. Clarity gives you a small JavaScript snippet that needs to be placed within the head section of every page on your website. There are several ways to do this depending on how your site is built.
Using Google Tag Manager
If your website already uses Google Tag Manager, this is by far the simplest route. Inside Tag Manager, create a new tag, choose Custom HTML as the tag type, and paste the Clarity script into the HTML field. Set the trigger to fire on all pages, save the tag, and then publish your container. Clarity will begin collecting data almost immediately. This method is recommended for most website owners because it keeps your tracking code management clean and centralised without requiring any changes to your site's core code.
Installing Directly Into Your Website's Code
If you manage your site manually or through a framework that gives you direct access to the HTML, you can paste the Clarity script directly into the head section of your site's template or layout file. For most websites, this means editing a file like header.php in WordPress themes, or the equivalent layout file in whatever platform you are using. The script should sit as high in the head section as possible to ensure it loads reliably across all sessions.
Using a CMS Plugin or Integration
For websites running on platforms like WordPress, Clarity offers a dedicated plugin available in the WordPress plugin directory. Once installed and activated, the plugin connects directly to your Clarity account and handles the tracking code installation automatically. This is the most user-friendly option for those who prefer not to touch any code at all. Similar integrations exist for platforms like Shopify and Wix, making setup accessible regardless of what your site is built on.
Verifying That Clarity Is Working
Once the tracking code is in place, you will want to confirm that it is firing correctly. The easiest way to do this is to visit your website in a browser, spend a couple of minutes clicking around and browsing a few pages, and then return to your Clarity dashboard. Within a short time, you should begin to see your session appear in the recordings section. Clarity typically starts processing data within a few hours of installation, though the dashboard can sometimes take up to 24 hours to populate fully depending on your traffic levels.
You can also use browser developer tools to verify that the Clarity script is loading. Opening the Network tab in your browser's developer tools and filtering for requests containing the word clarity will show you whether the tracking script is being called successfully on your pages.
Connecting Microsoft Clarity With Google Analytics
One of the most powerful features within Clarity is its integration with Google Analytics. Once connected, you can filter your Clarity session recordings and heatmaps by the same segments you use in Analytics, such as traffic source, device type, landing page, or campaign. This means you can do things like watch session recordings specifically from visitors who arrived via paid search, or view heatmaps only for users on mobile devices who bounced from a particular page.
To connect the two platforms, go to the Settings section within your Clarity project and find the Google Analytics integration option. You will need to grant Clarity access to your Analytics account, after which you can select the relevant GA4 property. The integration is read-only, meaning Clarity can pull in segments and filters from Analytics without making any changes to your Analytics configuration.
Understanding the Data Clarity Provides
Once Clarity is live and collecting data, the real work begins. The dashboard gives you an immediate overview of key behavioural metrics, including dead clicks, which are clicks on non-interactive elements that suggest a user expected something to happen, rage clicks, which indicate frustration, and excessive scrolling, which can suggest confusion or a difficulty in finding information.
Session recordings allow you to watch individual user journeys from start to finish. When reviewing recordings, pay attention to patterns rather than individual sessions. If you notice that a significant number of users are consistently abandoning a form at the same field, or that visitors are scrolling past your primary call to action without engaging with it, those are signals that warrant changes to the page.
Heatmaps, meanwhile, give you a broader view across all your traffic. The click heatmap will show you which elements attract the most interaction, which can sometimes reveal that users are clicking on things that are not actually links, suggesting a layout or design issue. The scroll heatmap shows you how far down your pages visitors typically read, which is particularly useful when assessing the placement of key content and conversion elements.
GDPR and Privacy Considerations
Because Clarity records user sessions, it is important to make sure your use of the tool is compliant with data protection regulations, particularly GDPR if you are operating in the UK or EU. Microsoft Clarity automatically masks sensitive input fields such as passwords and payment details, and it does not capture or store personally identifiable information in session recordings. However, you should still ensure that your privacy policy is updated to reflect your use of session recording and analytics tools, and that your cookie consent setup covers the Clarity tracking script appropriately.
Within the Clarity settings, you also have the option to mask additional elements on your pages if there is content you do not want recorded, giving you further control over what is captured.
Making Clarity Part of Your Regular Workflow
Setting up Microsoft Clarity on your website is only the beginning. The tool delivers ongoing value when it becomes a regular part of how you review and improve your site. Whether you are preparing for a website redesign, testing a new landing page, or trying to understand why a particular page has a high exit rate, Clarity gives you a layer of evidence that most analytics platforms simply cannot provide.
If you are running paid advertising campaigns, Clarity becomes even more valuable. Being able to watch how visitors from a specific campaign interact with your landing page, and seeing exactly where they leave or what confuses them, allows you to make informed decisions about layout, copy, and calls to action rather than relying on guesswork.
Microsoft Clarity is one of those relatively rare tools that genuinely earns its place in a digital marketing setup, and the fact that it is completely free makes the decision to install it an obvious one. Get it set up, give it a few weeks to gather meaningful data, and then start using what it tells you to make your website work harder for the people who visit it.
Ian
Ian has worked in Digital Marketing for decades, and is a Google Partner for Google Ads and an expert in onsite and technical SEO. He has worked with hundreds of clients, helping them achieve success online, through SEO, PPC and Digital Marketing, working with local businesses through to national retailers.
View all posts →Related Articles

Our Complete Guide To Improving Your Google My Business Profile
In the world of local business marketing, your Google My Business profile isn't just another online listing, it's your digital shopfront that can make or break a potential customer's first impression.
Wordpress Websites Vs AI Websites
The decision between building a traditional WordPress website or embracing the new wave of AI-powered website builders has become one of the most significant choices facing businesses today. With Word...

What Is SEO And How Does It Work?
If you've ever wondered why some websites appear at the top of Google whilst others seem to vanish into the digital wilderness, you're asking the right question.
