> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://support.consentmo.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# AWIN Tracking Integration with the Consentmo app

AWIN's complete tracking solution allows advertisers to record and report on an extensive range of data points, including basket value, number of products, product type, new or existing customers, use of a coupon code, and click-to-sale lag time.

If you’re currently using the service above, the integration script from our app needs to be implemented in accordance with the visitor’s consent given via the Cookie bar.

# Integration Steps
 
1. Open **Shopify Admin**.
2. Click on **Online Store** link in the left menubar.
3. Click on the **Actions** dropdown button and select **Edit Code** from there.
4. A new page will open with a list of files on the left side of the screen. Open the `theme.liquid` file.
5. Locate the opening `<head>` and add the following line of code:

```javascript
{% render 'consentmo-awin-integration-script' %}
```

6. Create a new liquid file in the **Snippets** section of the theme files, called `consentmo-awin-integration-script`

7. After that copy the content of the integration script provided below and paste it in the newly created Snippet file:

| [Download](https://gdprstorage.b-cdn.net/faq/files/consentmo-awin-integration-script.zip) **AWIN Tracking Integration script**

8. The final result should look like this:

[![](https://gdprstorage.b-cdn.net/faq/gif/Awin-Consentmo-integration.gif)](https://gdprstorage.b-cdn.net/faq/gif/Awin-Consentmo-integration.gif)

||| NOTE: ${color}[#2185e4](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](/en/article/uninstalling-the-consentmo-app-1t7juar/) of our FAQ page.


# Testing the Awin Consent Integration

You can verify the consent state communicated to Awin directly from your browser's Developer Console.

### Check the Awin consent state

1. Open your storefront in a new **Incognito/Private browser window**.
2. Open **Developer Tools → Console**.
3. Before interacting with the cookie banner, run:

```javascript
AWIN.Tracking.AdvertiserConsent
```

The returned value indicates the consent status currently communicated to Awin:

* `false` — consent has not been provided to Awin.
* `true` — consent has been provided to Awin.

### Test before consent

Before accepting the relevant cookie category, run:

```javascript
AWIN.Tracking.AdvertiserConsent
```

The expected result is:

```text
false
```

This indicates that Awin has not been granted consent.

### Test after accepting consent

Accept the relevant cookie category from the Consentmo Cookie Banner and run the command again:

```javascript
AWIN.Tracking.AdvertiserConsent
```

The expected result is:

```text
true
```

This confirms that the updated consent status has been communicated to Awin.

### Test after rejecting consent

Reject the relevant cookie category or update your preferences so that consent for Awin is not provided. Run:

```javascript
AWIN.Tracking.AdvertiserConsent
```

The expected result is:

```text
false
```

This confirms that Awin has received the updated consent status.

> **NOTE:** The Awin MasterTag may still be present on the page when the consent value is `false`. According to Awin's implementation guidance, the MasterTag should load regardless of the consent status. The `AdvertiserConsent` value is used to communicate whether consent has been provided.

For additional information, refer to Awin's official documentation:

* [Implementing Awin Consent](https://help.awin.com/developers/docs/implementing-awin-consent)
* [Awin testing example using `AWIN.Tracking.AdvertiserConsent`](https://help.awin.com/developers/docs/salesforce-commerce-cloud#testing-your-tracking)


# 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