Attributes
Attributes allow you to update user properties dynamically. These can be used for user segmentation and targeting in your VWO campaigns.
set_attribute()
Use the set_attribute()
method to set a custom attribute for a user:
# set attribute for a user
set_attribute_response = vwo_instance.set_attribute('attribute_key', 'attribute_value', { id: 'your_user_id'})
Parameter | Type | Description |
---|---|---|
attribute_key Required | String | The key of the attribute to set |
attribute_value Required | String | The value of the attribute. |
context Required | hash | Contains information about the current user, including a required unique identifier for each user. Read more about userContext here . |
Updated 9 days ago