Veröffentlicht in

AWIN Tracking Implementation via Google Tag Manager (GTM)

Audience

This guide is written for technical partners who want to implement AWIN tracking using Google Tag Manager (Web).


1. Prerequisites

Before you start, ensure you have:

  • Your AWIN Advertiser ID
  • Access to the website’s Google Tag Manager (Web) container
  • A functioning dataLayer with transaction data
  • Conversion confirmation page (e.g. /thank-you) or purchaseevent.

Recommended browsers/tools:

  • Google Chrome
    • Developer Tools
  • GTM Preview & Debug Mode

2. Tracking Overview

AWIN tracking consists of two main components:

  1. Click Tracking – attributes users to publishers
  2. Conversion Tracking – tracks sales/leads

When using GTM:

  • Click tracking is handled via AWIN MasterTag
  • Conversion tracking is handled via AWIN Conversion Tag

3. Data Layer Requirements

AWIN relies on transaction-level data being available in the dataLayer.

Example dataLayer Purchase

window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: 'purchase',
ecommerce: {
currency: 'EUR',
value: 116.47,
tax: 7.18,
shipping: 10.00,
affiliation: 'My Parka Store',
transaction_id: 'p115-20202000',
coupon: 'free_back_rub',
items: [{
item_name: 'Finnish magical parka',
item_id: 'mp1122',
price: '31.10',
item_brand: 'PARKA4LIFE',
item_category: 'Apparel',
item_category2: 'Coats',
item_category3: 'Parkas',
item_category4: 'Unisex',
item_variant: 'Navy blue',
quantity: '3'
}, {
item_name: 'Parka stain removal',
item_id: 'psr1332',
price: '5.99',
item_brand: 'PARKA4LIFE',
item_category: 'Apparel',
item_category2: 'Utility',
item_category3: 'Care product',
quantity: '1',
item_coupon: 'cheap_stain_removal'
}]
}
});

Mandatory Parameters

Parameter Description
orderReference Unique transaction ID
orderValue Net or gross order value
currency ISO currency code

4. Implementing the AWIN MasterTag (Click Tracking)

Step 1: Create a New Tag

  • Tag Type: Custom HTML
  • Tag Name: AWIN – MasterTag

Step 2: Insert MasterTag Script

<script src="https://www.dwin1.com/XXXXX.js" defer></script>

Replace XXXXX with your AWIN Advertiser ID.

Step 3: Trigger Configuration

  • Trigger Type: All Pages

This ensures publisher attribution cookies are set on landing pages.


5. Implementing the AWIN Conversion Tag

Step 1: Create Variables

Create the following Data Layer Variables:

Variable Name Data Layer Key
DL – orderReference awin.orderReference
DL – orderValue awin.orderValue
DL – currency awin.currency
DL – voucherCode awin.voucherCode

Step 2: Create Conversion Tag

  • Tag Type: Custom HTML
  • Tag Name: AWIN – Conversion
<script>
  var AWIN = window.AWIN || {};
  AWIN.Tracking = AWIN.Tracking || {};

  AWIN.Tracking.Sale = {
    orderRef: '{{DL – orderReference}}',
    amount: '{{DL – orderValue}}',
    currency: '{{DL – currency}}',
    voucher: '{{DL – voucherCode}}'
  };
</script>

Step 3: Trigger Setup

Recommended trigger:

  • Trigger Type: Custom Event
  • Event Name: purchase

This ensures the conversion fires only when valid transaction data exists.


6. Product-Level Tracking (Optional but Recommended)

AWIN supports basket / product-level tracking.

Extend the conversion script:

AWIN.Tracking.Sale.products = {{DL – products}};

Ensure products is passed as a JavaScript object, not a string.


7. Consent & GDPR Compliance

If consent is required:

  • Fire MasterTag and Conversion Tag only after consent
  • Integrate with Consent Management Platforms (CMP)
  • Use GTM Consent Mode where applicable

Recommended consent types:

  • ad_storage
  • analytics_storage

8. Testing & Validation

GTM Preview Mode

  • Verify MasterTag fires on landing pages
  • Verify Conversion fires once on confirmation page

Browser Checks

  • Check network requests to dwin1.com
  • Validate cookies (awin_channel, awin_awc)

AWIN Interface

  • Use Transaction Validation → Test Mode
  • Confirm test conversions appear in AWIN UI

9. Common Issues & Troubleshooting

Issue Cause Solution
No conversions Trigger fires too early Use custom event trigger
Duplicate sales Page reload Fire once per orderReference
Missing values DataLayer timing Ensure push before tag fires

10. Best Practices

  • Always use unique orderReference
  • Avoid firing on page load only
  • Validate with multiple publishers
  • Document all GTM changes

11. Support

If issues persist:

  • Verify advertiser ID
  • Provide GTM container export
  • Share test order references

AWIN Integrator Support can assist with advanced debugging.


Document Version: 1.0 Author: AWIN Integration Team