Google keeps changing its recommendations for the right way to incorporate product reviews in your structured data. For example a couple of years back, I’d written about some changes in Google’s specifications and how to deal with them. But since then, standards have changed again, and it’s time to provide a new JSON template for online product reviews. It can be frustratingly hard to find a good example that works, and which doesn’t throw any errors when plugged into Google’s Structured Data Testing Tool. So I hope this helps!
Basic JSON Template for Reviews Structured Data
If you sell your products online (like web hosting), here’s a template for what you should be using:
<script type="application/ld+json">
{
"@context": "https://schema.org/",
"@type": "Product",
"name": "",
"image": "",
"description": "",
"sku": "xxxxxxxx",
"mpn": "xxxxxxxxx",
"brand": {
"@type": "Thing",
"name": ""
},
"review": {
"@type": "Review",
"reviewRating": {
"@type": "Rating",
"ratingValue": "",
"bestRating": ""
},
"reviewBody": "",
"author": {
"@type": "Person",
"name": ""
},
"publisher": {
"@type": "Person",
"name": ""
}
},
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "",
"reviewCount": ""
},
"offers": {
"@type": "Offer",
"url": "https://www.wp-tweaks.com/liquid-web-coupon-code-list-review/",
"priceCurrency": "",
"price": "",
"priceValidUntil": "2100-01-01",
"itemCondition": "https://schema.org/NewCondition",
"availability": "https://schema.org/OnlineOnly",
"seller": {
"@type": "Organization",
"name": ""
}
}
}
</script>
When incorporated into your review page, it satisfies Google and throws no errors. Here’s a screenshot of my NameHero review on WP-Tweaks:
As you can see, the star rating is displayed along with the number of reviews. This kind of structured snippet raises your visibility in the SERPs and increases your click-through rate!
Here are the salient portions of the template:
- Name: Name of the product
- Image: The URL of a representative image of the product
- Description: Describe the product (NOT the review itself!)
- Brand -> Name: Name of the brand
- Review -> Rating Value: A number that represents YOUR rating of the product
- Review -> Best Rating: The maximum value that the above rating could have been
- Review body: The actual review. Make it succinct
- Author -> Name: The name of the author
- Publisher -> name: The name of the publisher of the review (often same as the author)
- Aggregate rating -> Rating value: The ratings of other people based on a 5-point scale
- Aggregate rating -> Review count: The number of people who have reviewed it
- Offers -> priceCurrency: The currency of the price that is specified below
- Offers -> price: The price of the product using the currency above
- Seller -> Name: The name of the organization selling the product
These 14 pieces of information should customize your particular JSON snippet. You can also make additional modifications based on your requirements. For example, changing the “Item Condition” based on the list of possible values. Or you can change the item availability from “online only” to something else.
But each of the fields in the above snippet is necessary to pass the test in the structured data testing tool. So make sure you include them all!
Use the Custom HTML Block to Include JSON
Ever since Gutenberg, I’ve been using the custom HTML block extensively. It’s one of the reasons I gave up my initial hostility to Gutenberg and now embrace it whole-heartedly! So need to install any additional plugins or use your theme’s options for JSON. Just exploit the custom HTML block and you’re good to go!
I’m a NameHero team member, and an expert on WordPress and web hosting. I’ve been in this industry since 2008. I’ve also developed apps on Android and have written extensive tutorials on managing Linux servers. You can contact me on my website WP-Tweaks.com!
David says
Thanks for the help. The snippet produces a critical error message “Missing field “itemReviewed””
Any ideas on how to correct this?