If you’ve encountered errors in Google Search Console related to JSON-LD schema, such as:
“Review has multiple aggregate ratings. Items with this issue are invalid. Invalid items are not eligible for Google Search’s rich results,“
this post will help you understand and resolve the issue. The solution lies in using the @id
property in your schema to fix structured data errors.
When working with JSON-LD structured data for SEO, it’s crucial to provide unique identifiers for nested objects. If objects like aggregateRating
, offers
, or author
etc. don’t have an @id
, Google may treat them as standalone entities, causing errors such as duplicate entries or multiple aggregate ratings.
For instance, the following schema caused issues:
{
"@context": "https://schema.org",
"@type": "SoftwareApplication",
"url": "https://example.com/plugins/mock-plugin",
"name": "Mock Plugin - A plugin for Obsidian",
"aggregateRating": {
"@type": "AggregateRating",
"worstRating": 0,
"bestRating": 100,
"ratingValue": 51,
"ratingCount": 2
},
"offers": {
"@type": "Offer",
"price": "0",
"priceCurrency": "USD"
},
"author": {
"@type": "Person",
"name": "mockauthor"
}
}
Google Search Console flagged this schema because it could not associate the aggregateRating
, offers
, and author
objects with the parent SoftwareApplication
object. This confusion leads to errors in structured data, reducing the chances of your page appearing as a rich snippet in search results.
To fix this, you need to add an @id
property to nested objects. This property acts as a unique identifier, ensuring that Google recognizes these objects as part of the same entity, thereby resolving the “multiple aggregate ratings” issue.
Here’s the updated schema:
{
"@context": "https://schema.org",
"@graph": [
{
"@type": "SoftwareApplication",
"@id": "https://example.com/plugins/mock-plugin",
"url": "https://example.com/plugins/mock-plugin",
"name": "Mock Plugin - A plugin for Obsidian",
"aggregateRating": {
"@type": "AggregateRating",
"@id": "https://example.com/plugins/mock-plugin#aggregateRating",
"worstRating": 0,
"bestRating": 100,
"ratingValue": 51,
"ratingCount": 2
},
"offers": {
"@type": "Offer",
"@id": "https://example.com/plugins/mock-plugin#offers",
"price": "0",
"priceCurrency": "USD"
},
"author": {
"@type": "Person",
"@id": "https://example.com/plugins/mock-plugin#author",
"name": "mockauthor"
}
}
]
}
To summarize
@id
property in nested or referenced objects to avoid ambiguity.By resolving issues like “multiple aggregate ratings” in your JSON-LD schema, you can significantly improve your content’s visibility and performance in search engine results.