For discussing the development and usage of Checkout UI extensions, post-purchase extensions, web pixels, Customer Accounts UI extensions, and POS UI extensions
We have a web pixel set up with the following customer privacy settings
[customer_privacy] analytics = false marketing = false preferences = false sale_of_data = "disabled"
Despite this, the web pixel only fires if the cookie consent banner is accepted. Which shouldn't be the case as the docs say:
To configure a pixel to run without requiring consent (strictly necessary / essential), set the above purposes to false
Is there an issue with web pixels here?
Hi Mattdenoronha - you have the `toml` settings for the app pixel set up correctly. It's possible that your app pixel isn’t properly subscribed to events or the cookie banner is a 3rd party system that is blocking the pixel.
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Hi Liam,
Thanks for your reply.
We've tested this with just logging something to the console, both inside and outside events. The cookie banner is the default one that appears after enabling it in Shopify.
On pageload, no events are triggered and nothings logged to console. As soon as the cookie banner is accepted, the test message is logged and events work again. Despite the privacy settings we've set.
learning-development-store.myshopify.com is our test store. The web pixel should log 'CM Init' on load, but waits for cookie banner approval.
We may have found the cause. On running app dev and opening the app, the extension reverted back to requiring 'marking' and 'analytics' permissions - which I believe is the default.
We do also try to readd the extension on first accessing the app, which intentionally fails as the extension already exists. Not sure if this reverts the permissions, but I doubt it.
We need to stop the dev app running and redeploy the app to return the permissions back to those set in the TOML (although may not need the redeploy, this might just speed it up).
Not sure if the above is expected behaviour - that the development app versioning running should change the extension's permissions?
@Liam
Hi Matt - I have connected with our internal dev team on this and they're looking into this!
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Hey Liam, any update on where this is with the internal dev team? We'd like to start testing as we prepare to move our app away from script tags ASAP ahead of script tags being deprecated.
Based on our tests, if cookie consent is rejected then the Web Pixel API won't load at all. Which means, it will not trigger any event you're subscribed to.