Skip to content
50% OFF $299 $599
Lock in
§ 3.12 ARTICLE
Published VerifiedEvery 6 weeks Sources4 named Authored bySquareRank Team

Schema · § 3.12 · How-to

JSON-LD Code Injection — the four placement scopes

Four valid scopes exist for JSON-LD on Squarespace: Settings > Advanced > Code Injection > Header (site-wide, every page), Page Settings > Advanced > Page Header Code Injection (this page only), Settings > Advanced > Code Injection > Footer (site-wide, late-loaded — not recommended for schema), and Code Block directly in the page body (Business plan and above; last-resort when head is restricted). Code Injection is available on Core, Plus, Advanced, Business, Commerce Basic, and Commerce Advanced plans — not Personal1.

The scope choice maps directly to schema cardinality. Organization is site-wide because the brand doesn't change page to page. Article is per-page because every article has its own headline, author, and date. Getting the scope wrong is the most common Squarespace schema install error — site-wide Article injects the same Article block onto the homepage, contact page, and pricing page, which is structurally wrong.

What Code Injection is on Squarespace

Code Injection is Squarespace's mechanism for adding custom HTML, CSS, or JavaScript to a site's head or footer without editing template files directly. For JSON-LD specifically, Code Injection is the canonical install path: paste a script tag with type application/ld+json containing the JSON payload, and Squarespace injects it into the rendered page. The mechanism is plan-gated — Personal plan does not have access — and split into site-wide controls (under Settings) and per-page controls (under Page Settings on each individual page).

The mental model: site-wide Code Injection is a template-level feature, per-page Code Injection is a page-level override. Site-wide content emits on every page that uses any template; per-page content emits only on the specific page where it's set. Both inject into the head by default (the right place for JSON-LD); the Footer field in site-wide Code Injection injects into the body before the closing </body> tag, which works for analytics scripts but is suboptimal for schema.

Plan availability in 2026

