# Microsoft Universal Event Tracking Consent Mode Integrated

The Microsoft Universal Event Tracking (UET) Consent Mode Integration feature within the app provides a seamless way for merchants to implement Microsoft Universal Event Tracking Consent Mode on their e-commerce platform. This feature allows merchants to respect user consent for cookies, ensuring compliance with data protection regulations while still enabling the collection of critical analytics and ad performance data.

> **Consentik currently supports Microsoft Clarity ConsentV2**

Merchants can configure Microsoft UET Consent Mode directly from app's admin: **Settings/Integrations/ Universal Event Tracking** by following these steps:

1. If you have already added UET tracking code on your store, jump to **step 2.** If not, select "**Have NOT added UET tag on store yet**" checkbox and input your **UET tag ID**.
2. &#x20;Copy the generated code snippet provided by the app.
3. Access the <mark style="color:blue;">`theme.liquid`</mark> file within the website's theme editor.
4. Paste the copied code snippet just after the opening <mark style="color:blue;">`<head>`</mark> tag.
5. Save the changes made to the <mark style="color:blue;">`theme.liquid`</mark> file to ensure Consent Mode is active.

<figure><img src="https://apps.consentik.com/consentik/admin/dist/images/guides/bing.gif" alt="" width="563"><figcaption></figcaption></figure>

### Default Consent Configuration

Upon integration of the generated code into the <mark style="color:blue;">`theme.liquid`</mark> file, the app will default value of <mark style="color:blue;">`ad_Storage`</mark>  and <mark style="color:blue;">`analytics_Storage`</mark>  to '<mark style="color:red;">`denied`</mark>' state This ensures that no data is collected without the explicit consent of the user.

### User Consent Interaction

When a user visits the merchant's website, they will be prompted to provide consent for various categories of cookies, including:

* **Marketing Cookies**: Related to advertising and marketing efforts.
* **Analytics Cookies**: Used for collecting data on user interaction and behavior.
* **Functionality Cookies**: Essential for certain website features and personalization.

### Updating Consent Status

If the user provides their consent:

1. **Consent Update**:&#x20;

* Base on the category user accept, Consentik will update the value of <mark style="color:blue;">`ad_Storage`</mark>  and <mark style="color:blue;">`analytics_Storage`</mark>&#x20;
* If a user accepts **Marketing cateogry** Consentik will inform Clarity the value of <mark style="color:blue;">`ad_Storage`</mark>  is <mark style="color:$success;">`granted`</mark>&#x20;
* If a user accepts **Analytisc cateogry** Consentik will inform Clarity the value of <mark style="color:blue;">`analytics_Storage`</mark>  is <mark style="color:$success;">`granted`</mark>

1. **Consent Storage**: The user's preferences are stored in a cookie on their device, ensuring that their choices are remembered for future visits.
2. **Automatic Consent Application**: On subsequent visits, the app will automatically read the stored cookie and apply the user's preferences without requiring them to consent again.

With this feature, merchants can manage user consent for cookies in a way that is compliant with privacy laws, user-friendly, and minimizes the impact on data collection for critical website functions. The process is designed to be transparent for users and straightforward for merchants to implement and manage.

### Test your UET consent mode setup

**Method 1: Using EUT Tag admin**

1. Go to **Microsoft Advertising Admin,** select **Coversions** -> **UET Tag**
2. Select to the tag you want to test, click to tab **Test your tag**

<figure><img src="https://867177989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpXyFBfh7hfzrY5z7HQRN%2Fuploads%2FGdY50tu3kxzKl1W6qbY6%2Fimage.png?alt=media&#x26;token=af1adc4f-af85-461e-967f-d17bdd4a9d17" alt=""><figcaption></figcaption></figure>

3. Input your website URL and click to Open website URL
4. A new window will appear. If you see Consentik Cookie banner, click to Accept button and reload that window
5. Wait for 10-20 seconds to Microsoft update event from your site.
6. If you setup consent mode correctly, you can see the message below

<figure><img src="https://867177989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpXyFBfh7hfzrY5z7HQRN%2Fuploads%2FzOZScP9NTDi362tgxHgq%2Fimage.png?alt=media&#x26;token=1b73d727-754c-450a-8777-e99b94024267" alt=""><figcaption></figcaption></figure>

**Method 2: Using Console on DevTool**

1. Open your site
2. Press button **F12** or <mark style="color:blue;">**`Ctrl + Shift + J`**</mark> on Windows ( <mark style="color:blue;">**`Cmd + Option + J`**</mark> on MacOS) or **Right Mouse** and select **Inspect** to open Console Tab on
3. Type <mark style="color:blue;">**`window.uetq.uetConfig.consent`**</mark>
4. When cookie banner show, you can see the default consent status is false

<figure><img src="https://867177989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpXyFBfh7hfzrY5z7HQRN%2Fuploads%2FK1rnmdnzH4SzBZHHGpsf%2Fimage.png?alt=media&#x26;token=a4a807c0-b59b-4f57-955d-505b3f146583" alt=""><figcaption></figcaption></figure>

5. When you click to "Accept" button, you can see an Update status change to true

<figure><img src="https://867177989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpXyFBfh7hfzrY5z7HQRN%2Fuploads%2Falaciird0VdqreNRzVuN%2Fimage.png?alt=media&#x26;token=09464b02-4a53-4e66-b8d3-dc994b0f095b" alt=""><figcaption></figcaption></figure>

If you **have trouble implementing** or testing Microsoft UET consent mode, please [contact us](mailto:contact@omegatheme.com).
