support@schemaclinic.com Free JSON-LD checker Free schema generator Shopify App Store
Schema guide

Shopify theme app extensions and schema: how app embeds add JSON-LD

Most modern schema apps add their markup through a theme app extension rather than by editing your theme. This guide explains what a theme app extension is, how app embeds output JSON-LD, how to switch one on or off, and the one job an app embed cannot do for you.

Short answer: a theme app extension is the part of a Shopify app that adds content to your online store without editing theme code. It can contain app blocks, which you place inside sections, and app embed blocks, which Shopify injects before the closing </head> or </body> tag. Schema apps use app embeds: you switch the embed on under App embeds in the theme editor and the app's JSON-LD appears in every page's HTML. Switch it off and the markup goes. What an app embed cannot do is switch off the schema your theme already outputs, so check for duplicates afterwards.

What a Shopify theme app extension is

Shopify's theme app extension documentation describes them as the way apps add dynamic elements, such as reviews, prices and ratings, to a store without merchants editing Liquid or code. Shopify states it plainly: apps built in the theme app extension framework don't edit theme code. The extension holds the app's own blocks, assets and snippets, and Shopify combines them with your theme when a page is rendered.

A theme app extension can contain two kinds of block:

App blockApp embed block
Where it appearsInside a section, where you place itInjected before </head> or </body>
How you add itAdd block in the theme editorToggle under App embeds in the theme editor
Typical useReview widgets, size charts, badgesChat buttons, tracking, schema markup
Theme supportThemes with app block support (Online Store 2.0)Any theme version, according to Shopify

For structured data, the app embed is the natural fit. JSON-LD does not need a place in the visible layout, and it is valid in either the head or the body of the page. Each theme app extension Shopify hosts keeps the app's storefront code out of your theme files. So when people talk about a Shopify extension for schema, they nearly always mean an app embed block inside the app's theme app extension.

Why app embeds suit schema markup

An app embed block is a Liquid file. Shopify's configuration documentation says it can target head, body or compliance_head, and that it has access to the global Liquid scope of the page it is rendered on. In practice that means a schema app embed can read the current product, collection or article and print matching JSON-LD as part of the page.

That has three advantages over the alternatives:

  • The markup is in the page HTML. It is rendered with the page, so it shows in View Source and Google reads it on the first pass, unlike JSON-LD that a script adds in the browser after the page loads.
  • No theme files change. Your theme stays as its developer shipped it, so theme updates do not wipe the markup and the markup cannot break the theme.
  • It is reversible. One toggle removes the markup. There is no snippet to hunt down later.

Shopify also sets size limits on extensions, such as 100 KB of Liquid across all files, which keeps app embeds light. A JSON-LD template is small, so this is rarely a constraint for schema.

The Shopify no code route: switching an app embed on or off

Shopify's help centre article on apps in your theme gives the steps. On a computer:

  1. In Shopify admin, go to Online Store › Themes and click Customize on the theme you want to change.
  2. Click the App embeds icon in the sidebar.
  3. Click the toggle beside the app embed to activate it, adjust any settings the app offers, then click Save.

Shopify's developer documentation notes that app embed blocks are deactivated by default after an app is installed, so installing a schema app does not change your markup until the embed is switched on. That is worth knowing when an app's dashboard says your schema is "set up" but nothing has changed on the store.

The setting belongs to the theme you edited. If you publish a different theme, or work on a duplicate theme, open the theme editor for that one and check the app embed is switched on there too. If you sell in several markets, the theme editor may let you choose a market first; otherwise changes apply to the store default.

Shopify app code vs theme code: where your schema lives

When you look for the source of a schema block on your store, there are three places it can come from:

SourceWhere the code livesHow to remove it
Your themeTheme files: theme.liquid, sections and snippetsEdit the theme code (on a duplicate first)
App embedThe app's theme app extension, not your themeSwitch the embed off in App embeds
Older app or manual installSnippets the app or a developer pasted into theme filesFind and delete the snippet in theme code

Shopify's help centre notes that some apps still inject code directly into theme code. Those snippets are part of your theme from then on, and uninstalling the app does not always take them out. That is a common source of stale or duplicate schema on stores that have tried several SEO apps over the years. Search the code editor for ld+json and look for snippet names that match apps you no longer use.

The one thing an app embed cannot do

An app embed adds markup. It cannot remove markup that your theme or another app already outputs. If your theme prints Product JSON-LD through Shopify's structured_data filter and a schema app embed prints a second Product block, Google sees two products on the page, sometimes with different prices or ratings. This is the most common Shopify app schema conflict; see duplicate Product schema on Shopify.

So after you switch on any schema app embed:

  1. Test a product page, a collection page and the home page in Google's Rich Results Test.
  2. Count the items of each type. You want one Organization, one WebSite and one Product (or ProductGroup) per page, not two.
  3. Where there is a duplicate, decide which source owns that type and switch the other off, either in the app's settings or by removing the line from the theme.

For developers: an app embed block for schema

App embed blocks live in the blocks folder of a theme app extension and end with a {% schema %} tag that sets a target. This is the theme-editor kind of schema, not schema.org; see section schema vs schema markup. A minimal example that prints Organization markup on the home page:

{%- if request.page_type == 'index' -%}
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Organization",
  "@id": {{ request.origin | append: '/#organization' | json }},
  "name": {{ shop.name | json }},
  "url": {{ request.origin | json }}
}
</script>
{%- endif -%}

{% schema %}
{
  "name": "Store schema",
  "target": "head",
  "settings": []
}
{% endschema %}

Pass every Liquid value through the json filter so a quote in a shop or product name cannot break the block. Give the embed a clear name, because that is what merchants see in the App embeds list and what they need to recognise when they look for the source of a block.

How Schema Clinic uses an app embed

Schema Clinic audits first. Its scan reads your live pages, plus a Deep Scan for JSON-LD that scripts inject after load, and shows each block with its source: theme, app or Schema Clinic. That tells you which theme and app markup to switch off before you add anything.

On the Pro plan ($19.99/month), the generator builds linked JSON-LD for Organization, WebSite, Product, Article, BreadcrumbList and CollectionPage with ItemList, and deploys it through a theme app extension app embed called "Schema Clinic". No theme code is edited, the markup is output with the page, and switching the embed off reverts it. It works with Online Store 2.0 themes. If you cancel, the deployed schema stops being injected. Plans start at $9.99/month for the audit; there is no free plan or trial. Install from the Shopify App Store.

Questions people ask

Does a theme app extension edit my theme code?
No. Shopify says apps built with theme app extensions do not edit theme code. The app's blocks and embeds are combined with your theme when the page is rendered.
Where are app embeds in the Shopify theme editor?
Open Online Store, Themes, then Customize. Click the App embeds icon in the sidebar and use the toggle beside each app embed to switch it on or off, then save.
Are app embeds switched on when I install an app?
No. Shopify's documentation says app embed blocks are deactivated by default after an app is installed. You switch them on in the theme editor.
Do app embeds work with vintage themes?
Shopify says app embeds can be used with any theme version. App blocks, which sit inside sections, need a theme that supports them, which in practice means an Online Store 2.0 theme.
Can Google see JSON-LD added by an app embed?
Yes. An app embed is rendered with the page, so its JSON-LD is in the HTML that Google fetches, and you can see it with View Source or the Rich Results Test.
Is a Shopify extension the same as an app?
Not exactly. An extension is a part of an app. A theme app extension is the part that adds blocks and embeds to your online store, while the app itself may also have an admin dashboard, settings and billing.

See what Google sees on your store

Run an audit in minutes. Every schema block, every error and duplicate, with its source.

Install Schema Clinic