This article describes how context attributes can be used to target your audience.
Table of Contents
- Overview
- Using context attributes in targeting criteria
- Instrumenting context attributes for audience targeting
- Use Cases
Overview
A key aspect of any optimization program is identifying segments of your audience experiencing friction and creating unique solutions to address those issues.
In browser-based experiences, it’s easy to target segments like device or location using user data captured by the browser. Evolv AI adds these user attributes to the context by default. But what about user data that only your system knows about?
Using Evolv AI’s SDKs, you can set custom context attributes about the users in your digital experience.
Targeting users based on their context attributes is a core capability of the Evolv AI system and can be used in two ways:
- Project Audience –The project audience is the first filter to all test ideas in your project
- Variable Targeting – Variable targeting allows you to test a set of ideas on a narrower segment of your project audience. This is useful when you want to include personalization ideas in a broader audience.
- Variant Targeting – Variant targeting is only available through Evolv AI auto personalization capability which analyzes context attributes to discover hidden personalization opportunities.
Using context attributes in targeting criteria
Targeting criteria is a set of conditions to match visitors who should be included in a project and see different ideas.
The context attributes you add to the Schema can be used in targeting criteria when creating an Audience or applying targeting criteria to variables and groups within a project. These attributes can be found under Default Attributes in the criteria selection menu of the audience builder. See example below:
Learn more: About Audiences
After selecting the criteria, you can specify an attribute value to match.
Instrumenting context attributes for audience targeting
Setting the context attribute in your digital experience
Context attributes are recorded in a visitor’s session and are set using custom code added to your digital experience.
Context attributes can be set using code from one of our SDKs. Below is an example using the Evolv AI Javascript SDK:
// Using the Evolv Javascript SDK evolv.context.set('source_field', 'value') // Example - String Value evolv.context.set('campaign_source', 'facebook')
// Example - Number Value evolv.context.set('order_value', 15.00)
Add the context attribute to the Schema
To collect, process, and use context attribute values in targeting criteria, they should be defined in the Schema. The Schema is a set of definitions that describe data in the visitor’s context.
To learn how to define values in the Schema, read Adding context attributes to the Schema.
Use Cases
Logged in visitors
The experience for logged-in and logged-out visitors can differ in important ways. When you want to target logged-in visitors, you’ll need to let the system know who is logged in.
Setting the context attribute
In your digital experience, set the status of a visitor when they log in.
evolv.context.set(‘logged_in’, true)
Creating the targeting criterion
Then create an audience whose targeting criteria includes: logged_in is TRUE
Visitors by subscription plan level
Target your subscribers by their plan tier when experimenting with ways to upsell to premium plans.
Setting the context attribute
When a user logs in, set the plan level of a logged-in user
evolv.context.set(‘subscription_plan’, ‘basic’)
Creating the targeting criterion
Then create an audience whose targeting criteria includes: subscription_plan equal ‘basic’
Visitors by cart age
Cart abandonment is a critical issue for e-commerce experiences. Targeting visitors based on the age of their cart allows you to test tailored incentives based on their level of intent.
Setting the context attribute
Use the creation date of the cart to calculate its age and then set the value on a custom context attribute.
evolv.context.set(‘cart_age_days’, 3)
Creating the targeting criterion
Then create an audience whose targeting criteria includes: cart_age_days > 2