Adding product rating structured data

Is there a way to automatically calculate and display the average rating and total review count for products in a Webflow e-commerce site without using client-side JavaScript?

I have a Product collection and a separate Review collection, with reviews linked to products. I need to:

  1. Calculate the average rating from all reviews for each product
  2. Count the total number of reviews for each product
  3. Display these values on the product page
  4. Include these values in the product’s structured data for SEO

Currently, I’m using JavaScript to calculate these on page load, but I’m looking for a server-side or CMS-based solution that updates these values automatically as reviews are added or changed. Are there any native Webflow features, integrations, or best practices to achieve this without relying on client-side calculations?

I’m sure this must be quite a normal use case for webflow ecommerce websites. Using structured data to add the review count and rating. Since these are calculated fields, I just need to know how to get that in my head code. I can’t imagine that these are static fields that are manually updated in the product collection.

I did try using custom code to update the structured data json directly after the DOM has loaded. However at that point the structured would have already been pulled as showing 0 ratings. I checked google schema markup validator and that also showed 0 ratings under the product. So custom code to update it doesn’t seem to work either.

Thanks

Hey @ukhan95 :wave:

If you’d prefer a simple out-of-the-box solution, then I think our native Webflow Reviews app will work great for you!

We automatically calculate the average rating and total number of reviews for each product and make it easy to display it on each product page.

Our app also includes Google Review schema for aggregate rating and individual reviews so it will show up in Google’s SERP.

Let me know if you have any questions: hello@monto.io

Thanks!