Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Shopify additional scripts deprecated: purchase tracking lost

TRK-395High impactDetectedBy FunnelGuardPublished Updated
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.

Where the purchase signal is lost
  1. Ad clickVisitor lands on the store
  2. CheckoutCustomer pays
  3. Thank-you pageAdditional Scripts ignored
  4. Purchase tagNever fires
  5. Ad platformNo conversion recorded

The order succeeds, but the tag in Additional Scripts never runs.

Reported purchases before and after the scripts stop runningExample numbers
Reported purchases before and after the scripts stop running (example)Actual orders: 100 purchases per week; Reported before: 92 purchases per week; Reported after: 0 purchases per week03877100920Actual ordersReported beforeReported afterpurchases per week

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

Check whether you rely on Additional Scripts
  1. 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.

  2. Look for tracking codeShopify

    If the box contains gtag, fbq, ttq, pintrk or similar purchase code, it is a risk or already dead.

  3. 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.

  4. 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.

  5. 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 purchase tag that never fires

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.

Restore purchase tracking
  1. 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.

  2. 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.

  3. 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.

Custom pixel example: send purchase to GA4javascript
// 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

Confirmation checks
  • 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.

Where to place purchase tracking now
RouteBest forWatch out for
Native Shopify channel or appGoogle, Meta, TikTok, PinterestDuplicate sending if a custom pixel also exists
Custom pixel in Customer EventsGA4 or platforms without an appSandbox limits and consent settings
Additional Scripts boxNothing newDeprecated, 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.

Does FunnelGuard catch this?

Detected

FunnelGuard checks for this today.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.