17

How do I set up AggregateRating when the object is not rated yet (ratingValue = 0)?

My current setup is:

<div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
    <meta itemprop="ratingValue" content="0" />
    <meta itemprop="bestRating" content="5" />
    <meta itemprop="worstRating" content="1" />
    <div itemprop="ratingCount">0</div>
</div>

When I check the Microdata with the Google Testing Tool I get an error "Failed to standardize the rating value". Do I just have to set worstRating to 0? Or is there an other way to tell that there’s no rating yet?

unor
  • 92,415
  • 26
  • 211
  • 360
devOp
  • 3,150
  • 1
  • 18
  • 32

2 Answers2

10

The schema specifically states that ratingValue is of type text, whilst bestRating and worstRating are text/number. This suggests you could put anything into ratingValue, even "not ranked". However, how Google would interpret that is up to debate.

However it seems to me the ACTUAL CORRECT way to implement this is to only give an aggregateRating where ratingCount > 0.

Simply omit the ratings when there are no ratings.

Aron
  • 15,464
  • 3
  • 31
  • 64
  • 2
    Okay thanks. When i set ratingValue to "not ranked" or "null" or when i remove the ratingValue tag i still get an error. So it seems that only setting ratingCount > 0 or setting worstRating = 0 is working "correctly". Removing the whole rating-thing works also :-) but i am not sure how google will rate this... – devOp May 23 '15 at 07:59
3

Well, I guess it does not make sense to specify a ratingValue of 0 if the worstRating should be 1:

  • worstRating must be the "lowest value allowed in this rating system", which would be 0 in your case.

  • A ratingValue of 0 does not mean that there are no votes yet (i.e., 0 has not a special meaning), as 0 is certainly a valid rating value (some rating systems allow this).

So either set worstRating to 0, or omit ratingValue for items not rated yet.

unor
  • 92,415
  • 26
  • 211
  • 360