Pixel Privacy
In order to comply with international privacy regulations, Shopify provides a way for merchants to manage their pixels and the data they collect. This guide will help you understand how to set up customer privacy settings for App and Custom pixels, and how to use the customerPrivacy API to manually handle pixel privacy behavior.
Anchor to app-pixels-privacy-settingsApp Pixels Privacy Settings
When creating app pixels, you can define the customer privacy settings that your pixel requires within your shopify.extension.toml
file. Shopify's pixel manager will only load your pixel if there is visitor permission for all of the settings that your pixels declares as required. For more information, visit the App Pixel Tutorial documentation.
App Pixels Privacy Settings
Shopify.extension.toml
Anchor to custom-pixels-privacy-settingsCustom Pixels Privacy Settings
When creating custom pixels, you can define the customer privacy settings that your pixel requires directly within the user interface. For more information please visit the Custom Pixel documentation.

Anchor to customer-privacy-apiCustomer Privacy API
Shopify provides Standard APIs to allow pixels to query the initial customer privacy permissions on a page and listen to any subsequent updates to consent. To query the initial customer privacy permissions, use the API. You may assign this value to a variable to keep track of it throughout the lifecycle of your pixel. If consent changes without a page refresh (i.e. customer provides consent through a banner), you can adjust this value using the
Standard API. This API allows you to subscribe to the
event and apply any changes when consent is given. Using these APIs, you can manually handle any privacy related behavior inside a pixel sandbox.
Presently, the only event available for the API is
. This is the only string that will be accepted for now.