How do you include a product's aggregate rating in the structured data?

Solved
travis-eog
New Member
3 1 0

I've been searching the forums and haven't found a way to publish the product's aggregate rating value. We use TrustPilot for our reviews and have reviews for some of our products, but when I run the Google Structured Data Testing Tool on our product pages, we get this warning:

aggregateRating 
The aggregateRating field is recommended. Please provide a value if available.

 

Any suggestions?  

0 Likes
travis-eog
New Member
3 1 0

This is an accepted solution.

So this was interesting. 

It turns out the theme we were using was creating structured data for our product information but obviously didn't have access to the data from TrustPilot. 

The Trustpilot TrustBox can generate this data as well but was skipping the http://schema.org/Product portion because the theme was already inserting this part. 

Solution: comment out/ disable the theme's structured data found in templates/product.liquid and let the TrustPilot widget handle it. 

That said, the TrustPilot widget does not implement the `availability` parameter, which is a bit of a disappointment. But I think the `aggregateRating` is more important for us to have on our pages.

0 Likes
AbuAlee
New Member
2 0 0

I am using the 'simple theme' under shopify and google search console has detected 10 issues for 25 products. They are as follows

google search console detecting errors.jpg


I want to know how do I correct this under the 'simple theme' of shopify. These errors are being shown for individual product pages, a total of 25 of them. I have tried to find an option where I could correct these errors but in vain.

Please help.

0 Likes
MR6
New Member
4 0 0

Hi @AbuAlee,

Here is the URL https://developers.google.com/search/docs/data-types/product which will help you how to set up the meta information for Google.  

0 Likes