How to include ratings links or NPS surveys in an email

Estimated 2 minute read
|
Updated Aug 29, 2024, 9:59 PM EST
You will learn

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 an NPS Survey.

Configure your email template to collect user ratings

Configure your email template to collect user ratings

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). 

  1. Within your email template, drag in a Header 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 10 link fields (or, as many as desired).
  4. For Link 1, add the number 1 in the Text field. Repeat with the number 2 in Link 2, and so on.
  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 actual value that is recorded for the custom property, like the numbers 1-10 in this example.
    • redirect_link
      This is the URL that someone will be taken to after they select a value (e.g., your website homepage).

In the example below, the full tag for button 1 is:

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

The full tag for button is:

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

A sample template with rating links

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 your template

Preview 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

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.

Additional resources

Additional resources

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.
Live training
Join a live session with Klaviyo experts to learn about best practices, how to set up key features, and more.
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