Skip to content
Shopify

What Are Shopify Customer Events (Web Pixels)?

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

Daniil Maximkin Published Reviewed

  1. 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, and a web pixel subscribes to the events it needs. The pixel receives the event name and payload through the Web Pixels API and forwards what it needs onward, across the storefront, checkout, and post-purchase surfaces.

    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, so legacy snippets keep working.

  2. In practice

    Which standard events can a pixel subscribe to?

    Shopify defines a fixed set of standard events, covering the shopping path from page_viewed and product_viewed through cart_viewed, product_added_to_cart, and search_submitted, then the checkout steps.

    The checkout events include checkout_started, checkout_contact_info_submitted, checkout_shipping_info_submitted, payment_info_submitted, and checkout_completed. The post-purchase surface makes the completed order available to subscribed pixels, which is why Customer Events is the supported source for a purchase event.

  3. In practice

    What can a web pixel not access?

    A web pixel cannot read or write the page’s DOM, and it cannot reach the top frame. App pixels run in a web worker where only a documented set of globals is guaranteed; document and window are not available.

    Custom pixels run in a sandboxed iframe that cannot access the top frame, so a property such as the page URL resolves to the sandbox URL instead of the store’s URL. Neither type can scrape the checkout markup for order data; the event payload is the source of truth.

  4. Not to be confused with
    Not to be confused with
    Is notIs
    Google Tag Manager's dataLayerShopify's own event layer

    Customer Events are not Google Tag Manager’s dataLayer, and a web pixel is not a GTM tag: they are Shopify’s own event layer, and adding a script tag to the theme is not how a pixel is installed.

    A custom pixel is also not a theme script. It runs under Shopify’s rules, including consent: web pixels honor the Customer Privacy API, and in regions where consent is required, pixel callbacks run only after the customer consents.

  5. Where to check

    How do I check which pixels are receiving events?

    • Shopify adminSettingsCustomer events

    In Shopify admin, Settings then Customer events lists every pixel on the store and is where custom pixels are added. Logging inside an event subscription in a development store confirms that an event arrives and shows its payload; Shopify’s docs warn against logging in production.

Daniil Maximkin

Hi, I’m Daniil.

I work with you from defining the problem to implementation and handover. You talk to the person who does the work. I work in English and Russian.

What do you need to get working?

Describe your task

The first answer is free, within one working day. Or write directly: next@taskfordaniel.com