AWIN "Issues with the Server-to-Server Cookie"

We got it working now. To put it simply, the problem was that server side tracking “couldn’t keep up” with determining and setting the appropriate channel information.

This particularly affected new visits or visits for which no server side cookie had yet been set, but also all visits with an existing server side cookie if the new entry resulted in a change of channel assignment - e.g. first entry via SEA, further entries via Direct, then later again via AWIN or in any other order…

To be honest, I can’t understand how this is supposed to work with other advertisers. On the one hand, server-side tracking is so fast that the hit has already been fired long before any data is exchanged with the client. On the other hand, the writing process of the cookie with the channel value is extremely delayed - we are talking about at least three to six seconds!

I decided on a solution based on the supposedly faster initial channel assignment on the client side. In principle, this now works in such a way that the client container makes the channel assignment for AWIN BEFORE sending the GA4 base tag to the server container and then sends it along as the “awin_channel” event parameter. The server container now takes this value directly from the event data of the incoming event and uses it DIRECTLY for the AWIN tracking hit.

To make this work, we changed the trigger for the client-side “Last Click Identifier” so that it is fired before the GA4 base tag. Unfortunately, selecting the same “Consent Initialization” level and setting the priority to 9 did not work straight away. That’s why we also set the GA4 Base Tag to fire the identifier immediately beforehand.