Quick Answer: To add schema markup, write a JSON-LD script describing the page, paste it into the head of the server-rendered HTML, and confirm it with Google's Rich Results Test. Google reads JSON-LD in head or body, but schema delivered in the initial HTML gets parsed fastest and most reliably.

Adding structured data is a mechanical task. There are exactly three ways to do it: paste JSON-LD directly into your templates, let your CMS or a plugin generate it, or inject it with a tag manager. Two of those are fine. One of them is a gamble that most tutorials present as an equal option, and we will spend part of this page explaining why it is not. This is Vector 6 work in our 12 Vectors methodology: Structure, the layer where machines stop guessing what your page means and start reading a declaration of it.

This guide covers where the code belongs in the HTML, the step-by-step for WordPress, Shopify and static sites, one worked example built line by line, validation, and the maintenance habit almost everyone skips. If you first want grounding on what schema markup is conceptually, start with our local business schema guide and come back here for implementation.

What are you actually adding to the page?

Schema markup, in nearly every modern implementation, is a single <script type="application/ld+json"> block containing a JSON object that describes the page in the shared vocabulary published at Schema.org. That vocabulary was created in 2011 by Google, Microsoft, Yahoo and Yandex so that every search engine could read one common description format instead of four proprietary ones. The other two syntaxes, Microdata and RDFa, weave attributes through your visible HTML tags; they still work, but Google's documentation states a preference for JSON-LD, and every serious tool now generates it by default.

The practical consequence: you are not editing your visible content at all. You are adding one self-contained script block that says, in machine-readable terms, "this page is an Article, written by this Person, published by this Organization, on this date." The block does nothing visual. Browsers ignore it. Crawlers read it.

Where in the HTML does schema belong?

Google accepts JSON-LD in either the <head> or the <body>. Both parse. The head is the convention worth keeping for two reasons. First, it groups structured data with the rest of the page's machine-facing metadata (title, canonical, Open Graph), so an auditor, human or agent, finds everything in one place. Second, it keeps the block clear of body-level tampering: lazy-loading scripts, content optimizers and page builders rarely touch the head.

The placement question that actually matters is not head versus body. It is server response versus JavaScript injection. A JSON-LD block that arrives in the initial HTML is parsed on the first crawl, every time, by every crawler. A block injected after page load by JavaScript is only visible to crawlers that execute JavaScript, and only after a rendering step that Google itself describes as adding delay and complexity. Hold that thought; it decides which of the three methods below you should use.

Method 1: JSON-LD pasted directly into the head

This is the cleanest implementation and the one this very page uses. The workflow:

  1. Decide the types. Match the page's purpose to a Schema.org type: LocalBusiness for a location page, Article for a blog post, Product for a product page, FAQPage where visible questions and answers exist. Do not stack types the page cannot support.
  2. Draft the JSON-LD. Write it by hand, or generate a starting block with our free schema generator and edit the values to match the page exactly.
  3. Wrap it in a script tag. <script type="application/ld+json"> ... </script>, placed inside <head>.
  4. Validate before publishing. One missing comma makes the whole block unreadable; JSON has no partial credit.

Direct pasting suits static sites, hand-built templates and any stack where you control the HTML. Its weakness is maintenance discipline: nothing updates the block automatically when the page facts change, so the update habit in the final section becomes mandatory rather than optional.

Method 2: CMS fields and plugins

Most content management systems will generate schema for you, and for most business owners this is the right trade. The generated graph is less elegant than a hand-built one, but it stays synchronized with the content because the CMS writes it from the same database fields that render the page.

Plugin and field options by platform

  • WordPress: Rank Math and Yoast both output an Article, Organization and BreadcrumbList graph server-side with sensible defaults. Rank Math adds per-post schema type controls on the free tier.
  • Shopify: most modern themes emit Product and Organization schema natively; apps or theme.liquid edits extend it.
  • Squarespace, Wix, Webflow: built-in structured data for core types, plus a per-page code injection field for custom JSON-LD.
  • Headless or custom frameworks: render the JSON-LD in the server component or template, never in a client-only effect.

The plugin route has one recurring failure mode: duplication. A theme that emits Organization schema plus a plugin that emits Organization schema gives Google two competing declarations of the same entity, often with mismatched details. Pick one source of truth per type and switch the other off.

Method 3: Google Tag Manager, and why we do not use it

