← All articles

Blog / Guide

Guide

How to Migrate Shopify Additional Scripts to Custom Pixels (Web Pixels API)

July 21, 2026·2 min read

If you run a Shopify store, you likely have custom tracking scripts in your checkout settings. Whether it's for Meta, Google Ads, or TikTok, these scripts historically lived in the Additional Scripts text box under Checkout settings.

Shopify is officially deprecating legacy scripts on August 28, 2026. After this date, any code remaining in the Additional Scripts box will stop firing, breaking your conversion tracking and ad attribution. You must migrate to the new Shopify Web Pixels API. Here is the step-by-step technical guide to making the move.

Shopify Core Window
Checkout Page & DOM. Emits secure events (e.g. checkout_completed) when user takes action.
Sandbox
Web Pixel Sandbox
Isolated iframe. Receives event payload. Executes Meta, Google & TikTok scripts securely.

Why Shopify is making this change

The old Additional Scripts method had major flaws:

  • Site Speed: Scripts loaded directly on the main window, slowing down your checkout page.
  • Security: Third-party scripts had full access to sensitive customer data and payment fields.
  • Sandbox Isolation: The new Web Pixels API runs all scripts inside a secure, isolated sandbox, improving security and load speed.

Step-by-step migration guide

Step 1: Audit your existing scripts

Go to your Shopify admin → Settings → Checkout and scroll down to Additional Scripts. Copy all the code snippets into a text document. Identify which tracking networks they belong to (e.g., Meta/Facebook, Google Ads, TikTok, Pinterest).

Step 2: Create a Custom Pixel

Go to Settings → Customer events and click Add custom pixel. Name it according to the platform (e.g., "Meta Pixel Custom").

Step 3: Map events to the new API

Instead of relying on global window variables, you must subscribe to Shopify's standard events. For example, to track a purchase event, wrap your pixel code inside Shopify's checkout_completed subscriber:

analytics.subscribe("checkout_completed", (event) => {
  const checkout = event.data.checkout;
  // Initialize and track purchase conversion here
});

Step 4: Remove the old script

Once your new Custom Pixel is saved and connected, delete the old snippet from the Additional Scripts box to prevent double-firing, and save the settings.

Simplify your pixel management with PixelWard

Manually rewriting and sandboxing JS snippets for every marketing platform is tedious and prone to errors. With PixelWard, you get a clean interface to generate compliant Custom Pixel codes for Meta, Google, and TikTok automatically. Plus, PixelWard continuously monitors your pixel health and alerts you via Slack, Telegram, or Email if conversion events stop 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