Skip to main content

Adding Star Ratings to Klaviyo emails

Updated over 2 months ago

πŸš€ Get full access to the Klaviyo integration, free for 15 days, no credit card needed.

With Judge.me x Klaviyo integration, you can now add Star Ratings to your Klaviyo emails.


Step 1: Connect Klaviyo to Judge.me via OAuth

  1. From your Judge.me Reviews app, go to General Settings > Integrations > Klaviyo.

  2. Click Connect.

  3. Authorize Judge.me to access your Klaviyo data by clicking Allow.


Step 2: Enable review information feed

  1. Once the integration has been enabled, check the box Enable review information feed in the Review feeds section.

  2. Click Save.


For other e-commerce platforms

  1. From Klaviyo admin, go to Settings > API keys to create your Klaviyo API key.

  2. From Judge.me admin, go to Settings > Integrations > Admin Backend > Email Marketing Integration > Klaviyo.

  3. Paste your Klaviyo API key and click Check.

  4. In the Klaviyo feeds section, turn on the option Enable information feed. Click Save.


Step 3: Add the feed to Klaviyo

  1. From your Klaviyo admin, go to Settings > Other > Web feeds.

  2. Click Add web feed and fill in the feed details, then click Add Data Feed.

Feed Name

JudgemeReviewInfoFeed

Feed URL

Paste in the feed URL from Step 2

Request Method

GET

Content Type

JSON


Step 4: Use the feed in Klaviyo emails

  1. From your Klaviyo admin, go to Flows and select the flow you want.

  2. Click the Email block on your flow and click Edit.

  3. Then click Edit email.

  4. In the Text block where the product title is, click the </> icon and paste in the code below:

    <!-- Judge.me star rating start -->
    <div>
    {% with productIdKlaviyo = item.product.id | slugify %}
    {% for product in feeds.JudgemeReviewInfoFeed.products %}
    {% with productIdJdgm = product.product_id | slugify %}
    {% if productIdJdgm == productIdKlaviyo %}
    <span style="font-size: 18px; color: #399999; letter-spacing: 2px; margin-bottom: 12px; display: inline-block;">
    {% with rating = product.average_rating | plus: 0 %}
    {% if rating >= 4.5 %}
    β˜…β˜…β˜…β˜…β˜…
    {% elsif rating >= 3.5 %}
    β˜…β˜…β˜…β˜…β˜†
    {% elsif rating >= 2.5 %}
    β˜…β˜…β˜…β˜†β˜†
    {% elsif rating >= 1.5 %}
    β˜…β˜…β˜†β˜†β˜†
    {% elsif rating >= 1 %}
    β˜…β˜†β˜†β˜†β˜†
    {% endif %}
    {% endwith %}
    </span>

    {{ product.review_count }}
    {% if product.review_count == 1 %}
    review
    {% else %}
    reviews
    {% endif %}
    {% endif %}
    {% endwith %}
    {% endfor %}
    {% endwith %}
    </div>
    <!-- Judge.me star rating end -->

  5. Depending on the email template you use, you might need to change the item.product.id variable in the code block.

  6. Click the </> icon again to apply the changes.

  7. Click Preview and Test to preview your email with a real product.

  8. Once done, save your email and activate the flow.

Here's how your email might look:

If you want to change the star color, you can change the style attribute of the <span> element that contains the stars.

<span style="font-size: 18px; color: #399999; letter-spacing: 2px; margin-bottom: 12px; display: inline-block;">


Get your free trial

✨ Grow your sales by using social proof in email campaigns with Klaviyo integration. Free for 15 days.

Did this answer your question?