Attributes Enrichments
After you identify your desired attributes, you will configure them with enrichments.
Enrichments are business rules that determine when and how to update the values of attributes. Each data type offers its own selection of enrichments for manipulating the attribute’s value. For example, the number attribute offers the enrichment “Increment or Decrement Number” for adding or subtracting number values.
Enrichment conditions
Each enrichment is set to occur at a specific time. This is the WHEN setting. The following options are available for each visit and visitor attribute:
- New Visitor – occurs the first time a visitor comes to your site
- New Visit – occurs on a new visit by a visitor
- Any Event – occurs on any event
- Visit Ended – occurs when a visit ends
You can also create a custom condition, called a rule, that will determine when the enrichment will occur.
Create a visitor attribute
Let’s look at an example of a popular e-commerce visitor attribute called Lifetime Order Value. This is a visitor attribute that calculates the cumulative amount spent by the customer for all completed orders. In order to calculate this value, we also need to know when purchases occur and the amount of those purchases, so the attribute dependencies are:
order_total
– event attribute for order total amounts.purchase
– an event to track completed purchases.
To get started with adding this attribute, follow these steps:
- Navigate to AudienceStream > Attributes and click Add Attribute.
- Select the scope of Visitor and click Continue.
- Select the data type Number and click Continue.
- Enter the name of the attribute,
Lifetime Order Value
. - Click Add Enrichment and select Increment or Decrement Number.
- Select the attribute containing the value to increment by (
order_total
). - Leave the WHEN set to Any Event and then click Create a New Rule.
- Create a rule that identifies when a purchase event has occurred, for example:
tealium_event EQUALS purchase
- Click Save, then Finish.
Congrats! You just created a visitor attribute with an enrichment to keep track of the total amount spent in completed orders.
Next, we will learn about the two more special attributes called badge and visitor ID.
This page was last updated: April 3, 2024