Structured data, hands on
Part 6 · Reading a page4 minEdit a JSON-LD block and see what a scan reads: a stray comma, generic types, a product missing its currency, graphs, two names for one company, and sameAs.
- Parsesvalid JSON
- TypesProductOffer
- Productcomplete
- Companyno Organization
- sameAsnone
Facts in a fixed form
The block on the left is JSON-LD: facts about the page in the schema.org vocabulary, inside a script tag. Edit it, and the reading on the right follows.
This one says the page is a Product, with a name, an image, and an offer at €24. A scan reads the same.
Why it matters. Structured data says outright what the page is about. Nothing has to be guessed from the layout.
One stray comma
JSON is strict. A comma before a closing brace, and the whole block fails to parse: none of its facts are read.
A scan reports a block that fails apart from one that is missing, because the fixes differ: one is a typo, the other is work.
Why it matters. A block that does not parse says nothing. Validate it whenever the template changes.
The types that count
schema.org has hundreds of types. A handful do most of the work: Organization, WebSite, Product, Article, FAQPage, LocalBusiness and BreadcrumbList.
This block uses Thing, the most generic type there is. Change it to Product and see what is read.
Why it matters. Use the type that says what the page is. A generic Thing tells an agent almost nothing.
A product, complete
For a product, four fields matter first: the name, an image, and an offer with a price and a currency.
This offer has a price and no currency. €24 or $24 or ¥24 is a guess. Add “priceCurrency”: “EUR” to the offer.
Why it matters. Name, image, price and currency. A product missing one of them is a product an agent cannot quote in full.
A graph of nodes
Many sites put several facts in one block, under @graph: the website, the company, the page. WordPress plugins such as Yoast write it this way.
A scan walks the graph and reads each node once. Counting a node twice used to give such sites the wrong score.
Why it matters. One block can describe the whole site. A reader should find each node once, wherever it is nested.
One company, two names
When two Organization nodes give different names, an agent cannot tell which one is the site. It may pick either, or trust neither.
Here a theme says “Bean & Brew” and a plugin says “Bean and Brew Ltd”. Make them agree and the warning goes.
Why it matters. Use one name for the company everywhere in the markup, the same one the page shows.
Tied to the world
sameAs lists other pages about the same company: Wikidata, Wikipedia, LinkedIn, Crunchbase. They tell an agent which real company this is.
This block has none. Add a link to its LinkedIn page, and the company has one known identity.
Why it matters. sameAs links tie the company to entities agents already know. A few good ones beat many.