Contextual Personalization

Gone are the days of generic marketing messages. Contextual personalization is a Loomi AI powered personalization engine that automatically analyzes and understands the unique contexts of each customer to serve the most compelling content based on their historical interaction.

Why You Should Use Contextual Personalization

  1. True personalization — Provide a personalized experience to match each customer's unique situation;
  2. Efficiency — Automate time-consuming context analysis and apply insights right away;
  3. For ever — Adapt to changing customer preferences as it continuously learns from each decision and feedback.


Variant/actionThe weblayer, email, and SMS options you can choose for contextual personalization (from a set of 10 max).
Reinforcement learningA part of AI that learns by constantly interacting with an environment to maximize the reward.
ContextThe specific situation of each customer, such as the device or browser they use, the country they’re located in, the time of the day they’re browsing, and much more.
Contextual bandit/personalizationAlgorithm that uses a reinforcement learning approach to serve the best variant to each user.
FeatureInput variable used by the prediction model to make a prediction. An example of the feature is the customer's country or their number of purchases in the last year.
RewardInformation that the model uses to learn and adapt to changes.

How Contextual Personalization Works

To select the best possible variant of a weblayer, scenario node, or email per visitor, contextual personalization:

  • looks at each customer's contexts including device, time of day, and history,
  • tests out different versions of the variant for different contexts,
  • keeps learning with people's changing preferences.

To enable contextual personalization, you need to create different variants of a weblayer, scenario node, or email, decide what you want to improve (your optimization target), and set the list of features which define the context of customers.

Once you start the campaign, customer contexts are analyzed and the best variant is shown.

Compared to A/B Testing

A/B tests serve you the overall best variant of your tested campaign based on average performance.

At first, all the variants are shown equally, but as the Contextual Personalization sees which version gets better results in each context, that variant becomes the winner for that context.

A/B testing has a comparatively poorer track record: only one in eight A/B tests drives a significant change in conversion rate optimization, and as a result only 33% of marketers regularly use A/B or multivariate testing.


  • 70% of customers are interested in discounts and 30% in free shipping. You might discover that the winning variant is a weblayer about a sale. Once the testing is finished, you decide to use that variant for the entire customer base.
    • However, if you do that, you just misunderstood 30% of your customers and showed them something they did not care about.
    • Moreover, you missed an opportunity to direct them toward products from sustainable materials, which might have a substantially higher profit margin.
  • This is where contextual personalization comes in — based on all the different contexts, it shows the best-fitting variant for each individual customer.
Instead of "Which variant is best for everyone?" ask, "Which variant is best for each customer?"

Instead of "Which variant is best for everyone?" ask, "Which variant is best for each customer?"

Contextual Personalization

  • Relies on artificial intelligence and machine learning instead of human-defined rules to make a decision.
  • Continuously learns without having to wait for enough data or ignore variants that are perfect for some customers.
  • Provides true personalization and better conversion for every audience segment.

Case Study - Increase Your Conversion Rate

Let’s look at Bimago as an example of how you can increase your conversion rate using contextual personalization compared to standard A/B testing.

Deploying contextually personalized banners to Bimago's customers led to a 44% increase in the conversion rate of subscriptions vs. standard A/B testing. Find out more about this case study here!

Best Practices to Define Features

When you define features, you should consider the following:

1. Make Features Dense

Dense features contain just a few categories. For example, one category is Customer type with options like "Anonymous" and "Registered" customers, each containing thousands of customers. Contextual personalization can learn from one registered customer and use this knowledge for another registered customer.

The opposite of this approach is to create very sparse features such as "Product title," which is unique for each product. This makes it hard for contextual personalization to reuse this information for different products.


There should always be a way to make features denser. For example, instead of setting hours of the day as input, you could create three groups — morning, afternoon, and evening.

2. Use Fewer but More Relevant Features

The more features you include, the more contexts are found, and the longer it takes until contextual personalization learns what works the best. Therefore, use your business knowledge and intuition to think about features that could help contextual personalization make the right decision.


  • Imagine you have three features. First is a device with three distinct values — smartphone, tablet, and laptop. The second is an OS with three distinct values — iOS, Android, and Windows. And the third feature is an RFM segment with ten distinct values. Calculating these values gives us the formula: 3 device values, 3 OS values, and 10 RFM values. This makes 3 x 3 x 10 = 90. Thus, you have 90 different contexts, and each context's best variant must be found. This is done by understanding what best works for each of those contexts.


Rule of Thumb

Multiply 100 by the number of contexts and the number of variants. Then, divide it by the estimated conversion rate (how many times the content is clicked). The result is the how big your audience should be.

  • 100 x 20 contexts x 2 variants / 0.2 conversion rate = 20,000.
  • If your expected uplift in conversions is about 20%, this result (20,000 customers) is the approximate audience size your weblayer needs in order to evaluate the contextual personalization with statistical significance. It also depends on the significance evaluation method you use and the level of confidence you seek.

