2

According to Google this is a typical review markup in JSON-LD

<script type="application/ld+json">
    {
      "@context": "http://schema.org/",
      "@type": "Review",
      "itemReviewed": {
        "@type": "Thing",
        "name": "Super Book"
      },
      "reviewRating": {
        "@type": "Rating",
        "ratingValue": "7",
        "bestRating": "10"
      },
      "author": {
        "@type": "Person",
        "name": "Joe"
      },
      "publisher": {
        "@type": "Organization",
        "name": "Washington Times"
      }
    }
    </script>

I have multiple reviews of different (but similar) products on the same page. One solution would be to have a different script for each review. But since the author and publisher are the same for all reviews and only the item reviewed and rating change, I wonder if I could have a combined, more compact script.

I have read this similar question, but my question is more complicated.

1 Answer 1

1

You can provide multiple Review items (in the same script element or in multiple script elements), but you can’t define a property once and let all your items "inherit" it. Microdata and RDFa would allow this to some extent.

What you can do: give the Person and Organization items an URI and provide this URI as value for the author and publisher properties.

So you would still have to to provide author/publisher for each Review, but instead of repeating the data, you just "link" to it:

"author": {"@id": "/authors/joe#i"},
"publisher": {"@id": "/publishers/washington-times#this"}

Note that not necessarily all consumer support this, of course. Some may only support it if the referenced items are defined on the same page, some not at all.

It’s also possible to mix both ways: provide the URI of the item (ideally pointing to a page where the full data about it is provided), and define important properties in addition, too.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.