On this page
What this issue is
For years, Shopify store owners pasted purchase tracking code into Additional scripts. This is a text box that ran on the thank-you page and the order status page after checkout. Shopify has deprecated it as part of checkout extensibility. Stores that have been upgraded no longer run that code. The same applies to scripts in checkout.liquid.
Why it costs you leads or sales
The purchase is the signal ad platforms learn from. When the purchase tag stops firing, the store still takes orders, so nothing looks broken. But Google Ads, Meta and others see no conversions. Reports show zero or very low return, and automated bidding has no data to optimise on. You may cut budget on campaigns that are actually working.
- Ad clickVisitor lands on the store
- CheckoutCustomer pays
- Thank-you pageAdditional Scripts ignored
- Purchase tagNever fires
- Ad platformNo conversion recorded
The order succeeds, but the tag in Additional Scripts never runs.
Example: the store keeps getting 100 orders a week, but the ad platform reports far fewer once tags stop firing.
How to check if your site has it
Open the checkout settingsShopify
In Shopify admin go to Settings > Checkout and look for the Order status page section and its Additional scripts box. Notices about the deprecation or upgrade may appear.
Look for tracking codeShopify
If the box contains gtag, fbq, ttq, pintrk or similar purchase code, it is a risk or already dead.
Check Customer EventsShopify
Go to Settings > Customer events and see which pixels exist. If your purchase tags are not listed and no app sends them, purchases are probably not tracked.
Place a test order
Complete an order (use a bogus gateway or Shopify's test mode if you have it set up). Watch the network tab or the ad platform's tag debugger on the thank-you page for a purchase hit.
Compare totals
Compare orders in Shopify with conversions in GA4, Google Ads and Meta for the same dates. A sudden gap points to this issue.
The page loads, but the script in Additional Scripts is not executed.
How to fix it
You have two routes. The easiest is the platform's official Shopify integration, which sends purchases automatically. The second is a custom pixel in Customer Events that subscribes to checkout_completed.
Use native integrations first
Install the Google & YouTube channel, Facebook & Instagram channel, TikTok or Pinterest app, and connect your accounts. Choose the purchase event in their settings and turn on data sharing as offered.
Or add a custom pixel
Go to Settings > Customer events > Add custom pixel. Name it, paste your code (see the example below), then click Save and Connect.
Remove the old code
Once the new route is confirmed, delete the old snippet from Additional scripts so you do not double count if it still runs somewhere.
Load GTM in a custom pixel
Customer Events pixels run in a sandbox, so you cannot rely on the normal page DOM. Push the purchase data from
analytics.subscribeinto the dataLayer inside the pixel, and load your tags from there.Map the trigger
Create a Custom Event trigger matching the event name you push and attach your purchase tags to it. Test in Preview mode.
// Settings > Customer events > Add custom pixel
// Replace G-XXXXXXX with your GA4 measurement ID
const script = document.createElement('script');
script.src = 'https://www.googletagmanager.com/gtag/js?id=G-XXXXXXX';
script.async = true;
document.head.appendChild(script);
window.dataLayer = window.dataLayer || [];
function gtag(){ dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'G-XXXXXXX');
analytics.subscribe('checkout_completed', (event) => {
const c = event.data.checkout;
gtag('event', 'purchase', {
transaction_id: c.order ? c.order.id : c.token,
value: c.totalPrice.amount,
currency: c.currencyCode,
items: c.lineItems.map((i) => ({
item_id: i.variant.sku || i.variant.id,
item_name: i.title,
quantity: i.quantity,
price: i.variant.price.amount
}))
});
});How to confirm it's fixed
- Place a test order and see the purchase hit in the browser network tab on the thank-you page
- The hit carries the right value, currency and transaction ID
- The purchase appears in GA4 Realtime or DebugView
- Google Ads, Meta and other platforms show the test conversion in their diagnostics
- Each order is counted once, not twice
- The old Additional Scripts box is empty
How to prevent it happening again
Keep a list of every place a tag lives, and who owns it. Review Shopify's checkout and apps notices before upgrades. Compare Shopify orders to ad platform conversions every week, and run a test purchase after any theme, app or checkout change.
| Route | Best for | Watch out for |
|---|---|---|
| Native Shopify channel or app | Google, Meta, TikTok, Pinterest | Duplicate sending if a custom pixel also exists |
| Custom pixel in Customer Events | GA4 or platforms without an app | Sandbox limits and consent settings |
| Additional Scripts box | Nothing new | Deprecated, stops running after upgrade |
How FunnelGuard handles this
FunnelGuard detects this issue today. A robot visitor runs your real checkout journey on a schedule, from the EU or the US, and checks the tracking hits sent to GA4, Google Ads, Meta, TikTok, LinkedIn, Bing, Pinterest, Snapchat, X and Reddit. If the purchase hit is missing, a failure is re-checked from a second region, and then you get one alert with a screenshot and a likely cause. Test traffic is marked and stops before payment unless your store's test mode is set up, so the purchase step can only be checked when test mode is in place.
Questions people ask
Is Shopify Additional Scripts being removed?
Yes. Shopify has deprecated the Additional scripts box for the thank-you and order status pages and the older checkout.liquid file. On upgraded stores the code no longer runs, so you should move tracking to Customer Events or native integrations.
Why is my Shopify purchase event not firing on the thank-you page?
The most common cause is that the tag lives in the Additional scripts box, which is deprecated. Check Settings > Checkout for the old code and Settings > Customer events for existing pixels. Then rebuild the tag as a custom pixel or use the platform's Shopify app.
How do I migrate Additional Scripts to Customer Events?
Go to Settings > Customer events and add a custom pixel. Subscribe to checkout_completed with analytics.subscribe and send the purchase data to your platform. Save and connect it, test with an order, then delete the old script.
Do I need a custom pixel if I use the Google & YouTube or Facebook channel?
Usually not. The official channels send purchase events for you once connected and configured. Adding a custom pixel for the same platform risks counting each order twice.
Why do my Shopify orders not match Google Ads conversions?
A gap that appeared suddenly often means the purchase tag stopped firing, for example after an upgrade removed Additional Scripts. Smaller gaps can come from consent choices, ad blockers and attribution windows. Run a test order to see whether the purchase hit is sent at all.
Can I test Shopify purchase tracking without a real payment?
Yes, if your store has a test gateway or test mode enabled. Place an order with it and check the thank-you page network requests and the platform's debugger. Never use real card details for testing.
Can FunnelGuard tell me if my Shopify purchase tag stopped firing?
Yes. It runs your checkout journey on a schedule and checks the tracking hits, then alerts you with a screenshot and likely cause. Reaching the purchase step requires the store's test mode to be set up.
Related issues
- TRK-393Shopify checkout extensibility removed checkout.liquid scriptsFix guide
- TRK-394Shopify Customer Events (web pixel) sandbox missing eventsFix guide
- TRK-392Headless checkout loses tracking from main siteFix guide
- TRK-396WooCommerce purchase fires on every order-received reloadFix guide
- TRK-400Tracking only in site header, funnel pages use blank templateFix guide
- TRK-389SPA route change sends no page_viewFix guide