Checkout Extensibility Upgrade AMA: Custom Web Pixels with Domaine

Hey Wayne_Foster,

Glad to hear you’re getting some value out of the discussion! :slightly_smiling_face:

  1. You can use the Shopify CLI to scaffold and deploy app pixels (https://shopify.dev/docs/apps/build/marketing-analytics/build-web-pixels), but Shopify has no plans to extend this functionality to custom pixels.
  2. Google is migrating their native app to web pixels and will support cookiless pings. Timeline is completion by end of August. Today, the Google app will send consent mode v2 in regions where consent is required based on your customer privacy configurations and consent is given. It does not support the cookieless ping.
  3. Location and referrer can be gleaned through these data points on the event: ‘page_location’: event.context.window.location.href, ‘page_referrer’: event.context.document.referrer
  4. Shop.pay redirects to the /thank-you page on which the checkout_completed event fires.
  5. It is recommended that you implement the pixel snippet within a custom pixel, and then publish new events from your theme code, and subscribe to those events within the custom pixel. I give an example of this in my video at the top of this thread. :slightly_smiling_face:
  6. Yes, custom pixels can set/get cookies, as well as interact with local storage on the top level frame (https://shopify.dev/docs/api/web-pixels-api/standard-api/browser).
  7. I’m not entirely sure what you’re asking here, but I’ll take a stab at an answer: you can run the same pixel through both a legacy (theme code) implementation and new custom pixel implementation and they will both submit data, but then you will be double-tracking that data. If you are manipulating a cookie from both sides you will likely end up with a race condition. I would strongly advise against using both implementations of a single pixel.
  8. If they are in a cookie, you can read that cookie, but I would recommend looking at Shopify’s Customer Privacy API, which provides this hookup out of the box. You can use their cookie consent banner or another 3P that is integrated with this API without having to set up any complex conditions (just set the type of pixel within the pixel settings).
  9. I cannot speak to the platform as a whole, but at Domaine we’ve moved about 95% of our clients fully off of checkout.liquid.
  10. Again, I cannot speak for Shopify, but I would say that this decision was not about adding another layer of security around payment, but instead it is a move to protect a shop’s data from potential bad actors in that pool of 3P integrations. By limiting their access to data, DOM scraping, etc, and placing them within an iframe, they are no longer able to inject code or grab on-site information, which in the worst cases, could be malicious.
  11. App pixels are slightly different in that they are run off the main thread using web workers. This doesn’t change anything with regards to their access to data, but it does mean they will make your shop more performant if you have a lot running on your checkout.
1 Like