Configure contextual personalization
This guide explains how to configure contextual personalization. You'll add variants, define a business goal, and set up contextual features.
Premium featureThis is a Premium tier feature powered by Loomi, Bloomreach's AI for customer engagement. For more information, contact your Customer Success Manager.
Prerequisites
- A Bloomreach account with the contextual personalization feature enabled.
- At least 2 variants of a weblayer, scenario node, or email campaign ready to test.
- Familiar with how variants, value, and goal work together.
Configure contextual personalization
Add variants and assign value
Add at least 2 variants. By default, all variants have a value of 1, so Loomi treats them equally. Enable the Value toggle to assign different values and tell Loomi which variants matter most to your business.
Example: You're running a subscription banner with two variants. One offers a 10% discount, and one doesn't. Subscribers without discounts are more valuable long-term. Set Variant A (no discount) to 2 and Variant B (discount) to 1. Loomi learns to favor Variant A, but only for customers who are likely to convert.

When assigning value:
- Loomi uses the ratio between values, not the absolute numbers. Setting 2 and 1 has the same effect as 20 and 10.
- If a customer triggers multiple goal events within the attribution window, such as clicking a link and then completing a purchase, Loomi sums the values.
- When evaluating results, factor in value ratios. A variant with a lower conversion rate but a higher value can outperform a variant that converts more often but is worth less to your business.
Attribution window
Loomi attributes goal events within a fixed window that starts when the channel action activates, such as when an email delivers, an SMS sends, a push notification delivers, or a banner serves. The window doesn't start when Loomi makes its variant decision.
The window length depends on the campaign type:
- Automatic (continuous, scenario-based) campaigns: 24 hours.
- Batch or one-off campaigns: 2 hours.
- Weblayers: 1 hour.
Any goal event within this window counts toward the campaign's outcome, whether it's an open, a click, a purchase, or a custom goal you've defined. If a customer clicks and then purchases in the same window, both events add to that variant's value.
Enable comparative A/B test
Enable the Comparative A/B test toggle to run a control group alongside contextual personalization. Set traffic distribution to 80% contextual personalization and 20% comparative A/B test. This gives Loomi enough data to learn quickly while keeping a meaningful control group for evaluation.
Set a goal
Your goal tells Loomi which customer action signals that a variant worked. When a customer completes the goal, Loomi registers it as a success for the variant that was served.
Goal tracking differs by channel:
- Email and scenario channels: Loomi automatically tracks opens and clicks. You don't need to configure anything to get started. You can also define an additional goal, such as
purchase, to give Loomi a stronger business signal. - Weblayers: There's no automatic tracking, so you must define a goal. A banner click is a good starting point because it's easy to track and signals customer interest.
To add a goal, click Add goal and define:
- Event type: The customer action to track, for example,
purchase_item,add_to_cart, orlevel_up. - Filter (optional): Conditions to match specific event variations, for example, only purchases where
category = 'electronics'.

Examples by industry:
- Ecommerce and retail:
add_to_cart,use_a_discount_code, orpurchase_item. - Gaming:
level_up,make_an_in_app_purchase, orinvite_a_friend. - Banking and finance:
starting_a_loan_applicationoropening_a_new_account.
TipIf your goal is a purchase but you don't have enough purchase events yet, use an intermediate goal like
add_to_cartor a product page view to help Loomi learn faster.
For more goal setup examples, see Contextual personalization use cases
Configure contextual features
Contextual features are the customer data points Loomi uses to decide which variant to serve. During setup, choose one of 2 options.
Optimized by Loomi (recommended)
Loomi automatically selects the most relevant data for your project based on the project's data mapping and standard system events. This option is selected by default. All 6 feature categories are active. You can uncheck any you don't want to use, but at least one must remain active:
- Browsing behavior: Site activity, product views, and areas of interest.
- Campaign response: How customers respond across channels.
- Purchase history: Transaction frequency and buying patterns.
- Time and preferences: When customers prefer to engage.
- Session activity: Device, traffic source, and current actions.
- Customer profile: Demographics such as location and customer properties from data mapping.

Custom
Choose specific data points manually, such as your own properties, aggregates, expressions, segmentations, or predictions. Follow these guidelines:
- Keep features dense. Group customers into a small number of meaningful categories. For example, instead of exact hours of the day, use three groups: morning, afternoon, and evening. Avoid unique values like product titles, because too many distinct values make it harder for the model to spot patterns.
- Use fewer, more relevant features. More features mean more contexts, so the model takes longer to learn. Use your business knowledge to select features that influence customer behavior.
- Size your audience accordingly. Use this formula to estimate the audience size needed for statistically significant results:
100 × number of contexts × number of variants ÷ estimated conversion rate = required audience size. For example: 100 × 20 contexts × 2 variants ÷ 0.2 conversion rate = 20,000 customers.
Timing considerations
Use fixed delays or fixed send times in your scenario, such as "wait 1 hour" or "send in the morning." Avoid optimal send time and dynamic wait times calculated with Jinja or similar templating. Dynamic timing prevents Loomi from reliably identifying when the attribution window starts, which affects the accuracy of its learning.
This restriction applies to wait nodes or send time optimization placed between the contextual personalization node and the channel action. A wait node or send time optimization before the contextual personalization node doesn't affect attribution, because Loomi still measures the window from the actual channel action.
One-off send distribution
For one-off campaigns, Loomi distributes sends across the time window you set in Distribute within (12 hours by default). The audience splits randomly across 13 fixed segments within that window, regardless of audience size or window length.
A shorter Distribute within window moves these segments closer together. This leaves less time for goal events to come in between batches, so the test behaves more like a standard A/B test.
Each batch of customers that reaches the contextual personalization node gets its own distribution window, which starts when that batch arrives. If customers enter the node in batches over time, the send can run longer than the Distribute within period. The total duration is about the time customers keep arriving at the node, plus the Distribute within period.
Once your configuration is complete, see Evaluate contextual personalization to measure your results.
Updated 19 days ago

