---
title: "How to update a profile property when someone clicks a link"
description: "Learn how to build email templates with buttons that tag subscribers with information based on the option they click. You can use this process to add profile properties when they click a link."
canonical_url: "https://help.klaviyo.com/hc/en-us/articles/115005255248"
markdown_url: "https://help.klaviyo.com/hc/en-us/articles/115005255248.md"
locale: "en-us"
category: "Content"
section: "Use variable syntax and tags"
updated: "2026-10-27"
---

# How to update a profile property when someone clicks a link

## You will learn

Learn how to build email templates with buttons that tag subscribers with information based on the option they click. You can use this process to add profile properties when they click a link. 

**📝 Note:** This process is not currently supported in SMS/MMS messages.

## Use cases for collecting information via links

In Klaviyo, you can use links or buttons to collect information automatically from 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.



## Add buttons or links that update profile properties

Each click sets the specified value for a profile property. If a recipient clicks more than one option for the same property, the most recent click overwrites the existing value. This includes properties with a list data type: the entire list will be overwritten, and it is not possible to simply append a list item to an existing list. 

**📝 Note:** 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).

### Buttons

1. Head to the email template you want to use.

2. Add a button to the email template.

3. Click on the button where you want to add this feature.

4. Enter the following into the **Link address** field:




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

1. 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 to redirect recipients to after they click the button.



These fields do not support dynamic content or unicode characters. Only standard URLs (i.e., formatted as https://www.klaviyo.com) are supported. This code will work anywhere you'd normally add a link. The property value should be text or a number for best results. Note that if this property is already set for a particular recipient, it will be overwritten when they click the button. 

### Linked text

1. Navigate to the email template you want to use.

2. Highlight the text you'd like to link.

3. Click the hyperlink icon in the text editor.




![The hyperlink icon in a text field](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/c616f1f41175306a22b481a56c5ebbcd4d41a354-2210x640.png?auto=format)

4. Enter the following into the **URL** field.




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

1. 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 link corresponds to; for example, blue.

   - **'redirect_link'**: the URL to redirect recipients to after they click the link.

2. Click **Apply** to add the link.



## Example of using links to collect information

Let's say that we want to collect dessert preference information from our subscribers by asking them if they prefer cake or pie.

To create this survey:

1. Set the 'profile_property' to *dessertsurvey*.

2. Change the 'property_value' to *pie*.

3. Make the link redirect to a thank you page.



In this case, our code would look like the following.

```text
{% update_property_link 'dessertsurvey' 'pie' 'http://www.your-website.com/survey_response' %}
```

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


![Pie button survey link](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/f9c17573fd74ff27377d187ad7a50b45bf5c278f-2866x1366.jpg?auto=format)

Add a second button labeled cake. Use the same `dessertsurvey` property and redirect URL, but change the property value from `pie` to `cake`.

Now that we've collected data from our customers, we can use it in 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.

## Test and review your results 

To test the functionality of your new button, save the message as a template and [send it to yourself as a personal email](https://help.klaviyo.com/hc/en-us/articles/115005246328.md). If you send a preview rather than a personal email, the button/link will direct to a placeholder page and will not update your profile. 

Once someone clicks an update property link in a live email, their response is stored on their profile. You can navigate to a profile to see an individual’s response, or you can create a segment based on the saved property value. 

**📝 Note:** UTM parameters are not supported for {% update_property_link ... %} buttons or links. If you have UTM parameters enabled for this message, they will not be appended to the final dynamic link. As a workaround, you can manually include UTM parameters in the *redirect_link* field.

### View individual results

To see which option someone selected on their profile: 

1. Search for a profile in Klaviyo using an email address or name. 

2. Click a profile from the results to view all details. 

3. Locate the **Custom properties** section of the profile. 

4. Find the profile property set in the update property link (“dessertsurvey” in the example above).

5. Note the property’s value (e.g., “cake”).



### Create a segment based on answers

To group profiles by their current answer, create a segment based on the survey property: 

1. Navigate to the **Audience > Lists & segments** page. 

2. Click **Create**, then click **Segment**.

3. Enter a name for your segment. If a naming dialog appears, click **Create segment** to open the segment builder.

4. Select **Properties about someone** as the condition.

5. Select your survey property (e.g., `dessertsurvey`), choose **equals**, and enter the answer (e.g., `cake`). For this example, set **Type** to **Text**.



![Survey link segment](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/e7a85c5794b81f5a831d4046d8b9ccb4831dfc51-1870x308.jpg?auto=format)

6. Finally, click **Create segment** to save your segment.



This segment includes profiles whose current property value matches the answer, even if that value was added another way. If someone clicks a different answer later, their property value changes and they no longer match the earlier answer.

## Additional resources

- [Advanced segmentation reference](https://help.klaviyo.com/hc/en-us/articles/360035312491.md)
  Learn effective advanced segmentation strategies that provide insights into your customer base and create highly personalized experiences for your subscribers.
- [How to create customer persona segments based on activity](https://help.klaviyo.com/hc/en-us/articles/360000407272.md)
  Learn how to use segmentation to create customer persona segments based on the actions they have taken. This allows you to send more relevant marketing communications so you can gain the most value from your audience. 
