Schema.org AggregateRating markup when ratingValue is Empty
Asked Answered
T

1

9

I am implementing structured data into an app with the AggregateRating markup. The problem is that when 0 ratings are present the rating value is empty. I get the following error when using Google Structured Data Testing Tool.

Field ratingValue may not be empty.

<div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
<meta itemprop="reviewCount" content="0">
<meta itemprop="ratingValue" content="">
...
</div>

The app uses the default 1 to 5 rating scale.

Is there a default value that complies with Schema.org that can be passed to when the ratingValue is empty? I don't want to pass it an arbitrary number on the scale just to avoid the error...

Tiaratibbetts answered 27/9, 2015 at 2:4 Comment(0)
J
9

The Google Structured Data Testing Tool error you quote is misleading. It’s not an error with your use of Schema.org or Microdata.

Instead it just means that Google probably won’t consider displaying their Aggregate Ratings Rich Snippet for your document in Google Search (naturally, because a rating value would be required for this).

However, providing the empty string as value for the ratingValue property doesn’t really make sense here. So why not simply omit the property? And ideally you would omit the aggregateRating property with the AggregateRating altogether if you don’t have any reviews yet.

Juniper answered 27/9, 2015 at 2:42 Comment(4)
Thanks for the explanation. Do you see any issues passing ratingValue of 1 and a reviewCount 0 ?Tiaratibbetts
@JeffD23: I have no experience with this; in such cases, I’ve always omitted generating the properties. But I guess nothing bad should happen (if you really want to have a rating of 1 in case of no reviews yet).Juniper
The SDTT recently recommends including aggregateRating for Products. Which is a bit annoying when they don't show what to do if there are no reviews. I personally exclude the aggregateRating when there are no reviews, and now get the warnings.Acerbate
Also google added warnings on products (new report) to google search console when there are no rating.Edict

© 2022 - 2024 — McMap. All rights reserved.