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

2 Answers2

0

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).

Community
  • 1
  • 1
unor
  • 92,415
  • 26
  • 211
  • 360
0

If this question is still relevant to someone, here is my recommendation:

  1. on the homepage, create a "LocalBusiness" markup and use the "department" attribute for each branch.

So in your case, there should be one main office and 19 departments.

For the main office, indicate all attributes (opening hours, logo, image, etc.) For branches, mark up only distinct properties, such as address or telephone (they are apparently different for each branch).

For example, if all branches have the same working hours, no need to repeat them again and again - indicate working hours only for the main office.

  1. Then on each dedicated contact details page add "LocalBusiness" markup only for that specific branch - without departments. You can indicate all attributes in detail.

  2. Do not add "LocalBusieness" sitewide - Schema markup must be relevant to a specific page.

Also, here is an article that can help to understand it better:

https://postelniak.com/blog/local-business-schema-for-multiple-locations/

There you can also find JSON-LD code snippets.

Dharman
  • 30,962
  • 25
  • 85
  • 135