Use Buttons in an Email to Collect Information About Your Recipients

read

Overview

In Klaviyo, you can use links or buttons within an email to automatically collect information from your email recipients. For example:

  • In your newsletter campaigns, add buttons that let users specify how many times a week they want to receive emails from you
  • In a thank you email to a new customer, prompt the recipient to update profile details such as gender
  • In a winback email, prompt a customer to choose the category of products they are most interested in learning more about

This guide will explain how to build email templates that include buttons to collect information about your subscribers, and then redirect them to another URL from within the email.

It is also possible to update a profile property and bring subscribers to a manage preference page, where they can submit additional information. This requires configuring the appropriate manage preferences page in advance. For more information, check out this doc.

The update_property_link Tag

In order to redirect a button to first collect information about the recipient as a property and then redirect them to a URL, use the 'update_property_link' tag. From the email template editor, add a button to the email template you want to use. Next, click on the button where you want to add this feature. Navigate to the Block tab, and enter the following into the Link URL section. 

{% update_property_link 'profile_property' 'property_value' 'redirect_link' %}

From there, you will change each section of the code to reflect:

  • 'profile_property': the profile property that you'd like to update or create; for example, gender

  • 'property_value': the value that the particular button corresponds to; for example, female

  • 'redirect_link': the URL that you want them to redirect them to after they click the button

Recipients can only select one value. If they already have a value for the property set, their selection will overwrite the existing value. 

In the example below, we would like to collect dessert preference information from our subscribers by asking them if they prefer cake or pie. To create this survey, set the 'profile_property' to dessertsurvey, the 'property_value' to cake, and then go to a thank you page, your code would look like the following.

{% update_property_link 'dessertsurvey' 'cake' 'http://janes-test-store.myklpages.com/p/survey_results' %}

Whenever someone clicks the 'cake' button, it will update the 'dessertsurvey' profile property to 'cake,' and then go to a thank you landing page.

2018-11-08_16-44-46.png

Using Data in Emails

Once you've started to collect data from your emails, you then use it in your emails.  This data is stored just like a regular customer property, and can be used to: 

  • Create segments that use these properties as conditions in the definition; for example, you can create a segment of your newsletter list that only includes those with a daily email preference
  • Split flows by different properties; for example, you could have a female-only winback and a male- only winback if you collect gender information
  • Personalize emails using this data; for example, if you prompt someone in an email to select, let's say, their favorite food, you can then insert this property variable into a follow-up email configured so each recipient will receive a message that says, "We've recorded your favorite food as ____!"
Was this article helpful?
5 out of 11 found this helpful