1

I use SoftwareSourceCode structures in my pages, I include aggregateRating as such:

<div itemscope="itemscope" itemtype="http://schema.org/SoftwareSourceCode">
  <span itemprop="aggregateRating" itemscope="itemscope" itemtype="http://schema.org/AggregateRating">
    <span itemprop="ratingValue">0</span>
  </span>
</div>

However, Google shows this out to me:

Three errors in Google's SDTT

The problem is that I do not have any specific min/max voting, it's a simple voting system where anyone can upvote/downvote by 1.

So my question is, what is the better alternative for this? Or how can I get around it?

1

The first error (providing ratingCount or reviewCount) in the SDTT is about conforming to the guidelines from Google’s Review rich results. As Google doesn’t seem to offer these rich results for the SoftwareSourceCode type, you can ignore it. Schema.org never requires a property.

The two following errors are given because you use "0" as ratingValue. If you don’t provide worstRating and bestRating, the values "1" and "5" are assumed (by Schema.org as well as Google).

(Note that AggregateRating is for the average rating. So when 5 users vote "+1", and no user votes "-1", the average is "1", not "5".)

| improve this answer | |
  • While your answer explains the errors shown above, it doesn't provide an actual solution. Is there still anyway do provide a rating for Google, or do I need to remove the rating part entirely? – OverCoder Nov 17 '17 at 16:18
  • @OverCoder: If "for Google" means that you want to get the Reviews rich result, then no, there doesn’t seem to be a way, because SoftwareSourceCode is not supported by Google for this rich result (as said in my first paragraph). If you don’t care about the rich result, you can keep your markup like that, but then you should change the way you represent your ratings, so that you get an average value (e.g., between 0 to 1, or 1 to 5, or whatever makes sense for you). – unor Nov 17 '17 at 19:31

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.