Skip to main content

Displaying product ratings and review counts with Judge.me metafields

Updated over a month ago

Showcase your product’s average star rating and total number of reviews anywhere in your Shopify store using Judge.me metafields. This is a great way to boost trust and drive conversions by giving shoppers quick access to social proof.

What are Judge.me metafields?

Judge.me provides two standard Shopify metafields that help you dynamically display key review data on your storefront:

  • Average rating
    {{ product.metafields.reviews.rating.value }}
    Example: Displays “4.3” out of 5

  • Total number of reviews
    {{ product.metafields.reviews.rating_count }}
    Example: Displays “125”

You can also show the minimum and maximum rating scale values:

  • Minimum rating value
    {{ product.metafields.reviews.rating.value.scale_min }}
    Example: Displays “1.0”

  • Maximum rating value
    {{ product.metafields.reviews.rating.value.scale_max }}
    Example: Displays “5.0”

Note: These metafields return raw numbers only. You can wrap them in text to provide better context (e.g., Rated 4.3 out of 5 or 125 reviews).


How to add Judge.me metafields to your Shopify theme

Follow these steps to display Judge.me metafields anywhere on your product pages (or other template files):

Step 1: Access your Shopify theme code

  1. Go to your Shopify Admin.

  2. Click on Online Store > Themes.

  3. In your Current theme, click the ⋯ (Actions) menu and select Edit code.

Step 2: Find the right template file

  • Open the template where you want to show the review data (e.g., product.liquid, main-product.liquid).

Step 3: Insert the metafield code

Paste the following code snippet in the location where you want the rating and review count to appear.

<span>This product is rated {{ product.metafields.reviews.rating.value }} out of {{ product.metafields.reviews.rating.value.scale_max }}</span>
<br>
<span>({{ product.metafields.reviews.rating_count }} reviews)</span>

You can customize the text and styling using HTML or CSS to match your brand better.

Step 4: Save and preview

  1. Click Save in the code editor.

  2. Preview your store and navigate to a product page to confirm the data is displayed correctly.

If you're not familiar with theme editing or you’d like help positioning the metafields in the best way, reach out to our 24/7 support team at support@judge.me.

Did this answer your question?