If a merchant opens your app after publishing a new Shopify theme, there are two different checks to make. The first asks whether the embed is enabled on the published theme. The second asks whether a request from that storefront actually reached the app. A theme can pass the first check while a script error or blocked request prevents delivery.
Check the published theme in App Bridge
In an embedded Shopify admin app, shopify.app.extensions() includes activation data for the published theme. Look for your embed's block handle. An active section block from the same extension doesn't tell you whether your embed is enabled.
function readEmbed(extensions, handle) {
if (!Array.isArray(extensions)) return "unknown";
const matching = extensions
.filter(extension => extension.type === "theme_app_extension")
.flatMap(extension => extension.activations ?? [])
.filter(activation => activation.handle === handle);
if (matching.some(activation => activation.status === "active")) {
return "active";
}
if (matching.some(activation =>
activation.status === "available" || activation.status === "unavailable"
)) {
return "inactive";
}
return "unknown";
}
For the example, pass the filename without .liquid as the handle. If the App Bridge call rejects, show “Unable to verify” and link to the theme editor. This is also the right state while you lack a matching activation. Don't turn a timeout into instructions to reinstall the app.
I checked the example against four local fixtures. An active embed reports active. An available but inactive embed reports inactive. An unrelated active block and an unavailable response both report unknown.
Use a labeled delivery check
- Open the published storefront after saving the embed. A theme preview can be on a different theme.
- Start a labeled storefront test from your app, then visit the test URL.
- Confirm the test arrives under that store's property. Keep labeled tests out of live traffic totals and enforcement.
- If the embed is active and the test is missing, open the browser console and Network panel to check for a script load error or failed request. Check checkout-pixel delivery separately.
The test is a check of the storefront collection path. For an analytics embed, it helps distinguish a quiet store from an unverified installation.
I'm the founder of WebDecoy. The Shopify app's Setup & health page uses these separate checks. Try the free plan via the Shopify App Store, or follow the written setup steps.
Shopify App Bridge reference · Shopify theme app setup
I used AI to help draft this article and checked the API behavior against Shopify's documentation and the JavaScript against local test fixtures.
Top comments (0)