Hi everyone! I’m trying to add my Yotpo review ratings to my product schema. Currently, my theme uses the standard {{- product | structured_data -}} filter to generate JSON-LD.
Since I can’t edit the code inside that filter, I need help adding a second script block for the Yotpo aggregateRating metafields so that Google can see my star ratings.
I’ve located the file (sections –> main.product-liquid), but I want to make sure I place the new script tag in the correct spot (right after the Shopify block) without causing any syntax errors or breaking the containers. Could someone guide me on exactly where to drop the Yotpo snippet? Thanks!
i followed the steps of the id-solution. although when i run a test on a specific product page in google search, it still shows that the review and aggregate rating are missing… do you know how i can fix this?
thank you!
Can you share a link to one to those pages so I can have a look?
Custom shipping solution validated just fine, so this should too, just need to have a look at the actual page.
Can DM me if not keen to share publicly.
sure! I can’t seem to find the dm button, so here’s a link to one of our product pages: NO. 5 TAN MOUSSE – Boë Beauté (the one that i’ve been running through google search).
Let me know if you need anything else - and thanks again!
However, it looks like Yotpo outputs its own structured data for Product, which includes the reviews.
It could be good and an option would be to remove the theme own structured data, but look at this – it does not properly convert currencies:
I am in Australia, so theme shows me AU$40 (which is approximately EUR24) and theme own structured data has "price":"40.00","priceCurrency":"AUD"
while Yotpo shows EUR40 – "price": "40.0","priceCurrency": "EUR"
Other than that, Yotpo snippet looks fine.
I am not sure if it is possible to disable structured data in Yotpo.
If not, you’d need to force them to fix currency conversion issue.
When they do, simply remove the
It looks like it works with the amended code!!
I’ve also messaged yotpo to get them to look at the conversion/currency-issue - thank you for bringing that to my attention as well!
thank you so much for your help! It’s truly appreciated and deeply valued
Great solution by @tim_1. Just a quick heads-up for anyone implementing this: always double-check your Google Search Console (Rich Results test) after manual JSON-LD edits.
Using multiple Product blocks can sometimes lead to ‘AggregateRating’ conflicts if the theme already outputs its own schema. It’s a common issue when mixing third-party review apps with custom Liquid code. Make sure to validate the output to ensure your SEO snippets don’t disappear from Google !