Reputation: 1049
I would like to add AggregateRating
information to my website in order to have stars displayed in Google's search result.
On Google's development website, it says that this is only possible for five different review types:
In my case, none of these types describe what is rated on my site. However, I found a website which does not define any type in its markup, and still the AggregateRating
is displayed in Google's search result.
The website https://www.1averbraucherportal.de/ernaehrung contains the following markup:
<div style="display: none;" itemprop="aggregateRating" itemscope="" itemtype="http://schema.org/AggregateRating">
<meta itemprop="bestRating" content="5">
<meta itemprop="worstRating" content="1">
<meta itemprop="ratingValue" content="3.46">
<meta itemprop="ratingCount" content="158">
</div>
It contains no type, but the rating is considered by Google: https://www.google.de/search?q=site%3A1averbraucherportal.de+ernaehrung
My questions:
Upvotes: 0
Views: 489
Reputation: 96547
The site in question does provide a type for the item that gets rated: Article
.
In your example, aggregateRating
is a property with a value of type AggregateRating
. This property belongs to another item, namely, the nearest parent element with an itemscope
attribute. So the full relevant markup from their page is:
<span itemscope itemtype="http://schema.org/Article">
<!-- … -->
<div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
<!-- … -->
</div>
</span>
(Note that the HTML is invalid.)
If you wouldn’t provide a parent element with itemscope
, the HTML+Microdata would be invalid. But it’s possible and valid to just provide an itemscope
attribute, without an itemtype
attribute.
So the aggregateRating
property could belong to an item for which it’s not specified what this item represents:
<div itemscope>
<div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
<!-- … -->
</div>
</div>
But you could as well use Schema.org’s Thing
type (everything is a Thing
):
<div itemscope itemtype="http://schema.org/Thing">
<div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
<!-- … -->
</div>
</div>
That said, all this doesn’t mean that Google Search will display their rich result. They have their rules, and even if they display it sometimes for content that doesn’t follow these rules, this might depend on various unknown factors, and it could change any day.
Upvotes: 1