Updating a profile
Audiences are joined by matching user profile fields using the audience builder in the Unless dashboard. To be able to set up these audiences, you first need to send us some profile fields using the updateProfile function:
// update the profile with additional data pointsTxt.updateProfile([ {key: 'firstName', value: 'John', type: 'text'}, {key: 'role', value: 'CMO', type: 'text'}])The update profile function enriches an existing visitor profile with additional data points.
Txt.updateProfile(data)The data argument is required and should be an array of objects. The data object within the array should be structured as follows:
| Key | Type | Description |
|---|---|---|
| key | string required | The key to store as a trait. |
| value | string required | The value to store. |
| type | string required | The type of the data that you are sending, options are text, number, bool, date. |