Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

How to pass browser cookies for attribution to order creation webhook

How to pass browser cookies for attribution to order creation webhook

jahilldev
Shopify Partner
26 1 11

We're in the process of providing affiliate offers for some of our products. In order to attribute the referral, we need to collect a cookie containing a token from the customers browser, and then use that token value to send off to a third party API to attribute the affiliate purchase during the order create webhook request.

 

I've seen a few mentions of providing webhooks with metafields, but I'm unsure how to connect the dots so that this cookie value is stored as a metafield for that order.

 

What are others doing in similar situations?

 

We have a custom app that subscribes to cart, checkout and order webhooks. So a combination of those should get me pretty close. 

 

Many thanks.

Replies 0 (0)