How do you install Microsoft Clarity is a question we get a lot. Installing Microsoft Clarity on your website can provide valuable insights into your visitors’ behaviour. Before you start, it is advisable to check the speed of your website. A fast website contributes to a better user experience and ensures that adding Clarity has no negative impact.
1. Preparations and required tools
Google Tag Manager
The easiest way to install Microsoft Clarity is via Google Tag Manager (GTM). It is important that GTM is already installed on your website. If you haven’t done this yet, don’t worry: you can find a guide to installing GTM here.
Cookiefirst
You also need Cookiefirst to make sure Clarity’s tracking complies with cookie regulations. For the installation of Cookiefirst and creating a trigger for ‘Cookie Consent Marketing’, read here more about the EU cookie policy.
2. Installing Microsoft Clarity
Now that you have made the preparations, you can start installing Microsoft Clarity via Google Tag Manager.
Create an account
First create an account with Microsoft Clarity. Visit the Clarity website and register. Follow the instructions to set up your account. Create a new project
Once you have managed to create an account, you can log in to your newly created account. You can then create a new project at the top left. Create a new project.
Enter the name and URL of the website
Enter the name of your project and the URL of your website. Then click “Add new project” to continue to the next step.
Copy the tracking code
Once you have added the project, Clarity generates a unique tracking code. It is important that you copy this code, as you will need it for the next steps in the process.
3. Configuring Google Tag Manager
Open Google Tag Manager
Log in to Google Tag Manager and select the domain for which you want to set up Clarity.
Add a new tag
Go to “Tags” and click “New Tag” to add the Microsoft Clarity tracking code.
Give the tag a name of your choice
Give your new tag a recognisable name, such as “Microsoft Clarity”.
Change the tag type to ‘Custom HTML’
Make sure your tag type is set to “Custom HTML”. Paste the tracking code you copied earlier into the HTML box.
Set the trigger to Cookie Consent Marketing
At the bottom of the page, choose the trigger setting ‘Cookie Consent Marketing’. The reason for this is that the Clarity tracking code is then only loaded if the user has accepted the marketing cookies.
Set the consent to ‘ad_storage’
Go to the consent overview and select Microsoft Clarity. Set the consent to ‘Require additional consent for tag to fire’.
Publishing the changes
After correctly setting up the tag and trigger, you can publish the changes. Click “Submit” to put the new configuration live straight away.
Step 4: Clarity settings
Open Clarity and block your IP address
Log in to Microsoft Clarity and go to your account settings. Click ‘IP blocking’ and add your own IP address to prevent your own visits from being counted in the data.
Step 5: Check website speed
Checking the speed of your website again is the last step in the process. Using Clarity should not affect your website’s loading time. If it does, consider optimising your website first before you reinstall Clarity.
Can’t work it out, or want to talk it through with a specialist? Get in touch with us.