Shopify App Pixels vs Custom Pixels, Explained
What are app pixels and custom pixels in Shopify?
In Shopify, app pixels and custom pixels both live under Settings, Customer events, and both run on your storefront, checkout and Thank you page. App pixels come with apps such as Facebook & Instagram and run in a strict sandbox; custom pixels are code you paste yourself and run in a looser one. Both wait for the consent they require.
Customer events replaced the places merchants used to paste tracking snippets, such as the online store preferences, checkout scripts and apps, with pixels that run in a sandbox (pixels overview). Three changes in the past year make the choice matter more: Additional scripts stopped running on the Thank you page, app pixels moved to Optimized data access by default, and Shopify stopped setting its _shopify_y cookie. Every Shopify detail below was checked on 24 September 2026.
Which should you use?
An app pixel from the platform’s own app whenever one does what you need: Shopify recommends app pixels where possible, for their security and automatic updates (pixels and customer events). Write a custom pixel only when no app fits, knowing that Shopify doesn’t support custom pixels (custom pixels).
| App pixel | Custom pixel | |
|---|---|---|
| Added by | An app or sales channel you install | You or your developer, in Customer events |
| Sandbox | Strict: a web worker limited to Shopify’s APIs | Lax: an iframe that can load a vendor’s script but can’t reach your page |
| Page access | None: its data comes from Shopify’s events | None: the address it sees is the sandbox’s |
| Consent permissions | Set by the app’s developer; you can view them but not change them | Yours to set; a new pixel requires Marketing and Analytics |
| Data access setting | Optimized by default for marketing pixels, or Always on | None in Shopify’s custom pixel docs |
| Server pixels | Some apps can add them | No |
| Runs on | Storefront, checkout, Thank you and Order status pages; customer account pages only with a custom subdomain | The same |
| Support | The app’s developer | You: Shopify doesn’t support it |
Sources: Shopify’s pages on app pixels and managing custom pixels, and shopify.dev’s web pixels guide.
A platform’s own app covers one platform. To send to several from one app, a tracking app does the job. cPixel, which we build, adds a single app pixel, cPixel, which fires the Meta, GA4 and Google Ads events in the browser; its optional app embed loads the other platforms’ tags on storefront pages. Its purchases for Meta, TikTok, GA4, ChatGPT Ads, Pinterest and Snapchat go from its own servers, built from Shopify’s order webhooks rather than through a server pixel: how cPixel sends server-side events. More about cPixel, which sends Shopify purchases to seven ad platforms.
How do you add a custom pixel?
Write plain JavaScript, add it under Settings, Customer events, choose its privacy settings, then connect it. It collects nothing until your code subscribes to Shopify’s events.
- Remove any existing copy of the same pixel from your theme or anywhere else it still runs, or its events count twice.
- From your Shopify admin, go to Settings → Customer events, name the pixel and click Add pixel.
- Under Customer privacy, set Permission (Required for the purposes you pick, or Not required) and Data sale. A new custom pixel requires Marketing and Analytics permission and counts as data sale by default (custom pixel code).
- Paste your code into Code. The sandbox runs JavaScript only, so remove
<script>tags and load the vendor’s script with code instead. - Click Save, then Connect pixel, and confirm with Connect.
A custom pixel follows the same shape whatever the vendor: load the SDK, then pass Shopify’s events to it.
// Load the vendor's SDK with JavaScript: the sandbox rejects HTML
const script = document.createElement("script");
script.setAttribute("src", "https://vendor.example/sdk.js");
script.setAttribute("async", "");
document.head.appendChild(script);
// Pass Shopify's standard events to it
analytics.subscribe("checkout_completed", (event) => {
const checkout = event.data.checkout;
// Call the vendor's purchase function here, with values such as
// checkout.order?.id, checkout.totalPrice?.amount and checkout.currencyCode
});
For a full worked example, see how to track ChatGPT Ads conversions on Shopify with OpenAI’s pixel.
What can’t a pixel do?
Anything that needs the page itself. A pixel can’t draw on the page or read it, so scraping details from the page, outbound-click and scroll tracking, and heatmaps don’t work in either sandbox (sandbox limitations).
-
Show anything. No buttons, forms, banners or modals. Content for the Thank you page belongs in an app block.
-
Read the page. No events, product details, email or phone numbers, outbound clicks, scrolling or heatmap data taken from the page. Publish what you need from theme code as a custom event and subscribe to it:
// In your theme's code Shopify.analytics.publish("special_email_signup", { email_campaign_id: 123 }); // In the custom pixel analytics.subscribe("special_email_signup", (event) => { console.log(event.customData.email_campaign_id); }); -
See the real address. In the lax sandbox, the page address a script detects is the sandbox’s. Shopify’s advice is to take the shopper’s page from the
page_viewedevent, for exampleevent.context.document.location.href.
Shopify notes that not every app pixel supports custom events, so check with the app’s developer before you build on them.
Why is a pixel waiting for consent?
Because your store asks for consent where the shopper is, and the pixel requires a permission the shopper hasn’t given. Shopify’s Pixel Helper shows this as Pixel is awaiting consent: accept your cookie banner or click Give consent to continue test.
- The defaults. In markets set to require consent, usually the EEA and the UK, a pixel runs only once the shopper grants the permissions it requires. A new pixel requires Marketing and Analytics, and a pixel marked as data sale doesn’t run for shoppers who opted out of data sale unless it supports limited data use (pixels overview).
- Consent given, still waiting. A third-party cookie banner must sync its choices through Shopify’s Customer Privacy API. Clearing your cookies resets your own banner. With a custom domain, customer accounts need a subdomain of it, or pixels and consent won’t work on the Order status page (troubleshooting an app pixel).
- A real case. In an August 2026 Community thread, a store’s purchases stopped reaching GA4 through the Google & YouTube app. Replies traced it to the cookie banner never passing choices to the Customer Privacy API, so Shopify held the app pixel at checkout while a theme tag the banner released kept page views flowing.
An app can also require no permissions and check consent in its own code instead, using Shopify’s pixel privacy API. cPixel works that way: what cPixel sends, and how consent changes it.
What does “Optimized” mean for an app pixel?
It is the default data-access setting for app pixels since 13 January 2026: when Shopify detects that a marketing pixel is sharing more data than it needs, it can pause some or all of that pixel’s data until relevant activity resumes (app pixels, changelog).
- The two settings. Always on gives the pixel data access without limits; Optimized lets Shopify adjust it. Optimisation applies to marketing pixels; some app pixels, such as analytics apps’, can’t be optimised and keep Always on.
- What Shopify weighs. Paid and organic referrals, sales, shop maturity, storefront configuration and synced campaign settings. Its own example is a marketing app you stopped using, whose data pauses after enough inactivity. When the default arrived, Shopify applied it to all active marketing pixels but restricted none for at least seven days.
- What it leaves alone. Marketing tools currently referring traffic or sales, events meant for standalone analytics, and webhooks.
- How to check. In Settings → Customer events, open the pixel’s menu and click View details. The activity log lists each Data access paused or Data access granted change since 3 June 2026, with its reason.
- How to change it. Click the pixel’s name, choose Optimized or Always on, then click Save.
If a platform’s numbers dropped while its campaigns were paused, read that log before assuming tracking broke; for Meta, the other causes are in Meta pixel not tracking purchases. Whether a pixel should be Always on is a judgement about that app, so ask its developer.
How do you test a pixel?
With Shopify’s Pixel Helper: in Settings → Customer events, click a custom pixel and then Test, or, for an app pixel, click the menu icon beside it and choose Test (one app pixel at a time). Then browse and check out in the tab it opens (testing custom pixels, app pixels).
-
For a custom pixel, Shopify suggests this subscription while you test, which logs every standard event to the console:
analytics.subscribe("all_standard_events", (event) => { console.log("Event data ", event?.data); }); -
Visit a page, view a product, add it to the cart, start checkout, enter shipping details and complete a test order. Each event should get a green dot; a red dot means your callback failed, and expanding the event shows the error.
-
Confirm receipt in the platform’s own tool as well; Shopify’s example is TikTok’s pixel helper. Google’s Tag Assistant is the exception, as the next section explains. Check every pixel on the page covers those tools.
Pixel Helper tests one pixel at a time, you can’t edit a pixel while it runs, and its log clears each time you open a new page. A custom pixel’s console output sits in its own frame, so pick that frame in your browser’s console.
Can you use Google Tag Manager in a custom pixel?
Yes. Shopify documents the setup, but the tags Tag Manager loads still run inside the custom pixel’s sandbox with the same limits, and Shopify says Google doesn’t recommend or support it. For Google’s own tags, Shopify recommends the Google & YouTube app instead.
- Copy Tag Manager’s code for the page head and remove its HTML tags.
- Paste the rest into a new custom pixel.
- Subscribe to Shopify’s events and push each one to Tag Manager’s
dataLayer. - Set Tag Manager up to accept those events (Google Tag Manager custom pixel).
Tag Assistant’s Troubleshoot tag feature can’t see tags in a custom pixel, so test with Pixel Helper and the platforms’ own reports. More on that in Google tag not detected. For non-Google tags you run through Tag Manager, Shopify suggests apps with app pixels (replacing Google Tag Manager scripts).
Frequently asked questions
Why is Customer events greyed out?
Usually a staff permission. View customer events lets a staff member see app and custom pixels, Manage and add custom pixels lets them add and edit custom ones, and managing app pixels needs Manage and install apps and channels (store permissions). Ask the store owner to add what you need to your role.
Do pixels run on customer account pages?
Only once you connect a custom subdomain for customer accounts, and then they track only the page_viewed event there (pixels overview).
What replaced the _shopify_y cookie?
The clientId on Shopify’s standard and DOM events. Shopify stopped setting _shopify_y and _shopify_s on 1 January 2026; event.clientId carries the ID the first one held. There is no replacement for _shopify_s, but a pixel can set its own session-length cookie through the browser API (Shopify changelog).