---
title: Storefront script tags
description: >-
  Storefront script tags are deprecated. Learn the key dates, what changes for
  your app, and how to migrate to theme app extensions or web pixels.
source_url:
  html: >-
    https://shopify.dev/docs/apps/build/online-store/script-tag-deprecation/storefront
  md: >-
    https://shopify.dev/docs/apps/build/online-store/script-tag-deprecation/storefront.md
---

# Storefront script tags

Shopify is removing script tags from storefronts. If your app uses one to load JavaScript onto a store, then you'll need to move that code into an app embed block. Storefronts are the last place script tags still run. They already stopped working on the [Order status page](https://shopify.dev/docs/apps/build/online-store/script-tag-deprecation/order-status).

An app embed block is part of a [theme app extension](https://shopify.dev/docs/apps/build/online-store/theme-app-extensions), which is what you build and deploy. It works on vintage themes as well as [Online Store 2.0](https://shopify.dev/docs/storefronts/themes/os20) themes. It also shows up in the theme editor, where an app user can see that your app is running and turn it off. Unlike a script tag, it's enabled per theme, so it needs to be active on whichever theme the store publishes.

***

## Timeline

| Date | What happens |
| - | - |
| October 1, 2026 | You can't create or update script tags. Existing script tags keep running. |
| March 1, 2027 | Shopify will stop injecting script tags into storefronts. |

Script tags on the Order status page are on an earlier, separate schedule. If yours has a [`display_scope`](https://shopify.dev/docs/api/admin-graphql/latest/enums/ScriptTagDisplayScope) of `order_status` or `all`, then refer to [Order status script tags](https://shopify.dev/docs/apps/build/online-store/script-tag-deprecation/order-status) too.

***

## What changes on October 1, 2026

The [`scriptTagCreate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/scriptTagCreate) and [`scriptTagUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/scriptTagUpdate) mutations will return a permission error on every API version, and `POST` and `PUT` requests to the [`ScriptTag` REST Admin API resource](https://shopify.dev/docs/api/admin-rest/latest/resources/scripttag) will fail the same way. Pinning to an older API version won't defer it, so treat the failure as permanent.

Read and delete operations keep working, so you can still audit and clean up your existing script tags:

* The [`scriptTags`](https://shopify.dev/docs/api/admin-graphql/latest/queries/scriptTags) query returns your app's script tags.
* The [`scriptTagDelete`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/scriptTagDelete) mutation removes a script tag.

Existing script tags keep running until March 1, 2027.

***

## What changes on March 1, 2027

Shopify will stop injecting script tags into storefront pages. Your script will no longer load, and any feature that depends on it will stop working for that store.

After that date, leftover script tag records will have no effect, so you don't need to delete them. Until then, a script tag and its replacement running at the same time will load your script twice, which can double-count analytics events or render your app's UI twice.

***

## Choose a replacement

| If your app uses a script tag to... | Then use |
| - | - |
| Load JavaScript on storefront pages | An [app embed block](https://shopify.dev/docs/apps/build/online-store/theme-app-extensions/configuration#app-embed-blocks) |
| Track analytics, conversions, or customer behavior | A [web pixel](https://shopify.dev/docs/apps/build/marketing/pixels) |

If your script injects content into a page, then an app embed block still covers it, because your JavaScript does the same work it does today.

An [app block](https://shopify.dev/docs/apps/build/online-store/theme-app-extensions/configuration#app-blocks-for-themes) lets an app user place your content in the theme editor, but it only works on themes that support [JSON templates](https://shopify.dev/docs/storefronts/themes/architecture/templates/json-templates).

Web pixels don't need any action from an app user, so if your script only collects data, then a web pixel is the simplest replacement.

***

## Migrate your app

App embed blocks are inactive until an app user turns them on, so don't delete a script tag until you've confirmed that its replacement is running. Otherwise you leave a gap where neither works.

1. Build a theme app extension with an app embed block. Refer to [Migrate to theme app extensions](https://shopify.dev/docs/apps/build/online-store/theme-app-extensions/migrate).
2. Send the app user into the theme editor with your app embed activated, using a [deep link](https://shopify.dev/docs/apps/build/online-store/theme-app-extensions/configuration#deep-linking).
3. Confirm that the app embed is active on the published theme. Refer to [Confirm that your app embed is active](https://shopify.dev/docs/apps/build/online-store/theme-app-extensions/migrate#confirm-that-your-app-embed-is-active).
4. Delete the script tag with [`scriptTagDelete`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/scriptTagDelete).

Release your replacement before October 1, 2026. After that date you can't create a script tag, so any store that installs your app without a working replacement loses the functionality that the script tag provided.

An app embed block is only active on the theme it was enabled on. If a store publishes a different theme, then your block isn't active on it, so [check activation](https://shopify.dev/docs/apps/build/online-store/theme-app-extensions/migrate#confirm-that-your-app-embed-is-active) again.

***

## Apps that can't use app extensions

[Admin-created custom apps](https://shopify.dev/docs/apps/build/authentication-authorization/legacy/admin-custom-apps) can't use [app extensions](https://shopify.dev/docs/apps/build/app-extensions), so they can't use theme app extensions or web pixels either. These are apps created directly in the Shopify admin, rather than with Shopify CLI or the Dev Dashboard, and they have no extension-based replacement for script tags. To check how an app is distributed, refer to [app distribution](https://shopify.dev/docs/apps/launch/distribution).

What to do depends on who maintains the app:

* **You maintain it**: Move the script into the theme, using a [custom Liquid](https://help.shopify.com/manual/online-store/themes/theme-structure/extend#add-custom-html-or-liquid) block where possible, or the [code editor](https://shopify.dev/docs/storefronts/themes/tools/code-editor) if you need to. A script in theme code stays there after the app is gone, and editing theme code takes the theme off its automatic upgrade path, so only do this when the app can't use app extensions.
* **An agency or another developer maintains it**: They need to move the script into the theme or build a replacement.
* **A third-party service had the store create the app and paste an access token into their dashboard**: That service needs to release a real app that uses a theme app extension or a web pixel.

***

## When the install banner appears

From October 1, 2026, when an app user installs an app that uses script tags, Shopify will show a dismissible banner warning them that part of the app will stop working.

| Uses script tags | Ships an app embed block | Ships a web pixel | Install banner |
| - | - | - | - |
| No | Any | Any | Not shown |
| Yes | No | No | Shown |
| Yes | Yes | No | Not shown |
| Yes | No | Yes | Not shown |
| Yes | Yes | Yes | Not shown |

***