3. Use the Following Features

The following features serve as examples for your use.

  • User context:
    • Device (Apple, Android, other)
    • Browser (Safari, Chrome, other)
    • OS (iOS, Android, Windows, other)
    • Screen size (small, medium, big)
    • Weather (sunny, rainy, other)
  • General context:
    • Time of day (morning, afternoon, evening, night)
    • Day of the week (workday, weekend)
    • Country/region (from which country the customer is browsing)
    • Size of the city (> 1M, >0.5M, <0.5M)
  • User aggregates and segmentations:
    • Number of purchases in total (>1, 1, 0)
    • Number of engagements in the last three months (>100, >10, <10 based on project analytics)
    • RFM segments
    • Number of viewed products
    • Most commonly visited brand/category
    • Price preference (visiting cheap/expensive, ordering PLP based on price from the cheapest)
    • Visiting mainly products in sale
    • Purchase probability segment (high, medium, low)

4. Create a Reward

  • Establish what success is for you. Then, you can optimize — for example, if the goal is to subscribe to a newsletter, then optimize for subscription clicks.
  • Consider immediate feedback. Even if your goal is to sell a product when you show the best-promoted products to a customer, do not optimize for purchases, as there might not be enough data points. Instead, a great way to show contextual personalization that the right decision was made is when you monitor the clicks on the weblayer.

Use Case Examples

Here you can find possible use cases:

For weblayers:

  1. Display four weblayers with different discount types and let the contextual personalization decide which one suits each customer the best:
  • Free delivery (you can read more about this use case here)
  • 10% off the first purchase
  • 3€ discount
  • Free gift
  1. Select which image or product you want to show first in a carousel.
  2. Select the best-performing homepage banner for each customer.

For scenarios:

  1. Select the call to action inside an email.
  2. Select the subject line for the email.

However, there are many other possible use cases for your business.

Setup Guides

See the specific setup guides for contextual personalization for:


To evaluate the uplift of contextual personalization, you need to run a comparative A/B test.

Imagine a case with two variants where you also use the comparative A/B test option.

To evaluate the uplift of contextual personalization against simple variants, you need to split the customers based on the served variant and its origin.

The best way to do this is to create a segmentation with three segments: contextual personalization / variant A / variant B.

To be able to create such segmentations, use the property variant_type:

  • In the case of a weblayer, the property is tracked inside the banner event

  • In the case of scenarios or email campaigns, a dedicated campaign event is tracked

Since contextual personalization and also the comparative A/B test serve all the different variants, this property variant_type tells you what the origin of the variant is.

Evaluation funnel for the New Subscription Banner

Evaluation funnel for the New Subscription Banner

Results of the evaluation funnel for the New Subscription Banner

Results of the evaluation funnel for the New Subscription Banner

Usually, contextual personalization performs better than the whole A/B test or each variant on its own. But if it does not, it is more helpful to show everyone the winning variant.

Contextual personalization doesn't always outperform simpler variants due to unpredictable visitor behavior and selected features. Moreover, the algorithm always presents a small range of randomized options to visitors as part of its learning process.

For example, in a simple case where one variant is better for every context, the worse variant will also be served via contextual personalization. Overall, they will lose against the single variant.

Post-Evaluation Settings

The last step after the evaluation is to take action based on its results. If you’re happy with the results and do not plan to make any adaptations or rerun the test, you need to select the winner — either the contextual personalization or one of the variants. This can be quickly done in the contextual personalization settings within the Finish A/B test section.


This section is available only for running weblayers with non-100% traffic sent to contextual personalization.


A confirmation window is displayed as this action cannot be undone after you select the winner and click on the Finish A/B Test button.

After the confirmation, all the traffic is served with the selected variant.

Advanced Settings

Reward Settings

You may encounter situations where not all of the variants or the intended activity have the same business value.

Imagine a subscription banner where one version offers a 10% discount for the next purchase and the second one does not. You can calculate how much business value the subscription without the discount has for your business, since subscribers without discounts usually have higher customer lifetime value in the long run.

In situations like this, the difference between business values can be propagated to contextual personalization in the Reward settings. If the value from the no-discount subscribers is double the value of discount subscribers, just set the reward for the no-discount version to 2 and the discount version to 1.

What matters is the ratio between the numbers, not the absolute value itself (2:1 means the same as 50:25). This also needs to be considered in the evaluation, as achieving twice the conversion rate with the discount variant has the same business value.


Use incremental rewards as the customer is moving closer to the final goal.
For example: product view > add to cart > purchase.