0

I'm new to JSON-LD. I find the syntax fairly straightforward but my query lies more with deciding which pages it is best to add the JSON-LD to. I've spent a bit of time looking for an answer online but so far nothing has been clear.

My example:

The site is for a business that has roughly 20 branch locations across the country. Each office has a dedicated contact details page, and there is also a "contact us" page for the site as a whole.

Should I

A: Add 'Organisation' JSON-LD snippet for the organisation as a whole to the homepage of the site, and then add individual 'LocalBusiness' JSON-LD snippets to each office details page?

B: Consolidate all this into one snippet of JSON-LD that has 'Organisation' with nested 'LocalBusiness'es and place it on ALL office pages, with a separate 'Organisation' snippet for the homepage?

C: Consolidate all this into one snippet of JSON-LD that has 'Organisation' with nested 'LocalBusiness'es and place it on ALL pages sitewide?

D: None of the above... Instead you should ____________________.

I realise there may not be one correct answer for this, but any help at all in achieving what would be considered best practice, would be greatly appreciated!

Cheers

1 Answer 1

1

Per the JSON-LD specification, it’s totally up to the authors. Consumers of your JSON-LD might of course have their own expectations.

You seem to use the vocabulary Schema.org, which is sponsored by the big Web search engine services. They are of course typically interested in your page content. The general idea of Schema.org is to mark up your existing content (+ closely related metadata).
This becomes clear when looking at the other syntaxes supported by Schema.org (Microdata and RDFa), as they define attributes that get added to existing HTML elements used for your content. So JSON-LD is the exception here, as it doesn’t get coupled with the HTML/content.

tl;dr: On a page about a branch location, provide structured data about this branch location.

It typically makes sense to provide structured data about related entities (e.g., the parent organization) in addition. This can be done by including the data and/or by referencing it via its URI (see an example). Make use of the properties the type offers (e.g., parentOrganization).

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.