Integrating Microsoft Clarity Consent API with Shopify via CookieYes

Last updated on October 15, 2026

Overview

This guide explains how to integrate the Microsoft Clarity Consent API with your Shopify store using the CookieYes app. Once integrated, Clarity respects the consent choices visitors make on your CookieYes cookie banner and only sets cookies after they give consent.

How the integration works

CookieYes passes visitors' consent choices to Microsoft Clarity through the Consent API. Clarity sets cookies only after visitors accept analytics cookies.

Note

Clarity continues to record sessions when visitors reject cookies, but without setting cookies.

Prerequisites

  • The CookieYes app installed on your Shopify store with the cookie banner active. For setup steps, see Shopify setup guide.

The Microsoft Clarity Consent API integration is on by default. To check it or turn it on:

  1. In your Shopify admin, go to CookieYes > Integrations.
  2. On the Microsoft Clarity card, click Configure.
  3. Turn on Microsoft Clarity Consent API.
enable api intgn

Step 2: Install the Microsoft Clarity app

  1. In your Shopify dashboard, go to Apps.shopify-5.png
  2. Search for Microsoft Clarity, then select it from the results.shopify-6.png
  3. Click Install.shopify-7.png
  4. Review the data access permissions and click Install.shopify-8.png

After installation, you're redirected to your Shopify admin.

Step 3: Configure Microsoft Clarity

  1. In your Shopify admin, open the Microsoft Clarity app.
  2. In the side panel, select Setup.
  3. Under Advanced settings, turn on Cookies.
  4. Go to your Clarity dashboard to view session data.
clarity dashboard

Session data can take a few hours to appear in your Clarity dashboard.

To confirm that Clarity respects visitor consent:

  1. Open your Shopify store in an incognito window.
  2. Reject analytics cookies. In your browser's developer tools, confirm that no Clarity cookies (such as _clck and _clsk) are set.
  3. Accept analytics cookies and confirm that the Clarity cookies are set.
  4. Check your Clarity dashboard to confirm that sessions are recorded.

Conclusion

Your Shopify store now shares visitors' consent choices with Microsoft Clarity, so Clarity only sets cookies after visitors give consent.

Was this article helpful?

Have more questions?

Reach out to us and we'll answer them.

Contact us