AWIN Issues with Server to server cookie: The first-party cookie could

Hi Alex,

Thanks for responding to my comment on the blog post (Set up Awin Server-Side Tracking | Stape)

To continue here, my issue is that even though AWIN purchase tag is firing on thank you page, the cks parameter is always missing and the AWIN testing section says “Issues with Server to server cookie: The first-party cookie could not be found.”

I can see the aw cookie being set on server side when the user first lands, but it isn’t read when the purchase event it fired. Also when I check Variables, the ServerChannelCookie is always undefined.

I noticed someone else had the exact issue: AWIN "Issues with the Server-to-Server Cookie"

Which they resolved using method that you said potentially wasn’t optimal.

Solved here.

Problem: forwarding cookies to sGTM on Shopify Checkout, which uses a sandboxed iframe to fire the tags.

Summary:

  • Forward the cookies using a tag parameter, such as GA4 Tag or Stape’s Data Tag. The latter even supports this natively, it has a checkbox that you can tick, and it’ll forward the most common cookies as parameters.
    Then, on sGTM, you can use these parameters on the server tag.
  • Add SameSite=None and Secure flags to cookies. Although it’s not durable and not major supported by all browsers.

Thanks Giovani, I’m the same guy from the Githut pull request :slight_smile: I’ve also submitted the pull request on the ServerAwinChannelCookie tag but it hasn’t been accepted yet.