Plenty of tutorials teach schema injection through GTM: create a Custom HTML tag, paste the JSON-LD, fire it on page view. It works, in the narrow sense that Googlebot can eventually see the markup. Here is what those tutorials leave out.

What Google's own documentation says about JavaScript-generated structured data

Google's Search Central guide on generating structured data with JavaScript confirms Googlebot can process it, then immediately notes the trade-offs: the page must pass through the rendering queue before the markup exists, rendering is resource-dependent rather than instant, and injected markup is harder to test and debug. The same documentation family recommends including structured data in the server response where possible. When the vendor that owns the rendering pipeline hedges this much, treat the hedge as the headline.

The deeper problem is who else is reading your site in 2026. AI crawlers are not uniform JavaScript renderers. Some execute scripts, some fetch raw HTML and move on. A block that only exists after client-side execution simply does not exist for the crawlers that never execute. That is why Formative Digital runs an SSR-only rule on every build: structured data ships in the server-rendered HTML, on every page, with no exceptions. Not because GTM schema is penalized, but because raw-HTML delivery is the only version that reaches every reader, human-built or machine.

Matt Griffin, Formative Digital: "The audit pattern I keep seeing with Ontario businesses is a site that validates perfectly in the browser and shows nothing in a raw curl of the page. The developer tested with a rendering tool, the schema lived in a tag manager, and half the crawlers visiting that site never saw a byte of it. If the markup is not in the HTML the server sends, I treat it as not implemented."

WordPress, Shopify and static sites: the specific steps

WordPress

Install Rank Math or Yoast, complete the setup wizard's Organization details (exact business name, logo URL, phone), and set default schema types per post type: Article for posts, WebPage for pages. For a business with a physical location, enable Local SEO settings so LocalBusiness markup lands on the contact or location page, one page, not every page. Verify by viewing page source, not the browser inspector, and confirming the ld+json block is present in the raw output. WordPress renders server-side, so plugin schema passes the SSR rule automatically.

Shopify

Check what your theme already emits first: view source on a product page and search for application/ld+json. Most current themes cover Product, Offer and Organization. Gaps get filled two ways: a schema app from the Shopify App Store, or a direct edit to theme.liquid (or the relevant section file) adding a Liquid-templated JSON-LD block, which lets values like price and availability populate dynamically from the store database. Avoid running a schema app on top of complete theme markup; that is the duplication trap again, and duplicate Product schema with conflicting prices is a rich-result killer.

Static sites

Paste the block into the head of each template or page, exactly as Method 1 describes. Static HTML is the SSR rule in its purest form: what you wrote is what every crawler receives, byte for byte. This is one reason Formative Digital builds on static HTML; there is no rendering layer to break, and no plugin update that can silently rewrite the graph. The cost is manual upkeep, which the maintenance section below turns into a routine.

A worked example, built step by step

Say you run a plumbing company and want your contact page to declare the business to search and AI engines. Step one: the type is LocalBusiness (or its subtype Plumber). Step two: gather the facts as they appear on your Google Business Profile, because the two must match: name, address, phone, hours, URL. Step three: assemble the block. The finished markup, shown here as readable code, looks like this:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Plumber",
  "name": "Example Plumbing Co.",
  "url": "https://www.exampleplumbing.ca/",
  "telephone": "+15195550123",
  "address": {
    "@type": "PostalAddress",
    "streetAddress": "123 Colborne St",
    "addressLocality": "Brantford",
    "addressRegion": "ON",
    "postalCode": "N3T 2G6",
    "addressCountry": "CA"
  },
  "openingHoursSpecification": [
    {
      "@type": "OpeningHoursSpecification",
      "dayOfWeek": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"],
      "opens": "08:00",
      "closes": "17:00"
    }
  ],
  "areaServed": "Brantford and Brant County"
}
</script>

(Example Plumbing Co. is a placeholder; substitute your own verified details.) Step four: paste the block into the head of the contact page template. Step five: load the live page, view source, and confirm the block appears in the raw HTML. Step six: run the URL through the Rich Results Test. That full sequence, for one page, takes under twenty minutes the first time and under five once the routine is familiar. A deeper walkthrough of the same pattern for content pages lives in our article schema example.

How do you validate schema markup?

Two tools, two different questions:

Then confirm in Google Search Console. Under Enhancements, GSC reports which structured data types it found on which pages, with errors and warnings. Errors block eligibility and need fixing; warnings flag missing optional fields and are worth reviewing, not panicking over. A page can be valid and still earn no rich result; eligibility is a precondition, not a promise, and results vary with query, competition and Google's own display choices.

