Awin server-to-server tracking using server Google Tag Manager

Ira Holubovska

Ira Holubovska

Author
Updated
Jun 9, 2026
Also available in

Awin is a global leader in affiliate marketing and one of the few platforms that has made server-side tracking mandatory for all advertisers. Through server-to-server integration, they ensure the affiliates' marketing efforts are correctly attributed and paid. 

To simplify Awin server-to-server integration, we created the tag for the server Google Tag Manager. This blog post will discuss why server-to-server communication is necessary and how to set up Awin server-to-server tracking using server GTM. 

Why should advertisers use Awin server-to-server integration?

Awin is committed to delivering advertisers and affiliates the best conversion tracking experience through its comprehensive system. As an industry leader, Awin strives for accurate data so all parties can easily see campaign success. Awin also wants to ensure that it uses the best and most reliable conversion tracking techniques since this is the key to success in affiliate marketing.

They aim to ensure that advertisers see the correct conversion reporting from affiliates and that affiliates receive the proper commission for all their marketing efforts.

Tracking conversion becomes challenging due to ITPs, ad blockers, and the limited use of third-party cookies. To help deal with all these browser tracking restrictions, they implemented server-to-server integration and made it mandatory for all advertisers within their platform.

Advertisers should send conversion data directly to Awin’s server. HTTP requests must contain conversion data and the original click id “awc” within the “cks’’ parameter. Product-level details can be added for more robust tracking reports.

Requirements for setting up the Awin tag

Please ensure that you already have Google Tag Manager web and server containers, as well as a configured server container and custom domain in Stape. Please follow these guides if you don’t have any of those:

Additionally, the Awin-recommended server-side tracking setup comprises several web and server container tags:

  1. In your web GTM container, you need to set up Awin Advertiser Mastertag (to get access to the necessary functions for Awin tracking), Awin - AW Last Click Identifier (to set up Awin’s cookie and track the source of the conversion), and Awin Conversion Tag (to pass the conversion data). Awin manages these tags, so for more information, please refer to Awin’s official guide on client-side tracking.
  2. In the web GTM container, you need Google Analytics 4 or Data Tag/Data Client sending data to the sGTM container. In the server GTM container, you need a respective client. Here is a step-by-step guide on sending data to sGTM. Make sure that the tag is passing the following parameters:
    1. send_page_view = true
    2. server_container_url = {{Your container URL}}
  3. In the server GTM container, you need to set up the Awin tag, as described in the next section. 
  4. Also in the server GTM container, once you set up the Awin tag by Stape, you will need to configure Server Awin AW Last Click Identifier for event deduplication. Awin manages this tag, so for more information, please refer to Awin’s official guide to last-click deduplication.

How to set up the Awin tag

1. Add the Awin tag template in the server GTM container by importing it from the Template gallery:

  • Search for the Awin tag in the Google Tag Manager Tag Template gallery.
  • Click Add to workspace.
Add the Awin tag template

2. Create the Awin tag:

  • Go to the Tags menu → click New.
Create the Awin tag
  • Click Tag Configuration → select Awin.
Select Awin in Tag Configuration

4. Configure the Awin tag

  • Merchant ID - a unique numeric code of a merchant. To find your merchant ID, log in to your Awin account → click the Account button → click the Overview tab. Your Merchant ID (MID) will be shown underneath your account name.
  • Order Reference - the unique booking or order reference that identifies the transaction.
  • Total Order Value - the total booking or order value excluding any taxes, delivery, and discounts. For a lead-based campaign or program, the value should be the number of leads. The value will be ignored if multiple commission groups are specified in the Commission Group Code field.
  • Currency Code - a 3-letter currency code per ISO standard (e.g., GBP).
  • Commission Group Code - the code for the commission group you want to base the commission calculation on. The value can be either a single group name (e.g., CD), or a full set of groups and the commission value for each group (e.g., CD:11.10|DVD:14.99). If you don’t have this code, enter the DEFAULT value.
  • Discount Code - the code or name of the discount code that was applied during checkout.
