NOTE: To set up compatibility with Microsoft Clarity, you must first upgrade your embed code to the new Usercentrics Version 3 consent banner



Instructing Clarity to require consent before placing a cookie


Step 1: Upgrade your consent solution to Version 3


  1. If you haven’t already, follow these steps to update your Usercentrics embed code to the new Version 3.


Step 2: Configure Microsoft Clarity to require consent


  1. Log into Microsoft Clarity.

  2. Select ⚙ Settings from the top menu.

  3. Select { } Setup from the menu on the left

  4. Under Advanced settings toggle off Cookies.

  5. Clarity will notify you that cookies are off.




Step 3: Passing consent data to Microsoft Clarity


  1. Log into your Termageddon account

  2. Click into your respective license

  3. Click ‘edit policy details’ for the Cookie Policy and Consent Tool

  4. Click “next” until you get to page #4 and select the option to Enable Microsoft Clarity Compatibility

  1. Click “Next” several times and ultimately ‘Submit’ for changes to take effect.

  2. Paste this code directly below your Usecentrics V3 script (from step #1 above): 

<script>
 window.addEventListener('{{ucClarityConsent}}', function (event) {
   var clarity = event.detail.services['jzMEq56vW'];
   window.clarity('consent', clarity.consent.given);
 });
</script>


That’s it. Now, cookies will be off by default for Microsoft Clarity and multi-page session recordings will only occur after a user provides proper consent. 




Source
https://support.usercentrics.com/hc/en-us/articles/17540715282332-Setting-up-Microsoft-Clarity-to-require-consent