← All articles

Meta (Facebook) Pixel on Shopify: move it from Additional Scripts to a Custom Pixel before August 26, 2026

July 6, 2026

After the Google Ads conversion tag, the Meta Pixel purchase event is the script merchants most often paste into Additional Scripts. On August 26, 2026 it stops firing on every non-Plus store. Meta doesn't throw an error when a pixel goes quiet — it just quietly stops optimizing. Advantage+ campaigns and lookalike audiences degrade over days, not seconds, so most merchants notice only after CPA has already climbed.

The legacy snippet

The version living in Additional Scripts on the order status page typically looks like this:

<script>
  fbq('track', 'Purchase', {
    value: {{ checkout.total_price | money_without_currency }},
    currency: '{{ checkout.currency }}',
    content_ids: [{% for line_item in checkout.line_items %}'{{ line_item.product_id }}'{% unless forloop.last %},{% endunless %}{% endfor %}],
    content_type: 'product'
  });
</script>

What breaks when you just delete it

  • Purchase events stop — Meta's algorithm has no signal that an ad-driven visitor actually bought.
  • Advantage+ shopping campaigns lose their optimization target and drift toward broad, low-intent traffic.
  • Lookalike audiences built off purchasers go stale — no new purchase events means no fresh seed data.
  • Attribution reporting in Ads Manager quietly undercounts revenue, making the account look worse than it is right before a budget review.

The Custom Pixel version

Custom Pixels run in a sandbox with no DOM and no Liquid, but the Meta Pixel base code still loads fine as a script tag — you just trigger the purchase event from the checkout_completed payload instead of inline Liquid variables:

!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
document,'script','https://connect.facebook.net/en_US/fbevents.js');
fbq('init', 'YOUR_PIXEL_ID');

analytics.subscribe("checkout_completed", (event) => {
  const checkout = event.data.checkout;
  fbq('track', 'Purchase', {
    value: checkout.totalPrice?.amount ?? 0,
    currency: checkout.totalPrice?.currencyCode ?? "USD",
    content_ids: checkout.lineItems?.map((li) => String(li.variant?.product?.id ?? "")) ?? [],
    content_type: "product",
  });
});

Note the sandbox has no document for the host page, but the pixel's own injected script tag still runs and can make network calls — that's how fbq keeps working. What you lose is anything that reads the actual checkout DOM instead of the event payload.

Don't stop at Purchase

If your legacy setup also fired InitiateCheckout or AddPaymentInfo from other pages, those need their own Custom Pixel subscriptions — checkout_started and payment_info_submitted respectively. Losing mid-funnel events is what quietly breaks lookalike quality even when Purchase itself still fires.

Verify before you delete the legacy script

  1. Add the Custom Pixel (Settings → Customer events → Add custom pixel), paste the code above with your real Pixel ID.
  2. Open Meta Events Manager → Test Events, place a test order, confirm the Purchase event lands with the correct value and currency.
  3. Only then delete the Additional Scripts version — running both risks double-counted purchases inflating your reported ROAS.

The part that actually causes the damage

Migrating once is an afternoon of work. The expensive failure mode is a pixel that migrates cleanly today and goes silent in October after a theme update, a consent-banner change, or an unrelated app conflict — with no error, just a slow bleed in CPA. That's a monitoring problem, not a one-time migration problem. Paste your scripts into PixelWard to generate the Custom Pixel code for Google, Meta, TikTok and affiliate trackers in one pass, and it keeps checking afterward that each one is still reporting.

Migrate your tracking in minutes, not weekends.

PixelWard converts your Additional Scripts into working Custom Pixels and alerts you if tracking ever goes silent.

Install PixelWard