How to manage cookies from email campaign links to shopify

Hey,

I want to track conversions of certain email campaigns on a public app. Basically if the user clicks on a link through email that takes him to shopify and he decides to purchase something. I want to be able to attach the identifier of the campaign to the order so I can track conversions.

The part I’m not sure about is how I go from attaching cookie to a browser to that cookie being placed on the customer or order object and then fetched from the API or webhooks.

I’d appreciate any help. Thanks.