TL;DR
Shopify's script tag dates don't reach the pixel someone pasted into your theme, and Shopify's migration page says you can migrate it, with benefits listed and no date [8]. The reasons to move are coverage of checkout and post-purchase pages, double counting, and consent. Run an inventory before Black Friday, triage each hit with three questions, and do the cutover after Cyber Monday unless something is actually broken.
Key Takeaways
- The script tag dates apply to apps that create script tags [1]. Shopify's migration page presents moving pasted pixel code as an option with benefits, and no Shopify page sets a date for it [1][8].
- Tracking hides in four places, each with its own status: theme files, Additional scripts, the old Preferences page, and checkout.liquid on Plus.
- Ask three questions of every hit: does something already send this event, does the tag only need the event stream, and who gates it on consent today.
- Anything that reads or writes the page stays in the theme, because Shopify says scraping or writing the DOM won't work in the sandbox [4].
- A ported tag can keep firing while reporting the wrong thing. Write down the expected direction of your numbers before you cut over.
- Shopify advises migrating in a less busy period [8]. Audit now, cut over after Cyber Monday.
What does moving tracking from theme.liquid into Shopify customer events change?
Shopify's two script tag dates get quoted as though they cover every pixel on a store. Since October 1, 2026, apps can't create or update script tags, and on March 1, 2027 Shopify stops injecting them into storefronts [1][2]. Both dates apply to apps that create script tags with an online store display scope [1]. A snippet pasted into theme.liquid is theme code, and neither date touches it. If you want the dates and the vendor audit, the Shopify script tags deadline article has them. This piece covers the other object.
So why move anything? The reasons are practical:
- Coverage. Shopify says custom pixels collect on more pages of the store, including checkout and post-purchase pages [9].
- Duplicates. Shopify warns that an event tracked in more than one place (theme code, an app, Customer events) gets counted more than once [8].
- Consent. In Settings → Customer privacy, Shopify says web pixels always respect your settings [8]. A pasted tag fires for everyone unless its own code or your consent tool gates it.
Where is hardcoded tracking hiding on your store?
Not only in theme.liquid. Shopify's migration page lists the places old pixel code sits: theme.liquid, checkout.liquid (Shopify Plus only), the Additional scripts box, and the Preferences page [8]. Each has a different status today:
| Where | Status as of November 11, 2026 | Source |
|---|---|---|
| Theme files (theme.liquid, snippets) | Not touched by the script tag dates. Shopify says you can migrate it. | [1][8] |
| Additional scripts (Checkout settings) | View-only since August 28, 2025. It can be deactivated through the upgrade guide. | [10] |
| Preferences page Meta and Universal Analytics tags | Tags not set up through Meta's or Google's app were converted into custom pixels in Customer events as of February 2025. | [8] |
| checkout.liquid | Listed by Shopify as a place old pixel code may sit, Plus only. | [8] |
| Order status page script tags from apps | Stopped on August 28, 2025 for Plus stores and August 26, 2026 for all others. | [3] |
The third row is the one people miss. If Shopify converted a Meta or Universal Analytics tag into a custom pixel for you, there's a pixel in Settings → Customer events that you never wrote. Open that list first, then search the theme.
To search the theme, go to Online Store, click the horizontal menu icon on your live theme, choose Edit code, and use the search button in the left sidebar. It has options for match case, whole word and regular expression [12]. Shopify names three strings to look for: fbq(, gtag( and dataLayer.push( [8]. Duplicate the theme before you touch anything [12]. For the Additional scripts box, the thank-you page tracking guide walks the audit, so I won't repeat it here.
Build one sheet with a row per hit: file or location, what it sends, to which platform ID, and which event. Then change nothing.
Delete, port or leave: a worksheet for every tag
For each row, answer three questions in order.
- Does something already send this event? An installed tracking app, a sales channel, or a pixel Shopify converted for you.
- Does the tag only need the event stream, or does it read the page? Shopify's sandbox can't scrape or write the DOM [4].
- Who gates it on consent today? In a custom pixel, the Permission setting does [14]. In the theme, nothing does unless the snippet's own code or your consent tool checks.
| Verdict | When | What to do |
|---|---|---|
| Delete | Question 1 is yes | Shopify says to remove standard-event code if a pixel already supports that event [8]. |
| Port | Question 1 is no, and it only needs events | Move it into a custom pixel and subscribe to the event [8]. |
| Leave | It reads or writes the page | Keep it in the theme. This is the safe default. |
Run it on an illustrative store with four hits. A Meta base code and fbq('track', 'AddToCart') copy in the theme: delete, because the tracking app sends add-to-cart. A default gtag('config', ...) line for the same GA4 property: delete, because a second source of page views is exactly what you're hunting. A dataLayer.push that fires a quiz-completed event when a visitor finishes your product quiz: port, because it's a custom event. A script that reads the cart drawer's markup to build a feed: leave.
For the port, Shopify's pattern is to publish the custom event from theme code and subscribe to it in the pixel, where analytics is already available [5][8]. Shopify's pattern, with a prefixed event name as shopify.dev advises [13]:
// In the theme: replace the old dataLayer.push call
Shopify.analytics.publish("my_store:quiz_completed", { quiz_id: "fit-finder" });
// In the custom pixel (Settings → Customer events)
analytics.subscribe("my_store:quiz_completed", (event) => {
// event.customData holds what you published
});
A custom pixel is a lax sandbox that you maintain. Shopify says it doesn't support custom pixels, and it recommends apps built as pixel extensions instead [4][9]. Compliance, consent and code security are yours [9]. That's the case for deleting rather than porting wherever a maintained app already covers the event.
What changes inside the sandbox when a tag moves?
The same snippet sees a different world. Shopify documents these differences:
-
The URL. In the lax sandbox,
window.hrefreturns the sandbox URL instead of the top frame URL, and legacy pixels can't access the top frame [4]. Read the page address fromevent.context.document.location.hrefinstead [6]. -
Cookies and storage. The
browserAPI's cookie, localStorage and sessionStorage calls are asynchronous and run in the top frame [7]. A snippet that reads a cookie synchronously needs rewriting. -
Beacons. The
browserAPI'ssendBeaconis deprecated. Shopify says to usefetchwithkeepalive: true[7]. - The DOM. Features that scrape the DOM or write to it won't work [4].
The symptoms can be quiet: the count looks right but the page URL field holds the sandbox address. Check one real event's payload, and the browser console, before you trust the totals.
Why your numbers will move after the cutover
Three things move the count.
First, consent. A tag that fired for every visitor now follows the pixel's Permission setting, set to Required with purposes or Not required [14]. If you move a tag that ignored consent, your count drops by whatever share of visitors had declined. I can't give you that percentage, and nobody has a number that fits your store. The consent banner guide shows how to see your own share.
Second, bots. Shopify says some bots don't trigger the web pixel sandbox, so single-digit percentage dips in event counts are expected [8].
Third, the order of operations. Shopify's own trade-off: connect the new pixel before you remove the old one and you miss fewer events but risk duplicates; connect it after removal and you avoid duplicates but lose events in between [8]. Neither is free.
Then there's timing. Shopify suggests migrating during a less busy period [8]. With Black Friday weeks away, my rule is to do the inventory now and migrate pixels to customer events after Cyber Monday, unless a tag is actually broken. Whatever date you pick, log it. The Google Analytics annotations guide shows how to mark the change so nobody reads the shift as a trend. And don't compare counts across analytics services to judge the move; Shopify says to run a parallel account instead [8].
How do you check for duplicates once it's live?
Shopify's own check: open your browser's developer tools and look for multiple requests to the same endpoint within one page load [8]. Do that on a product page, the cart and the thank-you page. Then check each platform's side.
If you run WeltPixel Conversion Tracking, it helps to know it works on two surfaces. A pixel runs in Shopify's strict sandbox, and a theme app embed loads the storefront scripts, including Meta's browser pixel. Setup needs no theme code. Next to leftover hardcoded tags, here's what a clean state looks like:
| Check | Clean state |
|---|---|
| Meta Events Manager, Purchase row | Connection method reads Server. The app sends Meta Purchase from the server only. A Browser source on Purchase means another sender exists, such as a leftover tag, another app or a sales channel. |
| Meta PageView | Server only by default. Browser plus Server appears if you turn on "Send Page View events from both browser and server" (off by default). With it off, a Browser source on PageView means another sender, as with Purchase. |
| Meta base code | One copy per page. The app doesn't inject Meta's base code a second time if a Meta pixel already exists on the page. |
| GA4 DebugView | One page_view per load per measurement ID. The app sends its own page_view, so a leftover default gtag('config', ...) for the same ID can add a second. |
Meta only removes a duplicate when the event ID and name match, and only within 48 hours of the first event [11]. Two browser events, or two server events, with the same information are both kept [11]. That's why a leftover browser Purchase next to a server one is worth hunting. For the per-platform keys, see how to switch Shopify tracking apps without double counting. The app's browser events respect Shopify's Customer Privacy API signals.
FAQ
Is moving tracking out of theme.liquid required?
No. Shopify's migration page says you can migrate pasted pixel code and lists the benefits; no Shopify page sets a date for it [1][8]. The reasons to do it are coverage of checkout and post-purchase pages, fewer duplicates, and consent handled by Shopify's settings [8][9].
Will code in theme.liquid stop working on March 1, 2027?
No. That date is when Shopify stops injecting script tags that apps create [1][2]. Code you pasted into your theme isn't an app-created script tag.
Can I run Google Tag Manager in a custom pixel?
Yes. Shopify says the pixels GTM loads still run in the sandbox, so the same limits apply [15], including no access to the page DOM [4]. That's a separate decision from this triage, so finish the inventory first.
Do I need a developer?
For deleting a tag an app already covers, usually not. Shopify describes custom pixels as an advanced feature that requires JavaScript knowledge [9], so a developer should handle any tag you port.
Run the inventory on your own store
Before you move anything, install WeltPixel Conversion Tracking if you'd rather have an app own the standard events, then open Edit code, search for fbq(, gtag( and dataLayer.push(, and write down every hit and what it sends.
Sources
- Shopify developer changelog, "Online Store script tags deprecation," dated August 24, 2026, shopify.dev/changelog/online-store-script-tags-deprecation, accessed November 11, 2026
- Shopify developer docs, "Storefront script tags" deprecation timeline, shopify.dev/docs/apps/build/online-store/script-tag-deprecation/storefront, accessed November 11, 2026
- Shopify developer docs, "Order status page script tags" deprecation, shopify.dev/docs/apps/build/online-store/script-tag-deprecation/order-status, accessed November 11, 2026
- Shopify developer docs, "Web pixels" (sandbox behavior), shopify.dev/docs/apps/build/marketing/pixels, accessed November 11, 2026
- Shopify developer docs, "Web Pixels API," shopify.dev/docs/api/web-pixels-api, accessed November 11, 2026
- Shopify developer docs, "page_viewed" standard event, shopify.dev/docs/api/web-pixels-api/standard-events/page_viewed, accessed November 11, 2026
- Shopify developer docs, Web Pixels API "browser" standard API, shopify.dev/docs/api/web-pixels-api/standard-api/browser, accessed November 11, 2026
- Shopify Help Center, "Migrating pixels," help.shopify.com/en/manual/promoting-marketing/pixels/pixel-migration, accessed November 11, 2026
- Shopify Help Center, "Custom pixels," help.shopify.com/en/manual/promoting-marketing/pixels/custom-pixels, accessed November 11, 2026
- Shopify Help Center, "Non-Plus - Upgrading and replacing your Thank you and Order status pages" (Additional scripts view-only since August 28, 2025), help.shopify.com/en/manual/checkout-settings/checkout-extensibility/checkout-upgrade, accessed November 11, 2026
- Meta for Developers, "Handling duplicate pixel and Conversions API events," developers.facebook.com/documentation/ads-commerce/conversions-api/deduplicate-pixel-and-server-events, accessed November 11, 2026
- Shopify Help Center, "Edit theme code," help.shopify.com/en/manual/online-store/themes/theme-structure/extend/edit-theme-code, accessed November 11, 2026
- Shopify developer docs, "Emitting data" (custom events), shopify.dev/docs/api/web-pixels-api/emitting-data, accessed November 11, 2026
- Shopify Help Center, "Manage your custom pixels," help.shopify.com/en/manual/promoting-marketing/pixels/custom-pixels/manage, accessed November 11, 2026
- Shopify Help Center, "Pixels overview," help.shopify.com/en/manual/promoting-marketing/pixels/overview, accessed November 11, 2026