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.
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:
- 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
Only the highlighted part shown below of the original Clarity script needs to be added. Without the opening and the closing <script></s> tags.
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:
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: 02/06/2025
Thank you!