How to Use Buttons to Collect Information About Your Recipients

read
Last updated at:

Overview

In Klaviyo, you can use links or buttons to collect information automatically from viewers. 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 article 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 our article on Template Tags and Variable Syntax.

Adding Redirect Link to Buttons to Email

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, favorite_color

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

  • '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.

2020-01-16_10-49-49.png

Once you've collected 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, split flows by different properties, and personalize messages using this data.

Additional Resources

x
Was this article helpful?
277 out of 391 found this helpful