Web pixels, conversion tracking and cookies

Hi!

I have an App which deploys a script on all store’s pages (via an embed block).

This script defines a cookie to track the visitor.

Then, after a purchase, on the Thank You page, I get this cookie to send conversion information to an external service. All these actions are done thanks to the “additional scripts” section in the Checkout configuration.

But “addionnal scripts” are being deprecated because of the Checkout extensibility.

I had a look on WebPixels to track the checkout_completed event and I still need to get this cookie. However, WebPixel’s API doesn’t permit to get cookies.

So, here is my question: do you know how I can get the value of my cookie in a WebPixel? Or is there any alternative I could use to properly track conversions?

Thanks a lot

Hi,

You need to pass cookie value through checkout and use webpixel API to track the checkout event.

Hi GuillaumeFg,

Not sure about your use-case, but as far as we know & tested (and per Shopify docs), you can access cookies : https://shopify.dev/docs/api/web-pixels-api/standard-api/browser

If you have more context, let me know…

Hope that helps,

Peter @ Datma - Product analytics & reporting