Shopify Web Pixels API: Plain-English Guide for Marketers in 2026

Shopify Web Pixels API: Plain-English Guide for Marketers in 2026

TL;DR

Shopify replaced direct JavaScript injection into checkout.liquid with a sandboxed Web Pixels API a few years ago. Today, every Shopify store, including those on Checkout Extensibility, uses this API as the only supported way for tracking tools to fire on the storefront and checkout [1]. There is a fixed list of standard events (page_viewed, product_viewed, add_to_cart, checkout_started, checkout_completed, and a few more) that Shopify emits on your behalf. App pixels and custom pixels both subscribe to these events. Anything beyond the basics, server-side forwarding, deduplication across browser and server, customer matching for Meta CAPI or Google Ads, requires either a developer or a Shopify app that handles it for you.


What the Web Pixels API Actually Is

A "pixel" is the marketing term for a small piece of code that fires when a shopper does something on your store. Add to cart, view a product, complete checkout. The pixel sends that event to a tracking destination: Meta, Google, TikTok, your analytics tool.

The Web Pixels API is Shopify's official, sandboxed way for those pixels to listen to what shoppers do [1]. Instead of pasting raw JavaScript into your theme or checkout files, tracking tools register themselves with Shopify, get a controlled set of customer events delivered to them, and run inside a sandbox that prevents them from reading arbitrary cookies, DOM elements, or other scripts running on the page [1].

The practical translation: the Web Pixels API is the doorway. Every modern tracking tool on Shopify, whether installed as an app or pasted in as custom code, walks through it.


Why Shopify Built It (and Why It Matters to You)

Before Checkout Extensibility, merchants could paste any JavaScript they wanted into checkout.liquid. Tracking apps did this. So did many smaller scripts. The problem: any script that loaded in checkout could read everything else on the page, including form fields, cookies, and other scripts. A bug in one tracking app could break the checkout for every shopper. A bad actor in any script could read payment fields.

Shopify's response was to lock checkout down and route all tracking through the Web Pixels API. Pixels now run in one of two sandboxes (lax or strict, depending on whether they are app-installed or merchant-installed), with limited and well-defined access to the page [1]. That makes checkout safer and more predictable for shoppers, and it makes tracking outages easier to diagnose for you.

The trade-off is that some old workflows no longer work. If you previously had a developer paste a custom snippet into your checkout, that snippet had to migrate to the pixel manager (or to an app pixel). The deeper migration story is covered in our checkout extensibility article.


What Events the Web Pixels API Fires

Shopify maintains a fixed list of standard events that fire automatically across the storefront, cart, and checkout. As of 2026 these are [2]:

Event When it fires
page_viewed Any storefront page view
product_viewed Product detail page view
collection_viewed Collection/category index page view
search_submitted A storefront search query
product_added_to_cart An item added to cart
product_removed_from_cart An item removed from cart
cart_viewed The cart page is visited
checkout_started The shopper begins checkout
checkout_contact_info_submitted Contact info entered
checkout_address_info_submitted Shipping/billing address entered
checkout_shipping_info_submitted A shipping rate is selected
payment_info_submitted Payment info submitted
checkout_completed The order is placed

Each event carries a structured payload: cart state, line items, totals, the customer object if a customer is logged in or has entered contact info. The exact fields depend on the event, but the API is consistent enough that a single pixel can subscribe to all events using the helper all_standard_events and handle the fan-out itself [1].

You can also create custom events (your own named events that fire from theme or app code) and subscribe to those. Custom events are not used by most marketers; they exist for advanced workflows like custom funnel steps.


App Pixels vs Custom Pixels

This is the most important distinction for a marketer to understand. Both subscribe to the same events. They differ in how they are installed, how strict the sandbox is, and how much developer effort they need.

App pixels are installed from the Shopify App Store as part of a marketing or analytics app [3]. They run in a strict sandbox and update automatically when the app developer ships changes. You enable them by installing the app and granting permissions. The Facebook & Instagram channel, the Google & YouTube channel, and tracking apps like WeltPixel Conversion Tracking all use app pixels.

Custom pixels are added manually in your Shopify admin under Settings > Customer events [3]. They run in a lax sandbox (somewhat more permissive than strict, to let merchants paste in vendor-provided snippets that need a bit more access). You write or paste in raw JavaScript that subscribes to events. The pixel manager interface gives you a code editor and a connection-status indicator.

Shopify's own recommendation, in their Help Center, is that when an app pixel exists for your tracking destination, use the app pixel [3]. App pixels are safer, get updated automatically, and don't need a developer to maintain. Reach for a custom pixel only when no app pixel covers your need, or when you have a specific reason to write your own.


What You Can Do Without Writing Code

If you are not a developer, here is what is doable from the Shopify admin alone:

  1. Install app pixels for your tracking destinations. Search the App Store for your platform (Meta, Google, TikTok, a multi-platform app like WeltPixel Conversion Tracking). Install the app. Connect it to your ad account. Done.
  2. Manage permissions. Each pixel declares which customer privacy purposes it uses (analytics, marketing, personalization). You can adjust which pixels are allowed under which consent purposes inside the Customer Events section, so a shopper who declined marketing cookies has the relevant pixels silenced automatically.
  3. Check connection status. The Customer Events page shows you which pixels are connected and when they last fired. If something stops working, this is the first place to look.
  4. Disconnect a pixel. One click in the admin removes it from your store and stops it from receiving events.

That covers the vast majority of what most Shopify merchants need to do day-to-day. You do not need a developer to install pixel-based tracking for the major platforms.


What You Actually Need a Developer or App For