Why the effort is worth it beyond rich results

The Princeton GEO study (Aggarwal et al., 2023, arXiv:2311.09735) measured what raises a page's odds of being cited by generative engines across roughly 10,000 queries: quoted experts, statistics and citations to authoritative sources led the lift. Structured data is the delivery mechanism that makes those signals unambiguous to machines, which is why we implement schema and citable content as one discipline, not two.

The maintenance habit: schema is a living declaration

Schema breaks quietly. A theme update rewrites a template, a plugin changes its output format, a price changes in the store but not in a hand-pasted block, and nothing looks different in the browser. The declaration and the visible page drift apart, and drift is worse than absence: markup contradicting visible content reads as deceptive to Google's quality systems and as unreliable to AI engines deciding whether to repeat your facts.

The routine we run for clients, and recommend if you self-manage:

Honest date-stamping matters here. Bumping dateModified without changing anything is a cosmetic freshness trick that quality systems increasingly discount; update the date when you update the substance.

When is this worth handing to a professional?

A single LocalBusiness block on a contact page is a do-it-yourself job, and the steps above are the whole job. The work earns specialist attention when the graph gets relational: connecting Article to Person to Organization with stable @id references, coordinating FAQPage markup with visible content so the two never diverge, or building consistent entity declarations across dozens of pages so search and AI engines resolve your business as one entity rather than fragments. That interconnected layer is our schema markup service, and it is engineering, not paperwork: every declaration verifiable against the visible page and against your Google Business Profile.

If you want a read on where your current markup stands before deciding anything, the audit form below covers it. We check raw-HTML delivery, validation status and entity consistency across your key pages, and send back what we find.

Find out what crawlers actually see on your site

A no-charge audit of your structured data: raw-HTML delivery, validation errors, duplicate declarations, and entity consistency across Google, ChatGPT, Perplexity and Gemini. Reply within one business day.

Frequently Asked Questions

Where exactly does schema markup go in the HTML?

A JSON-LD script block can sit anywhere in the head or body; Google parses both. The head is the convention because it keeps structured data separate from visible content and makes audits faster. What matters more than head versus body is that the script arrives in the initial server response, not injected later by JavaScript.

Do I need a plugin to add schema markup to WordPress?

No, but a plugin is the practical route for most owners. Rank Math and Yoast both output Article, Organization and breadcrumb schema server-side, which satisfies the SSR requirement. Hand-coding into the theme gives finer control over the graph, but plugin output that validates in the Rich Results Test is entirely adequate for most local businesses.

Is schema added through Google Tag Manager bad for SEO?

It is a gamble rather than a penalty. Google can read GTM-injected JSON-LD, but only after the page passes through its rendering queue, and Google's own documentation recommends structured data in the server response. Other engines and AI crawlers render JavaScript inconsistently or not at all, so GTM schema is invisible to part of your audience.

How often should schema markup be updated?

Whenever the facts on the page change: hours, prices, staff, service areas, article revision dates. As a floor, re-validate key templates quarterly with the Rich Results Test, because theme updates, plugin updates and app changes can silently break output. Stale schema that contradicts visible content erodes trust with both Google and AI engines.

Does schema markup help with AI search visibility in Canada?

Structured data is not a requirement for AI answers, and Google says so plainly, but it remains the clearest machine-readable statement of who you are, where you operate and what you sell. In Matt Griffin's testing with Ontario service businesses, pages with clean server-rendered schema are the ones AI assistants describe accurately, and accuracy precedes citation.

Sources

  1. Google Search Central. "Intro to How Structured Data Markup Works." Google for Developers. Link
  2. Google Search Central. "Generate Structured Data with JavaScript." Google for Developers. Link
  3. Schema.org. "Getting Started with Schema.org Using Microdata." Schema.org. Link
  4. Aggarwal, P., Murahari, V., Rajpurohit, T., Kalyan, A., Narasimhan, K., & Deshpande, A. (2023). "GEO: Generative Engine Optimization." arXiv preprint arXiv:2311.09735. Link
  5. Semrush (2026). "What Is Schema Markup? & How to Add It to Your Site." Semrush Blog. Link

Talk it through before you build it

Formative Digital, Brantford, Ontario

If your schema project involves more than one page type, a short conversation now saves a rebuild later. Tell us what you sell and where, and we will map which types belong on which pages.

Request Your Free AI Visibility Audit