About Tracking

Ad Platform Tracking

Meta Pixel + CAPI TikTok CAPI LinkedIn CAPI Snapchat CAPI Pinterest CAPI Quora Pixel Bing + UET Tag

Google Ecosystem

Google Ads Tracking GA4 Setup & Audit Google Tag Manager

Advanced Solutions

Server-Side Tracking Looker Studio Offline Conversion
Case Studies Blog Free Checklist Book Free Audit →

The Shopify Web Pixel API is the technology behind Shopify’s Customer Events system. It is the approved way to run tracking code during checkout — including on the order confirmation page — after Shopify removed the ability to inject scripts directly into checkout.liquid.

If you have been struggling to get purchase events firing reliably on your Shopify store since the checkout extensibility update, understanding the Web Pixel API will tell you why previous solutions stopped working and how to fix them properly.

What Is the Shopify Web Pixel API?

The Shopify Web Pixel API is a framework that allows third-party tracking code to run inside a sandboxed environment during checkout. Instead of your tracking script running directly on the checkout page (which Shopify now blocks for security and performance reasons), it runs inside a Web Worker — an isolated browser thread — that Shopify controls.

When Shopify detects that a customer completes a purchase, it passes the order data to your Web Pixel through a secure event system. Your code then reads that data and fires your tracking calls (GA4, Meta Pixel, TikTok, etc.).

Why Shopify Moved to This System

The old checkout.liquid approach allowed any script injected by a merchant to run with full access to the checkout page. This created three problems:

The Web Pixel API solves all three by running tracking code in isolation, with no access to the main checkout DOM, and in a way that cannot block or slow down the checkout experience.

How Customer Events Uses the Web Pixel API

When you create a Custom Pixel in Shopify Admin → Settings → Customer Events, Shopify provisions a Web Pixel container for your code. Your pixel subscribes to events like checkout_completed, cart_viewed, and product_added_to_cart. When those events occur, Shopify calls your subscriber function with the event data.

Example event data from checkout_completed:

Your tracking code reads these values and fires events to GA4, Meta, TikTok, or any other platform you need to track.

Which Events Are Available in the Web Pixel API

Shopify exposes the following standard events through the Customer Events system:

The checkout_completed event is the critical one. It replaces the old thank you page script trigger for purchase tracking.

Do You Need to Write the Web Pixel Code Yourself?

Not for standard platforms. Meta, TikTok, Google, and most major tracking platforms have already updated their official Shopify apps to use the Web Pixel API. When you install their app and it is up to date, the Customer Events pixel is created automatically.

You only need to write custom Web Pixel code if you are:

Checking Whether Your Apps Are Using Web Pixel API

Go to Shopify Admin → Settings → Customer Events. Any app that has been updated to use the Web Pixel API will appear here as an active pixel. If Meta, TikTok, or Google do not appear in this list but their apps are installed, their apps have not been updated and are using the old checkout.liquid injection method.

In that case, updating the app or reinstalling it is usually sufficient to provision the Web Pixel connection.

Get Your Shopify Tracking Updated to Web Pixel API

If your purchase tracking dropped after a Shopify update, or if your tracking apps do not appear in Customer Events, a tracking audit will tell you exactly what is using the old method and what needs to be migrated.

Book your free Shopify tracking audit here. We check every tracking implementation against what the Web Pixel API requires and fix any gaps.

Leave a Reply

Your email address will not be published. Required fields are marked *