Squarespace Code Injection availability in 2026 (verified from Squarespace's help center): Personal plan has no Code Injection access — JSON-LD is not installable inside Squarespace on Personal. Core, Plus, Advanced, Business, Commerce Basic, and Commerce Advanced all have Code Injection, with Business and Commerce plans adding the Code Block (an in-page embed). Squarespace renamed plans through 2024-2025, so older guides referencing 'Personal vs Business' may not align cleanly with the current naming.

For Personal-tier sites, the practical options are: upgrade the plan, or accept that the structured layer of the site can't be patched from inside Squarespace. There are workarounds involving header-loaded third-party tools (e.g. Google Tag Manager injecting JSON-LD), but they introduce a JavaScript dependency that some crawlers handle poorly. A plan upgrade is cleaner.

Code Injection plan map in 2026

No

Personal-tier Squarespace plan: no Code Injection, no native JSON-LD install path.

Squarespace Help · 2026
Yes

Core, Plus, Advanced, Business, Commerce Basic, Commerce Advanced: full Code Injection with site-wide and per-page access.

Squarespace Help · 2026
Block

Code Block (in-page custom HTML) is available on Business plan and above.

Squarespace Help · 2026

The four placement scopes for JSON-LD

Four scopes exist. Site-wide Header is the right place for entities that describe the brand or site (Organization, LocalBusiness). Per-page Header is the right place for entities that describe one specific page (Article, Service, Product, Event, Person, BreadcrumbList trails). Site-wide Footer is technically a valid scope but suboptimal for schema because it loads after the page body. Code Block is the in-page fallback when head access is restricted by the template — works but is the last resort.

Settings > Advanced > Code Injection > Header. Pastes load into the head of every page on the site, in order. Use for Organization (the brand entity), LocalBusiness (the business entity, once per business), site-wide WebSite schema if used, and any sitewide BreadcrumbList rule that genuinely applies identically to every page.

The Header field accepts any HTML, so wrap JSON in <script type="application/ld+json"></script>. Multiple JSON-LD blocks can stack — each goes inside its own script tag. Save propagates to live within seconds; the JSON-LD appears in the head of every page on the next request.

Page Settings > Advanced > Page Header Code Injection (open the gear icon on a specific page). Pastes load into the head of only that one page. Use for Article (every blog post), Service (every service page), Product (every product page when layering on Commerce's auto-emission), Event (every event page), Person (the founder bio page), and the BreadcrumbList trail for that specific page.

Per-page is the most common scope for the 12-type library — eight of the twelve types belong here. Saving propagates immediately; verify by viewing source on the live page.

Settings > Advanced > Code Injection > Footer. Pastes load near the closing body tag on every page. Valid for analytics, chat widgets, and tracking pixels — not recommended for schema. JSON-LD in the body parses but is less reliable for crawlers that read head-first. If a third-party tool insists on footer placement, use it — the schema still works — but prefer Header when both options exist.

A narrow exception: late-loaded third-party schema injectors (Yotpo, some review platforms) sometimes use the footer to write JSON-LD via JavaScript. That works because Google does some JavaScript execution during crawl, but the timing is fragile and the SERP enhancement may be slower to surface. When you can choose, choose Header.

Scope 4 — Code Block (in-page)

Available on Business plan and above. The Code Block is a custom-HTML container added directly into the page body via the Squarespace editor. JSON-LD pasted into a Code Block renders inline in the DOM rather than in the head. Use when head access is restricted by the template (rare on standard 7.1) or when the schema needs to live inside a specific block for visual layout reasons.

Code Block schema works in validators and in Google's understanding layer, but is the least canonical placement. Prefer Header Code Injection for almost all cases; reach for Code Block only when the template's head access is somehow blocked or when a third-party tool's documentation specifically requires inline embedding.

Picking the right scope for each schema type

The decision tree: Does the schema describe the brand as a whole? → Site-wide Header. Does it describe one specific page? → Per-page Header. Is the template restricting head access for some reason? → Code Block (in-page). Avoid the Footer field for schema regardless. For the 12-type library, the mapping is fixed: Organization, LocalBusiness, and site-wide patterns go site-wide; Article, Service, Product, Event, Person, BreadcrumbList go per-page; FAQ and HowTo go per-page when they belong on a page at all.

The @graph pattern for layered schema

When a page needs multiple entity types in one JSON-LD block — Article plus BreadcrumbList plus Person, say — wrap them in a single @graph array rather than scattering multiple script tags. The @graph pattern is the Schema.org idiom for related entities on the same page; it produces cleaner validator output and lets entities reference each other by @id.

The shape: one top-level @context, then @graph as an array of entity objects. Each entity inside the graph has its own @type and properties. Entities can reference each other via @id instead of inlining nested objects, which produces a graph rather than a tree and reduces duplication.

JSON-LD @graph pattern — Article, Person, Organization, BreadcrumbList in one block
 <script type="application/ld+json"> { "@context": "https://schema.org", "@graph": [ { "@type": "Organization", "@id": "https://yoursite.com/#org", "name": "Your Brand", "url": "https://yoursite.com/" }, { "@type": "Person", "@id": "https://yoursite.com/founder/#person", "name": "Founder Name", "url": "https://yoursite.com/founder/" }, { "@type": "Article", "headline": "Your article title", "datePublished": "2026-05-18", "author": { "@id": "https://yoursite.com/founder/#person" }, "publisher": { "@id": "https://yoursite.com/#org" } }, { "@type": "BreadcrumbList", "itemListElement": [ { "@type": "ListItem", "position": 1, "name": "Home", "item": "https://yoursite.com/" }, { "@type": "ListItem", "position": 2, "name": "Blog", "item": "https://yoursite.com/blog/" } ] } ] } </script> 

Validating after every install

Run two validation passes after any Code Injection change. First: Google's Rich Results Test (search.google.com/test/rich-results) to confirm rich-result eligibility for the types Google still surfaces. Second: Schema.org Markup Validator (validator.schema.org) for structural validity against the current Schema.org vocabulary. A clean pass on both means the install is complete. An error on either means fix and re-run before treating the install as done.

For the Schema.org validator, expect occasional warnings about deprecated properties or recommended-but-missing fields — informational, not blocking. Errors (malformed JSON, invalid @type values, broken @id references) need fixing.

Common gotchas on Squarespace Code Injection

Five gotchas catch most Squarespace JSON-LD installs. First: scope mismatch — site-wide schema where per-page is correct, or vice versa. Second: smart quotes auto-corrected by the Squarespace editor. Third: missing the application/ld+json mime type on the script tag, which makes the block invisible to validators. Fourth: duplicate type emission conflicting with Squarespace's auto-emitted schema (BlogPosting on blogs, Product on Commerce). Fifth: pasting JSON-LD into the wrong subfield — the Header field accepts HTML, the Footer field accepts HTML, but the SEO panel's meta description does not.

A sixth gotcha worth naming for sites with developer mode enabled: template-level structured data injected via .json template files can collide with Code Injection JSON-LD. If you've enabled developer mode and customised the template, audit the template's emitted schema before adding more via Code Injection.

Every leaf in this pillar uses one of the four scopes documented above. The mapping is fixed: Organization and LocalBusiness go site-wide; Article, Service, Product, Event, Person, BreadcrumbList, FAQ, HowTo, Review go per-page. The four scopes are the same scopes used elsewhere on a Squarespace site for non-schema purposes (analytics, CSS, JavaScript) — the placement pattern is general.