Configure the Awin tag
  • Last Paid Click Referring Channel - the value utilized to determine how AWIN should process the incoming transaction requests (most often the utm_source value). After you configure the Server Awin AW Last Click Identifier (see this guide), please add the variable with the type cookie value and the name of the cookie ServerAwinChannelCookie as the chosen variable for this parameter.
  • Deduplication Query Parameter Name - Specify the deduplication query parameter name to be used if Last paid click referring channel doesn't exist.
  • Customer Acquisition - either NEW or RETURNING values to identify if it’s a new customer acquisition or a returning customer.
  • Products Override - can be used if you wish to override the default UA/GA4 item parsing format (in this case, pass the array of items in GA4 format).
Deduplication configs
  • Automatically detect consent from Google Consent Mode or Stape's Data Tag - if you are using Google Consent Mode or Stape's Data Tag to transmit consent to the server, then enable this setting to use the consent information from them. This field has precedence over the Awin Consent Signal below. If you aren’t using Google Consent Mode or Stape's Data Tag to transmit consent to the server, see Awin’s official guide on Consent Signals.
  • Awin Consent Signal - here you can manually supply consent information. Accepted values are: 0, 1, true, false
  • Enable Unconditional Cashback & Rewards Tracking - option to exempt Cashback and Rewards Journeys from consent restrictions.
Consent configs
  • Awin Click ID - can be used to override the click ID from the cookie.
  • In test mode - check to have the tag fire in test mode and the reported conversion be ignored.
  • Override the cookie domain - can be used to override the default domain where cookies are set (must be your website's top-level domain, e.g., example.com). If unchecked, the domain is determined automatically.
  • Override the cookie SameSite attribute - can be used to override the SameSite attribute used by cookies (by default, no SameSite attribute is set).
  • Use HttpOnly cookies - can be used to forbid JavaScript from accessing the cookie.
Additional configs
  • Advanced parameters:
    • Custom Parameters - can be used to pass additional parameters with the tag.
    • Event Names - define the event names that will trigger the PageView functionality and Conversion functionality of the tag.
    • Tag Execution Consent Settings - choose if you wish for the tag to wait for marketing consent from the user before firing.
    • Logs Settings - choose if you want to log requests to your account. This feature is handy when setting up server-side tagging since it allows seeing incoming and outgoing requests and network responses.
    • Advanced Settings (Additional Tag Metadata) - specify additional tag metadata to be included in the event data when the tag is fired.
Advanced parameters

5. Add the Trigger for the tag (All Pages and your applicable Purchase Event), give it a descriptive name, and click Save.

Add the Trigger for the tag

After you’ve configured the Awin tag by Stape, don’t forget to also set up Server Awin AW Last Click Identifier for event deduplication. Awin manages this tag, so for more information, please refer to Awin’s official guide to last-click deduplication.

Test and troubleshoot the Awin tag setup

You can test the configurations in Google Tag Manager. Click on Preview, trigger the event, and check whether the tag has fired.

Test and troubleshoot the Awin tag

You also can enable the “In test mode” checkbox; in this case, a conversion tag will be fired in test mode, and a reported conversion will be ignored. Once done, publish changes in the server container.

Awin server-to-server tracking: real user problems solved

A user faced critical issues in AWIN reporting because the server-to-server cookie (awin_awc) wasn’t being set properly, causing missing affiliate click tracking (full thread here). The root causes were either the server tag not triggering on page_view events with the awc parameter or the server GTM not running in a first-party context. The solution was to ensure the sGTM used a subdomain of the main domain and to let the client container assign the AWIN channel before sending events to the server container, so the server could use that value for the AWIN hit. This fixed the cookie assignment and resolved the tracking discrepancies.

Conclusion

Awin required all advertisers to implement server-to-server tracking as a fallback. This ensures that conversions are attributed correctly and affiliates get appropriate compensation for conversions referred by them. 

This article covered Awin server-to-server integration using server GTM. Please contact us if you need assistance setting up your Awin integration or any other affiliate network. Thanks for reading!

We can set up server-side tracking for you!

All it takes is a few simple questions. Click Get A Quote , fill-up the form, and we will send you a quote.

Get a Quote
author

Ira Holubovska

Author

Ira has 10+ years of digital marketing experience, with the last 5 focused on server-side tracking. She understands how and when it works across various digital marketing scenarios.

Comments

Try Stape for all things server-side