Shopify Cue Recipe: Automatically ask customers to review a purchased product

Product reviews play a big role in boosting sales. However, getting reviews can be a challenge, especially without an easy way to ask for them. Using the Cue below, you can prompt customers to review a recently purchased product. If they prefer not to review that specific item, you can still provide them with the tracking information for their order.

Copy the following code and paste it underneath your Re:amaze Shoutbox script or existing Cue script, above the <head> tag. Note that data-driven Cues using Shopify's liquid markup will not work via Google Tag Manager and must be pasted into your theme.liquid template. To see a tutorial of the basics of getting Re:amaze installed for your Shopify store, click here.

Important things to note:

  • {% if shop.customer_accounts_enabled and customer.id and customer.orders.size > 0 %} will tell the Cue to only look for customers that are logged in and have an order size larger than 1
  • {% if customer.last_order.line_items.size > 0 %} will tell the Cue to only look at the customer's last order where there's more than 1 line item
  • Review {{ customer.last_order.line_items[0].product.title }} will show the name of the customer's last order's first line item name
  • https://YOURSTORE.myshopify.com/{{ customer.last_order.line_items[0].product.url }} will take the customer directly to the product page so they can actually leave a review
  • {{ customer.last_order.line_items[0].fulfillment.tracking_url }} will show the tracking information for the customer's last order's first line item

Thing you can edit:

  • You can edit the message text to something that you prefer
  • You can edit the button text to something that you prefer

Here's what the Cue will look like to customers:
reviewrequest.png

{% if shop.customer_accounts_enabled and customer.id and customer.orders.size > 0 %}

  {% if customer.last_order.line_items.size > 0 %}
    <script type="text/javascript">
      var _support = _support || { 'ui': {}, 'user': {} };
      _support.outbounds = _support.outbounds || [];
      _support.outbounds.push({
        id: "RequestReview",
        name: "Review Product",
        message: "Hey, it looks like you recently bought a product from us. How do you like it? Let us know with a review!",
        sound: true,
        user: {
          type: "team"
        },
        buttons: [
          {
            text: "Review {{ customer.last_order.line_items[0].product.title }}",
            url: "https://YOURSTORE.myshopify.com/{{ customer.last_order.line_items[0].product.url }}"
          },
          {
            text: "Track your item",
            url: "{{ customer.last_order.line_items[0].fulfillment.tracking_url }}"
          }
        ],
        rules: [
          {
            type: "timeOnSite",
            op: "greaterThan",
            value: "20s"
          }
        ]
      });
    </script>
  {% endif %}
{% endif %}

Here's an example of where you might paste this Cue:

Alt Text

Contact Us

Not finding what you're looking for? Contact Us Directly