3

Our site is a review site, not a shop. We have 'product description' pages that list product information with a bunch of user reviews. At the top you can see the product, its price, and the aggregate score.

I think this page is fundamentally an AggregateRating type, right? But it also has a bunch of data relevant to product, brand, offers, etc.

How do you think I should structure this? Here's what I was thinking for the general layout:

<li itemscope itemtype="http://schema.org/AggregateRating">
        <span itemprop="itemReviewed" itemscope itemtype="http://schema.org/Product"> 
            <img itemprop="image">  
            <b itemprop="name"></b>
            <span itemscope itemtype="http://schema.org/PriceSpecification">
                <em itemprop="price" priceCurrency="USD"></em>
            </span>
        </span> <!-- Product itemscope end -->
        <meta itemprop="bestRating" content="5"> <!-- set range of possible ratings -->
        <meta itemprop="worstRating" content="0">
        <span itemprop="ratingValue"></span>
        <span itemprop="reviewCount"></span>
    </span> 
</li>

Schema.org only shows examples of AggregateRating nested inside of other data -- is it incorrect to use it like this?

1

That’s what the itemReviewed property is for, so yes, nesting it like that is fine.

Note that nesting items in other items doesn’t connect them, unless you use a property. So your PriceSpecification is standing on its own, it’s not related to the Product in any way.

If you want to provide the price(s) of a product, you have to provide Offer items (or an AggregateOffer). Use the offers property for this.

(Also, the em element can’t have a priceCurrency attribute.)

So the structure could be:

<div itemscope itemtype="http://schema.org/AggregateRating">

  <div itemprop="itemReviewed" itemscope itemtype="http://schema.org/Product">

    <div itemprop="offers" itemscope itemtype="http://schema.org/AggregateOffer"> <!-- or omit this "AggregateOffer" if you don’t want to provide e.g. a "lowPrice" -->

      <ul>
        <li itemprop="offers" itemscope itemtype="http://schema.org/Offer"></li>
        <li itemprop="offers" itemscope itemtype="http://schema.org/Offer"></li>
        <li itemprop="offers" itemscope itemtype="http://schema.org/Offer"></li>
      </ul>

    </div>

  </div>

</div>
  • Just to clarify, the Product is connected to the AggregateReview because it has both the itemReviewed and the itemscope markup. Is that a correct assumption? – Daniel Thompson Dec 21 '17 at 9:48
  • 1
    @DanielThompson: itemscope creates the item (and itemtype gives this item a type). Only itemprop connects items. So without itemprop, you would have two stand-alone / top-level items, an AggregateRating and a Product, not connected/related. With the itemReviewed property, you convey: this AggregateRating is for this Product. – unor Dec 21 '17 at 12:36
  • Wow I had no idea appreciate the info! – Daniel Thompson Dec 22 '17 at 2:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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