Definition
Shopify Customer Events are the standardized behavioral events — such as product_viewed, product_added_to_cart, and checkout_completed — that a Shopify store publishes to its own data layer, which web pixels subscribe to and forward to analytics or marketing endpoints.
A web pixel is JavaScript registered on the store that runs inside a Shopify-managed sandbox rather than in the page's own JavaScript context. Shopify exposes the same event stream across the storefront, checkout, and post-purchase surfaces, so a pixel can receive checkout events that theme code never sees.
- shopping path
- page_viewedproduct_viewedcart_viewedproduct_added_to_cartsearch_submitted
- checkout events
- checkout_startedcheckout_contact_info_submittedcheckout_shipping_info_submittedpayment_info_submittedcheckout_completed
- In practice
How do Customer Events and web pixels work?
Shopify publishes customer events to its own data layer as a visitor moves through the store. A web pixel subscribes to the events it needs, receives the event name and payload through the Web Pixels API, and forwards the required data to its destination.
App pixels are web pixel app extensions installed by apps and run in a strict sandbox built on a web worker. Custom pixels are merchant-added and run in a lax sandbox: an iframe with script and form permissions. That does not guarantee compatibility with an existing tracking snippet. Shopify documents a GTM implementation inside a custom pixel, while Google does not support Google tags or GTM inside that sandbox and recommends its Google & YouTube app for Shopify measurement.
- In practice
Which standard events can a pixel subscribe to?
The standard events cover the shopping path from page_viewed and product_viewed through cart_viewed, product_added_to_cart, and search_submitted. The checkout events include checkout_started, checkout_contact_info_submitted, checkout_shipping_info_submitted, payment_info_submitted, and checkout_completed.
Shopify documents checkout_completed as firing once per checkout, normally on the Thank you page. If the checkout includes a post-purchase upsell, it fires on the first upsell offer page instead and does not fire again on the Thank you page. If the page where it should fire fails to load, the event does not fire. A browser event is therefore not a complete ledger of orders; reconcile received purchases against the store’s orders before treating a missing event as a missing sale.
- In practice
What can a web pixel not access?
App pixels cannot access the storefront DOM through document or window because they run in a web worker. Custom pixels have their own iframe environment but cannot read the top frame’s DOM. Neither can scrape checkout markup for order data; use the documented event payload.
Reading window.location inside a custom pixel returns the iframe’s location. Read the storefront URL from event.context.window.location.href or event.context.document.location.href instead. This context is a read-only snapshot supplied with the event, not permission to access the live storefront DOM.
Not to be confused with
Not to be confused with Is not Is Google Tag Manager's dataLayer Shopify's own event layer Customer Events are not Google Tag Manager’s dataLayer: they use Shopify’s own event layer. A web pixel is also not installed by adding a script tag to the theme.
A custom pixel is not a theme script. Shopify checks the privacy requirements configured for each pixel against the visitor’s permissions. Whether that pixel can load depends on those requirements and permissions; it is not a universal rule that every pixel waits for every type of consent.
- Where to check
How do I check which pixels are receiving events?
- Shopify adminSettingsCustomer events
In Shopify admin, open Settings > Customer events to inspect registered app pixels and custom pixels. This list does not inventory every tracking script in the theme or elsewhere. In a development store, log inside an event subscription to confirm the event and its context; Shopify warns against logging in production. For checkout_completed, test the page where it is expected to fire, then check the outgoing request and its receipt at the destination.
If a connected pixel appears silent or GTM Preview is empty, use the custom pixel / GTM diagnostic to distinguish an inspection limitation from the first broken event handoff.
- Sources