Microsoft Clarity integration
How it works
Our app deletes the Microsoft Clarity cookies when the page loads. However, those cookies are then created by Microsoft Clarity again once the cookie bar is accepted.
When the initial state is set to block the Analytics and Marketing cookie groups or the customer opts out, the script that is setting the Microsoft Clarity will not be executed.
NOTE: The below integration is only applicable if the service is added via a script placed in the theme files of the store. If the integration for the service is done through any other channel or service, please check the Help Center for the relevant integration as per your case: Social Media Pixels integration for Consentmo GDPR app
Integration Steps
Open Shopify Admin.
Click on Online Store link in the left menubar.
Click on the Actions dropdown button and select Edit Code from there.
A new page will open with a list of files on the left side of the screen.
Create a new liquid file in the Snippets section of the theme files, called microsoft-clarity-integration-script
After that copy the content of the integration script provided below and paste it in the newly created Snippet file:
Download Microsoft Clarity integration script
Locate the original Microsoft Clarity script and do the following:
Step 1. Copy the content of the Microsoft Clarity script and paste it under the line “// The content of Microsoft Clarity script goes here” in the integration script again
Step 2. Comment out or delete the original Microsoft Clarity scripts and save the changes.
Open the theme.liquid file.
Locate the opening <head> tag and after it, add the following line of code:
<!-- Microsoft Clarity integration script Consentmo -->
{% render 'microsoft-clarity-integration-script' %}
A reference on the process can also be checked here:
NOTE: Make sure to remove the added code before deleting the app. This way, no snippets of code will be left in your theme. For more information on what you should be aware of when deleting our app check this article of our FAQ page.
Need help?
In case you need any assistance, please make sure to reach out to our support team via live chat or at support@consentmo.com
Updated on: 17/01/2025
Thank you!