This guide walks you through setting up AWIN conversion tracking using a server-side Google Tag Manager container provisioned by Seers. The setup covers both attribution cookie management and server-side conversion reporting, enabling accurate, resilient affiliate tracking for your AWIN campaigns.
Prerequisites
Before getting started, make sure the following are in place:
- AWIN Account Access: Access to an AWIN account. This is optional, but it will be useful for testing and validating events. Refer to AWIN's documentation on how to share account access.
- AWIN Conversion Information: You will need the following details from your AWIN account:
- Merchant ID
- Commission Group Code
- Standard conversion data, including price, transaction ID, and currency
- Web Google Tag Manager (GTM): A web GTM container already deployed on your website and configured to send GA4 events to your server-side GTM instance. Refer to Google's documentation on sharing GTM container access.
- Server-Side GTM Container (Seers): A server-side GTM container provisioned by Seers, accessible via a first-party endpoint, and configured to process GA4 page_view and conversion events. Visit the Seers Get Started guide for setup instructions, and refer to GTM documentation for sharing container access.
Why Use Server-Side Tagging with AWIN?
Greater Data Accuracy
Server-side tagging bypasses ad blockers and browser-level privacy restrictions such as Safari's ITP or Firefox's ETP. This produces more complete and reliable conversion data reaching AWIN, reducing the risk of under-reporting.
Enhanced Data Control for Privacy
You have full control over what information is shared with AWIN. This allows you to enrich, filter, or anonymise data as needed to comply with privacy regulations such as GDPR and CCPA, without relying on a third-party tag running in the browser.
Enhanced Data Control for Conversion Attribution
Rather than leaving attribution decisions to a black-box model, server-side tagging gives you precise control over which channel receives credit for a given conversion. This is particularly valuable for managing affiliate commission calculations accurately and fairly.
Implementation Overview
The implementation follows these key steps:
- Retain Existing Web Tags: Keep all current AWIN web tags active throughout the setup process.
- Create a Cookie Setter Tag in server-side GTM: Set up a cookie setter tag in your Seers server-side GTM container to extend the lifespan of the AWIN attribution cookie beyond the standard JavaScript cookie duration. This is essential for AWIN to correctly identify the acquisition channel for conversions, which directly influences commission calculations.
- Create the server-side Conversion Tag: Build a new conversion tag within server-side GTM. The key technical distinction from a web tag is setting ss=true, which flags the request as server-side and assists AWIN in deduplicating it against web-based conversions. During configuration, set test=true until your setup has been verified, to avoid corrupting live production data.
- Confirm with AWIN: Have your AWIN representative confirm that the setup is functioning correctly. Self-debugging options for AWIN are limited, so direct confirmation from AWIN is recommended.
Final Deployment: Once confirmed, remove test=true and publish all changes.
Step 1: Set Up the AWIN Attribution Cookie Tag
The purpose of this tag is to preserve user touchpoint information from the moment a visitor first lands on your website, all the way through to the conversion event. By running this cookie setter in a server-side context, the cookie benefits from a significantly longer lifespan due to its first-party origin, a key advantage of the Seers server-side GTM setup.
AWIN provides a dedicated tag template for writing an HTTP cookie that stores information about the user's most recent visit source. This could be a Google search, a Facebook referral, an email campaign, or an AWIN channel click. The required tag template can be downloaded directly from AWIN's GitHub repository.
This tag must be configured to fire on every page_view event. The default settings are suitable for most implementations, but pay attention to the following important considerations:
Cookie Lifetime
If your contractual agreement with AWIN specifies a campaign attribution window longer than the standard 30 days, you must update the cookie lifetime in the tag configuration to reflect this extended period. Failing to do so could result in attribution data expiring before a conversion is recorded.
Cookie Name
Make a note of the exact name of the cookie in which the attribution data is stored. You will need to reference this cookie name in Step 2 when configuring the conversion tag.
Attribution Logic
By default, this tag applies a last-click attribution model, which is the most commonly used approach. However, it is possible to override this and implement custom attribution logic. For example, you may want to lock a user's attribution source once they enter the checkout funnel, preserving the original acquisition channel for that critical stage, sometimes referred to as a "cookie switch" or "basket freeze". Implementing custom attribution logic requires careful planning, a more advanced technical setup, and is beyond the scope of this guide.
| A note on consent: For most business models, it is recommended to make the firing of this tag conditional on the user's explicit consent. However, there are specific cases where AWIN's functionality is a core operational requirement for the business. In such situations, consult your legal team and your dedicated AWIN contact to determine whether consent is required. This ensures you remain compliant with data privacy regulations while meeting business-critical needs. |
Step 2: Set Up the AWIN Conversion Tag
This tag is responsible for sending conversion data to AWIN each time a qualifying event, such as a purchase, takes place on your website.
- Obtain the AWIN tag template from the GTM Community Template Gallery and add it to your server-side GTM workspace.
- Create dedicated variables for each of the following parameters and map them in the tag configuration:
- Merchant ID: Found in your AWIN account. Store this as a Constant variable or use a Lookup table if needed.
- Order Reference: This is the transaction ID. Read it from the incoming event data.
- Currency Code: Read from event data, or set statically if your store operates in a single currency.
- Commission Group Code: This can be set to "DEFAULT" or calculated dynamically using a custom template variable based on commission group logic. You can usually derive this from your existing AWIN conversion tag in your web GTM container, or contact your AWIN consultant for guidance.
- Last Paid Click Referring Channel: Read this value from the attribution cookie created in Step 1. Use the exact cookie name you noted during that step.
- Enable the HttpOnly cookie option. This improves security by preventing JavaScript running on your website from accessing the cookie directly.
- Enable test mode by setting test=true. Leave this active until you have successfully completed the quality assurance checks in Step 3.
- Add a conversion trigger, for example, a trigger that fires on a purchase event, to control when the tag activates.
Step 3: Quality Assurance
To test and validate your tags, use the server-side GTM Preview mode alongside AWIN's transaction overview. In your AWIN account, navigate to Navigation Bar > Support > Integration > Tracking Diagnosis to access recent transaction data.
The goal is to confirm that tags fire at the right time and send the correct data. At a minimum, verify the following two scenarios before going live:
Scenario A: AWIN-Based Conversion
- Follow AWIN’s guide to create a test conversion link within your AWIN account and use it to land on your website.
- Navigate through the conversion funnel and verify the following at each stage:
- On the initial page_view event: The AWIN attribution cookie set up in Step 1 should be created. Its value should be AWIN-related, typically "aw".
- On the purchase event: The conversion should be successfully sent to AWIN with accurate attribution information and the same transaction ID used by your web Pixel for AWIN conversions.
Scenario B: Non-AWIN-Based Conversion
- Follow AWIN’s guide to create a test conversion link within your AWIN account and use it to land on your website. Confirm the AWIN attribution cookie is created with an AWIN-related value.
- Before completing the purchase, visit your website again via a different channel, for example, through a Google or Facebook link. On the subsequent page_view, the attribution cookie's value should update to reflect the new, non-AWIN source.
- Complete the purchase and verify the following:
- On the purchase event: The conversion is sent to AWIN with attribution data reflecting the non-AWIN channel, and the transaction ID matches the one used by your web Pixel.
| Note: Self-debugging options within AWIN are limited. If you are uncertain about the results, share the transaction data with your AWIN representative and ask them to confirm the setup is functioning correctly before proceeding to deployment. |
Step 4: Deploy and Monitor
Once all quality assurance checks have passed and your AWIN representative has confirmed the setup, you are ready to go live.
Deactivate Test Mode
Return to your AWIN conversion tag from Step 2 and remove the test=true setting. This switches the tag from test mode to live production mode.
Publish the Container
Submit and publish all pending changes in your server-side GTM container to make the configuration live.
Monitor
Over the following days, keep a close eye on the Tracking Diagnosis section in your AWIN account (Navigation Bar > Support > Integration > Tracking Diagnosis). Check for any reported errors or unexpected discrepancies in conversion data.
Decommission the Client-Side Pixel (Optional)
Once you have confirmed that the server-side implementation is stable and capturing all required conversion data reliably, you may choose to remove the client-side AWIN pixel from your web GTM container. This is optional but recommended, as it reduces the JavaScript load in the browser and delivers the full performance benefits of server-side tagging.