You will learn

Learn how to send a simple survey via email to collect information from users and then send that information back to Klaviyo as a custom property. A common use case for this is including rating links in an email or a Net Promoter Score (NPS) survey.

Configure your email template to collect user ratings

For an NPS survey, ask how likely the recipient is to recommend your business to a friend or colleague. Include 11 response options, from 0 (not at all likely) to 10 (extremely likely). For other ratings surveys, choose the scale that fits your question.

When using the code snippets provided below, make sure to use straight quotes (') rather than curly quotes (‘) to ensure the code renders correctly. This can be achieved by copying the code below and pasting it directly into your template using the "Paste as Plain Text" function (Ctrl+Shift+V or Cmd+Shift+V). The property name, property value, and redirect URL in the tag must use ASCII characters. Accented characters and emoji aren't supported.

  1. Within your email template, drag in a Header bar block.
  2. In the Desktop layout and Mobile layout menus, select Links and buttons only.
  3. In the Content section of the block settings, click Add link until you have 11 links for an NPS survey, or 1 link for each response option on your chosen rating scale.
  4. Expand Link 1 and enter the first rating in the Link text field. For an NPS survey, enter 0 in Link 1, 1 in Link 2, and so on through 10.
  5. Add the following tag in the Link address field for each link:
    {% update_property_link 'profile_property' 'property_value' 'redirect_link' %}
  6. Replace the generic placeholders in the tag above with the following information:
    • profile_property
      The custom property name that should be recorded on someone's profile (e.g., 'NPS Rating').
    • property_value
      The value recorded for the custom property. Use the rating shown on that link, such as '0' through '10' for an NPS survey.
    • redirect_link
      This is the URL that someone will be taken to after they select a value (e.g., your website homepage).

The full tag for a button labeled 1 is:

text
{% update_property_link 'NPS Rating' '1' 'https://botanic-organics.com/' %}

The full tag for a button labeled 2 is:

text
{% update_property_link 'NPS Rating' '2' 'https://botanic-organics.com/' %}
NPS configuration in email template.png
NPS configuration in email template.png

Once a recipient clicks on a button, they will be brought to the URL that you specify as a redirect URL and the value will automatically be added to their profile as a custom property. Please note that if someone responds to multiple NPS survey emails that use the same profile_property, the new value they input will overwrite their previous response.

Preview and test your template

When you preview your template and click any of your ratings links, you’ll be directed to a placeholder page, rather than the link provided in the Update Property tag.

Placeholder displayed when an Update Property link is clicked from a preview email
Placeholder displayed when an Update Property link is clicked from a preview email

If you’d like to test the full functionality of the link or button, send yourself a live email following our guide: How to send a personal email in Klaviyo. Click a rating in the live email, confirm that it opens your redirect URL, and check that the selected value appears as a custom property on your Klaviyo profile.

Additional resources

  • How to show or hide template blocks and sections based on dynamic variables

    Learn how to show a block or section to certain recipients with show/hide logic, and show different content to multiple audiences with show/hide logic variants.

  • How to create a post-purchase flow

    Learn how to set up a post-purchase flow in Klaviyo as well as best practices for doing so. A post-purchase flow triggers after a customer has placed an order while your ecommerce platform is integrated with Klaviyo. Sending post-purchase emails builds relationships and brand loyalty with your customers and makes them more likely to purchase again.

Was this article helpful?
Use this form only for article feedback. Learn how to contact support.

Explore more from Klaviyo

Community
Connect with peers, partners, and Klaviyo experts to find inspiration, share insights, and get answers to all of your questions.
Partners
Hire a Klaviyo-certified expert to help you with a specific task, or for ongoing marketing management.
Support

Access support through your account.

Email support (free trial and paid accounts) Available 24/7

Chat/virtual assistance
Availability varies by location and plan type