The Web Pixels API gives you a clean stream of browser-side events. Several practical needs fall outside that scope, and those are what apps (or developer time) solve:

  • Server-side forwarding to ad platforms. Meta CAPI, TikTok Events API, and Google Ads Enhanced Conversions are all server-to-server channels. The Web Pixels API runs in the browser. To send events server-side and recover the share that ad blockers and Safari ITP suppress, you need a layer that reads the order from Shopify's server (via the Order webhook) and forwards it to each platform with proper deduplication. See our server-side GA4 article.
  • Event deduplication across browser and server. When the browser pixel and a server-side event both send the same purchase, you don't want it counted twice. Both events need to carry the same event_id so the destination merges them. Shopify provides the checkout event.id to all subscribers, which makes this possible, but the second-leg server forwarder has to use the same value.
  • Customer matching for Meta CAPI. Hashed email, phone, address, and Facebook click ID are sent in the server-side Purchase event to boost match quality. See our Meta EMQ article for the full breakdown.
  • Multiple pixels per channel. A typical Shopify Plus merchant runs 2-3 Meta Pixels for different campaigns or agencies. The native Facebook & Instagram channel doesn't natively support multiple pixels. See our multi-pixel article for when this is needed.
  • Shop Pay coverage. The Shop Pay checkout flow has its own gotchas. The Web Pixels API fires checkout_completed for Shop Pay orders, but how that maps to your tracking depends on the destination. See our Shop Pay tracking article for the details.

How Third-Party Tracking Apps Plug In

When you install a marketing or analytics app from the Shopify App Store, it registers an app pixel under the hood. From your perspective, you grant the app permission to track customer events. From Shopify's perspective, the app is now subscribed to the standard events list and can react to them in real time.

What each app does with those events differs. A good tracking app handles a few things at once: subscribing to every relevant customer event, attaching the necessary browser context, and forwarding events server-side to GA4, Meta, TikTok, and Google Ads in the right format for each platform's deduplication rules. That last part is the meaningful difference between apps. The Web Pixels API gives every app the same starting point. What separates a well-built tracking app from a barely-functional one is what it does with the events after it receives them.

WeltPixel Conversion Tracking is built around this principle. It receives the full standard event stream, gathers the additional identifiers each ad platform's server-side API expects, and forwards purchases to GA4, Meta CAPI, TikTok Events API, and Google Ads with deduplication handled automatically against the corresponding browser pixel. The complexity stays inside the app; from your perspective it is one install in the App Store and a few minutes of connecting accounts.


Key Takeaways

  • The Web Pixels API is Shopify's official, sandboxed interface for tracking and analytics tools to subscribe to customer events on the storefront and checkout [1]. Every Shopify store has it active.
  • It replaced direct JavaScript injection into checkout.liquid. Today, no tracking code runs during or after checkout outside this API.
  • Shopify maintains a fixed list of standard events (page_viewed, product_viewed, product_added_to_cart, checkout_started, checkout_completed, and several more in between) that fire automatically [2].
  • App pixels (installed from the App Store) run in a strict sandbox. Custom pixels (added in admin) run in a lax sandbox. App pixels are the recommended path when one exists for your tracking destination [3].
  • The Customer Events page in your Shopify admin is where you manage every connected pixel, see when it last fired, and adjust consent permissions.
  • The Web Pixels API itself is browser-side. Server-side forwarding to Meta CAPI, TikTok Events API, and Google Ads Enhanced Conversions still requires an app or developer that reads the Order webhook and forwards events with consistent event_id for deduplication.

Get Full Web Pixels API Coverage With WeltPixel Conversion Tracking

If you want a tracking app that subscribes to every Web Pixels API standard event, captures the necessary identifiers from the storefront, and forwards them server-side to GA4, Meta, TikTok, and Google Ads with deduplication handled automatically, Install WeltPixel Conversion Tracking installs in around 15 minutes.

You do not need to know how the sandbox works. You install the app, grant the permissions, and the events start flowing.


FAQ

Do I need to install the Web Pixels API on my store?

No. The API is part of Shopify itself. Every Shopify store already has it active on the storefront and checkout. What you install are pixels that subscribe to it, either as app pixels from the App Store or custom pixels you (or a developer) add in the admin.

Where do I see pixels in my Shopify admin?

Settings > Customer events. That page lists every connected app pixel and custom pixel, shows when each one last fired, and lets you enable, disable, or adjust permissions [3].

What is the difference between a Web Pixel and a Web Pixel API?

The API is Shopify's interface. A Web Pixel is a piece of code that uses the API to subscribe to events. Marketers usually refer to either one as "the pixel" in conversation, and it almost never matters which is meant.

Can I still paste tracking code into my theme directly?

You can paste code into your theme's storefront templates (header, footer, product pages) for tracking that fires before checkout, but anything that needs to fire during or after checkout has to go through the Web Pixels API now. For most modern tracking platforms, the right path is an app pixel from the App Store, not a theme paste.

Will the Web Pixels API capture Shop Pay orders?

The checkout_completed event fires for Shop Pay orders too. The wrinkle with Shop Pay is on the destination side: how each ad platform attributes a Shop Pay purchase depends on its own deduplication and consent logic. The Shop Pay tracking article covers this in detail.


Read next


Sources

  1. Shopify Developers, "Web Pixels API": https://shopify.dev/docs/api/web-pixels-api
  2. Shopify Developers, "Web Pixels API Standard Events": https://shopify.dev/docs/api/web-pixels-api/standard-events
  3. Shopify Help Center, "Pixels": https://help.shopify.com/en/manual/promoting-marketing/pixels

Ready to upgrade your tracking?

Server-side tracking for Magento and Shopify — accurate data, better attribution, full privacy compliance.