Within Data activation, you have configured different facts (also known as profile attributes) and engagements that are used in audiences and journeys. Some connectors allow receiving additional information when sending them across. This additional information will be dynamically filled by the facts or engagements belonging to the profile of that specific user, allowing channel personalization.
As an example, instead of just saying this person is interested in "Sneakers", we’d say this person is interested in "Sneakers" and the last sneaker he viewed was "Nike Air". The moment he views an "Adidas" shoe, the channel will receive an update that the last product viewed is no longer "Nike Air" but actually "Adidas".
How variables work
Variables get their values when a visitor's profile is added to an audience. At that point, Data Activation evaluates the engagement and fact properties defined in the audience conditions and assigns their values to the configured variables.
Each variable stores one of the following value types:
String: Stores the most recent value of the assigned engagement property.
List: Stores multiple values from the assigned engagement property.
String variables
A string variable always stores the most recent value of the assigned property. Each time new data comes in, the previous value is overwritten.
Example: You want to personalize content based on the last page a visitor viewed.
A visitor goes to
example.com/home.An audience condition captures the page URL and stores it in a string variable called lastPageView.
Property =
urlConstraint = Any
Unique values = 1
Store in variables =
LastPageView
The stored value is now lastPageView: example.com/home.
When audience data is sent to a connected partner, the key-value pair
lastPageView: example.com/homeis included.The visitor then goes to example.com/products. The value is overwritten:
lastPageView: example.com/products.
See How audiences and journeys handle variable updates for details on when the update is sent.
List variables
A list variable stores multiple values in order. When the list reaches its maximum size, the oldest value is removed and the newest is added.
Example: You want to personalize content based on the last two pages a visitor viewed.
A visitor goes to example.com/home.
There is an audience with the following ruling:
Property =
urlConstraint = Any
Unique values = 1
Store in variables =
LastPagesViewedList size = 2
The list variable lastPagesViewed now contains
[example.com/home].The visitor goes to example.com/products. The value is added:
[example.com/home, example.com/products].The visitor goes to example.com/contact. The list has reached its limit of 2, so the oldest value is removed:
[example.com/products, example.com/contact].
Before you begin
To create and manage variables, you need access to Data Management in the platform.
Instructions
In Data activation, go to Data → Variables.
Click Add new variable.
Enter a name for the variable.
Select the variable type: String or List.
If you selected List, enter the maximum number of values the list can hold.
Save the variable.
Note
You can't edit a variable after it's created. If you made a mistake, delete the variable and create a new one. You can delete a variable if it's not used in an audience or journey.
Once created, the Variables page shows the following information for each variable:
Variable: The variable name. This is the name sent to a partner or available in the GET segments API.
Variable type: String or List.
Variable size: The maximum list size for List-type variables.
Used in: Whether the variable is used in audiences, content, or journeys.
You can also create variables when defining audience rules. We recommend using the Variables page so you can manage all variables from a single view.
How audiences and journeys handle variable updates
Variable updates behave differently depending on whether you're using audiences or journeys.
Audiences: When a variable value is updated, by either overwriting (string) or adding to (list), a modification signal is sent through all connectors linked to the audience, updating the related data for those profiles.
Journeys: You can choose whether to update variable data based on new information. To enable this, set up an event listener. An event listener is a mechanism attached to a journey step that monitors specific events for changes in a user's profile data and automatically resends the updated variable value to the connected channel when a change is detected.