Insights

Personalization and ad serving platform

This is the story of how one of Europe’s largest banks, Klarna, partnered with Avenga to build a personalization and ad-serving tool known as the Klarna On-Site Messaging Platform.

  • Client Klarna
  • Industry Finance and banking
  • Service AdTech
  • Technologies AWS, JSON, JavaScript

Introduction 

Founded in 2005 in Stockholm, Sweden, Klarna aims to make it easier for people to shop online. Over the past 14 years, technology has changed the world around us, but Klarna’s mission remains as important as ever; make paying for goods and services online as simple, safe, and smooth as possible. 

Staying true to their mission, Klarna provides consumers with smooth one-click purchase options, known as Klarna Payments. 

But Klarna needed a way to make visitors on merchant websites aware of Klarna Payments. To achieve this, they created a product known as Klarna On-site Messaging and partnered with Avenga to build it. 

Challenge 

  • Ensure optimal performance when experiencing high volumes of traffic 
    • We were presented with a huge scope that in some areas contained a lot of requirements, while others contained a few. With this scope, we had to provide time and cost estimates, create an initial product roadmap, and list project milestones. 
  • Deliver a Personalized User Experience and Consistent Messaging 
    • Klarna On-site Messaging allows merchants to deliver the best user experience possible by personalizing the messages shown to visitors, such as greeting them by first name, showing them products they might like based on their interests, displaying delivery options based on their location, and presenting them with payment options based on their preferences. 
    • The messages also need to be consistent throughout their time on the website, meaning we couldn’t show them one payment option on the first page and then a different one on the next page. 
    • We also had to make sure that we uphold user trust between Klarna, the merchants, and consumers by respecting various user privacy rules and features, such as the EU’s General Data Protection Regulation (GDPR). 
  • Ensure the interstitials (pop-up messages) are compatible with all merchant websites  
    • As part of Klarna’s goal to deliver a consistent and seamless user experience, we had to make sure the interstitials (the actual pop-up messages shown to visitors) are shown in the same way across all merchant websites. 
    • To achieve this, we had to ensure the interstitials were compatible with all browsers and device types, as well as with merchant websites. 

Solution 

We chose to host the Klarna On-site Messaging on Amazon Web Services (AWS) as it offered the best solution for this challenge. Also, we have a lot of experience working with AWS and knowledge of the various services.

Specifically, we utilized various caching methods (browser, DB caches, etc.), configured and made optimizations to the infrastructure, deployed Auto Scaling groups, introduced stress tests to test the performance of the Klarna On-Site Messaging platform before each deployment, and made the staging environment similar to the production environment.
We cached the responses from the ad server for each session and changed the behavior of the ad server to check whether the parameters for a given placement had changed (e.g. the price of a product listed on a merchant’s site).
The frontend part of the application provides clients with a unique user experience that has not yet been seen in advertising technology solutions. It was built using JavaScript with Knockout JS as the framework to ensure complete usability. The UX&UI design elements emit a recognizable brand image and deliver a simplistic user experience to what is otherwise a highly complex technology.

Process 

Discovery & Roadmapping

To kick things off, Avenga and Klarna aligned on requirements, features, and milestones through collaborative workshops.

This upfront clarity laid out realistic timelines and budgets before development began.

Scalable AWS Foundation 

A robust AWS infrastructure was assembled with Auto Scaling groups and multi‑layer caching to handle millions of profiles and sudden spikes in traffic.

Mirroring staging to production environments ensured that performance tests translated directly to live conditions.

Backend & Frontend Integration 

Session‑level caching and change‑detection logic trimmed unnecessary calls to the ad server and kept messaging perfectly synced.

On the front end, lightweight iframes and a secure JSON‑RPC layer slotted seamlessly into any merchant’s website.

Launch & Validation

Rigorous stress tests validated performance under simulated peak loads and fine‑tuned caching TTLs alongside scaling thresholds.

Real‑time monitoring and merchant feedback then guided quick iterations during the phased rollout.

Results 

Klarna’s partnership with us produced the following results: 

  • The Klarna On-Site Messaging platform handles 100M+ user profiles, can render personalized messages within 50 milliseconds, and handle peak loads well above 20,000 queries per second (QPS). 
  • Visitors are shown a personalized experience and consistent messaging during their time on merchant sites, provided they’ve consented to this type of personalization. 
  • The network traffic is lower as we don’t make unnecessary calls to the ad server. 
  • Interstitials are consistent across all the merchant websites and displayed in the same way everywhere. 

Transform your site with real‑time, personalized on‑site messaging. 

Let`s talk

By combining a discovery-driven approach with a scalable AWS setup, efficient session caching, and frontend integration tuned for speed, Klarna delivers real-time, privacy-conscious messaging that doesn’t slow anything down or compromise consistency. It’s how performance meets personalization—without the bloat.