Apps & Extensions

Shopify Script Tag Deprecation: Migrate Before March 2027

By CartStack Team5 min read

Shopify script tag deprecation began on October 1, 2026, when new storefront script tags stopped being accepted. It will stop running the existing ones on March 1, 2027. This guide covers what changed, how to audit what is still installed, how to choose between an app embed block and a web pixel, and what to do when an app cannot use extensions. It ends with our view on where the real risk sits. Checked against Shopify’s developer documentation in October 2026.

Cover graphic for Shopify script tag deprecation
New script tags are blocked. Existing ones have until March 1, 2027.

Shopify Script Tag Deprecation: What Changed and When

A script tag loads JavaScript on a storefront without any change to theme code. Shopify is removing it in two steps. Storefronts are the last place script tags still run, because they already stopped working on the Order status page.

  • October 1, 2026: scriptTagCreate and scriptTagUpdate return an error on every API version, and the REST ScriptTag resource rejects POST and PUT. Pinning an older API version does not defer it. That date has passed.
  • March 1, 2027: Shopify stops injecting script tags into storefront pages. Any feature that depends on one stops working for that store.

Reading and deleting still work, so you can audit and clean up. Existing script tags keep running until March 1. Tags on the Order status page follow an earlier, separate schedule in Shopify’s Order status guidance. Some guides mention a warning banner for merchants who install an app that uses script tags. Shopify’s documentation says it decided not to show that banner for now, so do not wait for one. The full timeline is in the storefront script tags documentation.

Audit Your Script Tags

The scriptTags query returns the script tags your app created on a store. Run it with the token your app already holds, once for each store you need to check. If you maintain a custom app per client, repeat the check client by client.

query ScriptTags {
  scriptTags(first: 50) {
    nodes {
      id
      src
      displayScope
      createdAt
    }
  }
}

Pay attention to displayScope. A value of order_status or all means the Order status schedule applies as well. Once a replacement is confirmed live, remove the old tag.

mutation RemoveScriptTag($id: ID!) {
  scriptTagDelete(id: $id) {
    deletedScriptTagId
    userErrors {
      field
      message
    }
  }
}

Choose a Replacement for Deprecated Script Tags

  • Loading JavaScript on storefront pages: use an app embed block, shipped in a theme app extension. It works on vintage themes as well as Online Store 2.0 themes.
  • Collecting analytics or conversion data: use a web pixel. It needs no activation in the theme editor.

An app block, which merchants place in the theme editor, only works on themes that support JSON templates. For a script that simply needs to run, the app embed block is the closer match.

Migrate With an App Embed Block

App embed blocks are inactive until a merchant turns them on. That makes the order of operations important.

  1. Build a theme app extension with an app embed block. Shopify’s migration guide walks through it.
  2. Send the merchant into the theme editor with your embed activated, using a deep link.
  3. Confirm the embed is active on the published theme.
  4. Only then delete the script tag.

The block file declares where the script loads and which asset to use. This minimal example targets the body and points at a script in the extension’s assets folder.

{% schema %}
{
  "name": "Loyalty widget",
  "target": "body",
  "javascript": "loyalty-widget.js",
  "settings": []
}
{% endschema %}

Activation is per theme. If a store publishes a different theme later, your block is not active on it, so check activation again. Running a script tag and its replacement together loads your script twice, which can double-count events or draw your interface twice.

Migrate Analytics to a Web Pixel

If the script only collects data, a web pixel is the simplest replacement. Your app creates it with webPixelCreate, and the merchant approves the write_pixels and read_customer_events access scopes when installing or updating the app.

import {register} from '@shopify/web-pixels-extension';

register(({analytics}) => {
  analytics.subscribe('product_added_to_cart', (event) => {
    const line = event.data.cartLine;
    // send what the old script tag used to send
  });
});

Pixels run in a sandbox, so they cannot touch the page the way a script tag could. For what that means in practice, see Shopify Server-Side Tracking: GA4 and Meta CAPI Done Right.

When an App Cannot Use Extensions

Custom apps created directly in the Shopify admin cannot use app extensions, so they have no extension-based replacement. If you maintain the app, move the script into the theme, ideally in a custom Liquid block. Editing theme code takes the theme off its automatic upgrade path, so treat this as the last option. If a third-party service had a store create the app and paste in a token, that service needs to ship a real app with a theme app extension or a web pixel.

Our Analysis: Where Script Tag Deprecation Bites

March 1 is the date merchants feel. October 1 only stops developers from creating or updating tags. Nothing visibly breaks until Shopify stops injecting them in March. A store that does nothing will look fine for five months, then lose features in one day.

Per-theme activation is the quiet failure. A migrated app can look finished while its embed is switched off on the live theme. Verify on the published theme, and verify again after any theme change.

Inventory before you build. Agencies should list every client store and every custom app first. The documentation gives you the audit query, but no single view across stores, so that inventory is your job. We have not found an official admin screen that lists apps by script tag use.

Do not default to pasting code into the theme. It works, and it also leaves orphaned code behind when the app is later removed. Use it when extensions are genuinely unavailable.

FAQ about Shopify Script Tag Deprecation

Do existing script tags stop on October 1? No. On October 1 you can no longer create or update them. Existing ones keep running until March 1, 2027.

Does pinning an older API version help? No. Shopify applies the change to every API version.

Which replacement should I pick? Use an app embed block to load JavaScript on the storefront, and a web pixel when the script only collects analytics or conversion data.