Script Tags Sunsetting in 2027: How to Migrate to App Embed Blocks Today

Shopify will stop injecting script tags into storefronts on March 1, 2027. Learn what this means for your apps, how the deprecation timeline unfolds, and the exact steps you need to replace script tags with app embed blocks or web pixels.

Script Tags Sunsetting in 2027: How to Migrate to App Embed Blocks Today
7 sections

If you’ve been using Shopify’s ScriptTag API to sprinkle custom JavaScript onto a store’s online storefront, you’ve just received a critical heads‑up. Starting October 1, 2026 the scriptTagCreate and scriptTagUpdate mutations will error out, and on March 1, 2027 Shopify will cease injecting any script tags into storefronts entirely. This post breaks down the change, who it impacts, and—most importantly—how you can migrate today so your app and your merchants stay functional and compliant.

What’s Changing: Script Tags Will No Longer Run

A ScriptTag is a lightweight way for an app to load external JavaScript without touching the merchant’s theme code. After the March 1, 2027 cutoff, Shopify will stop injecting those tags, meaning any JavaScript that relied on this mechanism will simply never load. Existing tags will continue to run until that date, but the API endpoints for creating or updating them will return a user error from October 1, 2026 onward. The scriptTags query and scriptTagDelete mutation remain functional for audit and cleanup purposes.

Who’s Affected: Developers and Merchants

The deprecation targets apps that generate script tags with a display_scope of online_store. If your app injects analytics, conversion tracking, UI enhancements, or any custom behavior via a script tag, you must replace that logic. Merchants are indirectly impacted because the scripts they rely on will stop working, which can break checkout experiences, marketing tools, or theme customizations. Apps that only used script tags on the order status page were already deprecated earlier, so this is the final piece of the script‑tag sunset.

Deprecation Timeline: Key Dates to Mark

  • October 1, 2026scriptTagCreate and scriptTagUpdate mutations start returning a user error. Existing tags continue to run but can’t be modified.\n- March 1, 2027 – Shopify stops injecting script tags into storefronts. All script‑tag‑based JavaScript halts.
  • Migration Path: Replace Script Tags with App Embed Blocks

    Shopify’s recommended replacement is an App Embed Block shipped via a Theme App Extension. The flow is simple:

  • Create a theme app extension (shopify extension create theme).\n2. Add an app_embed block that renders the same JavaScript you previously served via a script tag.\n3. Publish the extension.\n4. Merchants enable the embed block from the Theme Editor, just like any other section.
  • Here’s a minimal example of an app_embed block (blocks/my_script.liquid):

    liquid\n{% if shop.enabled? %}\n <script src="https://cdn.myapp.com/widget.js" defer></script>\n{% endif %}\n

    And the accompanying blocks/my_script.schema.json to expose a toggle in the editor:

    \n{\n "name": "My App Script",\n "target": "app_embed",\n "settings": [{\n "type": "checkbox",\n "id": "enabled",\n "label": "Enable script",\n "default": true\n }]\n}\n

    Once deployed, merchants will see a new “My App Script” embed block under App embeds in the theme editor. Enabling it injects the same <script> tag that the old ScriptTag API used, but now the code lives in a version‑controlled extension rather than a mutable API call.

    Alternative for Analytics: Use Web Pixels

    If your script tag’s sole purpose is to collect analytics or conversion data, Shopify recommends switching to a Web Pixel. Web pixels are declarative, require no merchant interaction, and are not affected by the script‑tag deprecation. Implement a pixel by defining it in your app’s shopify.extension.toml and providing the JavaScript endpoint that Shopify will call on each page view.

    Action Checklist for Your App

  • Audit all existing script tags using the scriptTags query. Identify those with display_scope: online_store.\n- Plan the migration: decide whether each tag becomes an app embed block or a web pixel.\n- Develop the theme app extension and embed blocks. Use the sample code above as a starting point.\n- Test the embed block in a development store to confirm the script loads and behaves identically to the old tag.\n- Communicate with merchants: add a notice in your app UI, update documentation, and provide a migration guide.\n- Clean up: after March 1, 2027, delete all obsolete script tags with scriptTagDelete to keep the store tidy.
  • Conclusion & Next Steps

    The script‑tag sunset is a clear signal that Shopify wants developers to adopt the more robust, version‑controlled theme app extensions. By migrating now, you avoid a hard stop in March 2027, give merchants a smoother activation experience, and future‑proof your app against upcoming platform changes. Start the audit today, build your first app embed block, and keep an eye on the October 1, 2026 deadline. Need help? Reach out in the Shopify Community forums or drop a comment below—let’s get your store ready for a script‑free future!

    Tags
    Sources

    Related Articles

    Shopify Storefronts Now Support UCP 2026‑08‑25 – What Developers Need to Know
    Platform Updates

    Shopify Storefronts Now Support UCP 2026‑08‑25 – What Developers Need to Know

    Shopify’s storefronts now advertise support for the Universal Commerce Protocol version 2026‑08‑25, enabling seamless capability negotiation for platforms and agents. Learn what changed, who’s impacted, and the exact steps you should take.

    September 4, 20263 min
    Staff Can Now View Customers’ Online Carts Directly in Shopify POS
    Platform Updates

    Staff Can Now View Customers’ Online Carts Directly in Shopify POS

    Shopify POS v11.14 now lets authorized staff see an identified customer’s abandoned online cart at checkout. Learn who this impacts, how to enable the permission, and actionable steps to boost in‑store conversions.

    September 3, 20263 min
    Hydrogen Developer Preview Unleashed: Variant Links, Cart Refresh, and Local HTTPS Made Simple
    Platform Updates

    Hydrogen Developer Preview Unleashed: Variant Links, Cart Refresh, and Local HTTPS Made Simple

    Shopify’s Hydrogen preview adds variant‑specific links, automatic cart refresh, and one‑command local HTTPS certificates—essential upgrades for developers building custom storefronts. Learn what changed, who’s impacted, and how to implement them today.

    September 3, 20264 min
    Instant Connectivity Insight: New POS Home Status Icon
    Platform Updates

    Instant Connectivity Insight: New POS Home Status Icon

    Shopify POS now shows a real‑time connectivity icon right on the Home screen, letting staff confirm device readiness before checkout. Learn what changed, who it impacts, and how to make the most of this seamless update.

    September 1, 20264 min