Skip to content

AWIN

This guide provides a step-by-step approach to setting up Google Ads Conversions and Google Ads Remarketing using server-side Google Tag Manager.

Prerequisites

Before you begin, ensure you have the following:

  • AWIN: Access to an AWIN account. This is optional but will be useful for testing events.

    Learn how to share access here.

  • AWIN Conversion Info, specifically:

    • Merchant ID

    • Commission Group Code

    • Regular conversion info such as price, transaction ID, currency

  • Web Google Tag Manager (GTM): Access to a web GTM container that is already implemented on your website and sends GA4 events to the server-side GTM.

    Learn how to share access to a GTM container here.

  • Server-side GTM Container: A server-side GTM container provisioned by  Usercentrics, available via a first-party endpoint, and configured to process GA4 page_view and conversion events.

    Learn how to set up a server-side GTM provided by Usercentrics here and learn how to share access to a GTM container here.

Benefits of Server-Side Tagging with AWIN

  • Improved Data Accuracy: Server-side tagging bypasses ad blockers and browser privacy restrictions (like Safari's ITP or Firefox's ETP), resulting in more reliable and complete conversion data.

  • Enhanced Data Control for Privacy: You decide exactly what data to share with AWIN, allowing you to enrich or anonymize information to comply with privacy regulations (GDPR/CCPA).

  • Enhanced Data Control for Conversion Attribution: You control exactly which channel receives the attribution for a given conversion and not a black box attribution model.

Rollout plan

To implement AWIN conversion tracking in sGTM, follow these steps:

  • Retain Existing Web Tags: Keep all current AWIN web tags active.

  • Create Cookie Setter Tag in server-side GTM: Implement a cookie setter tag in server-side GTM to extend the AWIN cookie's lifespan beyond the standard JavaScript cookie duration. This is crucial for AWIN to accurately determine the acquisition channel for conversions, influencing commission calculations.

  • Develop sGTM Conversion Tag: Create a new tag for conversions within sGTM.

    • The only technical difference from a web tag is setting ss=true. This indicates a server-side request, aiding in deduplication with web-based conversions.

    • Initially, set test=true until your configuration is verified to prevent corrupting production data.

  • Confirm AWIN data: Have your AWIN representative confirm the setup's functionality, as self-debugging options are limited.

  • Final deployment: Once confirmed, remove test=true and deploy all changes.

These steps are explained in the following sections.

Flowchart illustrating user consent, pageview, and conversion events in tracking system.

The primary objective of this tag is to ensure the persistence of crucial user touchpoint information originating from an AWIN channel. This persistence is maintained from the user's initial landing page all the way through to the conversion event page. A significant advantage of employing server-side GTM for this purpose is the enhanced lifetime of the cookie, due to its first-party context, as further explained here.

To achieve this, AWIN offers a specialized tag template designed to write an HTTP-cookie. This cookie then stores vital information about the user's last visit source, which could be anything from a Google search, a Facebook referral, an email campaign, or an AWIN channel itself. The necessary tag template can be downloaded directly from the following GitHub repository here.

Crucially, this tag needs to be configured to fire on every single page_view event. The remaining configuration of this tag is generally straightforward, as its default settings are well-suited for most use cases. However, there are a couple of key considerations:

  • Cookie Lifetime: If your contractual agreement with AWIN specifies a campaign duration exceeding the standard 30 days, it is imperative to adjust the cookie's lifetime to match this extended period.

  • Cookie Name: It is crucial to make a note of the exact name of the cookie in which the attribution data is being stored. This cookie name will be a required input for subsequent steps, specifically in Step 2.

  • Attribution Logic: By default, this tag enforces a last-click attribution model. While this is a common and often effective approach, it is possible to override this default and implement a custom attribution logic. For instance, you might choose to prevent changes to a user's attribution once they have entered the checkout funnel, thereby preserving the initial attribution source for that critical stage (so-called “cookie switch” or “basket freeze”). However, implementing such custom logic demands careful consideration, a sophisticated technical setup, and generally extends beyond the scope of this particular article.

A note on consent

Regarding user consent for this tag, the general recommendation for most business models is to precondition the firing of this tag on the user's explicit consent. Nevertheless, there are specific exceptions where the functionality provided by AWIN is an indispensable requirement for the core operation of the business. In such cases, it is strongly advised to consult with your legal advisors and your dedicated AWIN contact person to determine the necessity of obtaining user consent. This ensures compliance with relevant data privacy regulations while also fulfilling business critical needsCreate a Unique Event ID Variable.

Step 2: Set up the AWIN Conversion Tag

This tag's purpose is to communicate conversion information to AWIN.

  1. Obtain the AWIN tag: Get it from the GTM gallery.

  2. Fill in parameters: Create dedicated variables for the following:

    1. Merchant ID: Found in your AWIN Account (use a constant or Lookup table).

    2. Order References: This is the transaction ID, read from event data.

    3. Currency code: Read from event data or set statically in case you only sell in one currency

    4. Commission Group Code: Can be "DEFAULT" or a custom template variable that calculates commissions per group. You can typically derive this logic from your AWIN conversion tag in the web GTM or contact your AWIN consultant.

    5. Last Paid Click Referring Channel: Read from the cookie created in Step 1.

    6. Activate "HttpOnly" cookies: This enhances security as it restricts potential Javascript running on your website from accessing the cookie.

  3. Initially enable test mode. Disable it after successful debugging (see Step 3).

  4. Add a conversion trigger such as a purchase event.

Step 3: Quality assurance

To effectively test and debug your tags, utilize the server-side GTM's Preview Mode and AWIN’s overview of the most recent transactions available. To get to this overview go to Navigation Bar - Support - Integration - Tracking Diagnosis.

This step will ensure that tags fire at the correct time and transmit the expected data, preventing discrepancies and ensuring accurate campaign measurement. At least, verify the following scenarios:

  1. AWIN-based conversion

  2. Create a test conversion link within your AWIN account (here’s how).

  3. Navigate through the conversion funnel on your website, confirming:

    • On the initial page_view event, the AWIN attribution cookie that you set up in Step 1 needs to be created. The value should relate to AWIN (typically “aw”).

    • Upon the purchase event, the conversion is successfully sent to AWIN, including accurate attribution information and an identical transaction ID used by your web pixel for AWIN conversions.

  4. Non-AWIN-based conversion

  5. Create a test conversion link within your AWIN account (here’s how).

  6. Navigate through the conversion funnel on your website, confirming:

    • On the initial page_view event, the AWIN attribution cookie that you set up in Step 1 needs to be created. The value should relate to AWIN (typically “aw”).

    • Before completing the purchase, visit your website via an alternative channel (e.g., Google or Facebook). The subsequent page_view event should change the AWIN attribution cookie's value to a non-AWIN-related one.

    • Upon the purchase event, the conversion is successfully sent to AWIN, including the attribution info stating something else than AWIN and an identical transaction ID used by your web pixel for AWIN conversions.

Step 4: Deploy and monitor

Once you've confirmed everything works as expected, you can go live.

  1. Deactivate Test Mode: Go back to your AWIN conversion tag from Step 2, deactivate test mode, and finally publish the setup.

  2. Publish Container: Submit and publish the changes in your server-side GTM containers.

  3. Monitor: Keep an eye on the Tracking Diagnosis in AWIN over the next few days to monitor for any reported errors.

  4. Decommission Client-Side Pixel (Optional): After validating that the server-side implementation is stable and capturing all required data, you can remove the client-side pixel from your Web GTM container to gain the full performance benefits.