Login
English

Select your language

English
Français
Deutsch
Platform
SOLUTIONS
Experimentation
Feature Management
add-ons & KEY Features
Mobile App Testing
Recommendations & Search
Personalization
Single Page Applications
integrate to your stack
Specialities
for all teams
Marketing
Product
Engineering
For INDUSTRIES
Healthcare
Financial Services
E-commerce
Automotive
Travel & Tourism
Media & Entertainment
B2B

Optimize digital experiences by chatting with AI and win up to $100,000

join the contest
PlansCustomersResources
Book a demo
Book a demo

Quick links

Book a demo
Book a demo
All resources
Run A/B tests on any Single Page Application (SPA) framework

Run A/B tests on any Single Page Application (SPA) framework

Published on
September 29, 2017
Product Updates

Article

Application stacks are ever-changing Single Page Applications (SPA) built with a JS Framework such as React, GatsbyJS, Vue.JS, among many others, have become very popular as they offer very smooth experiences and are particularly appreciated by users. A/B testing with them can become a real headache for marketers if their optimization solution doesn't support these stacks.

SPAs don’t require page reloads, creating a challenge for A/B testing solutions

When a user views a traditional non-SPA page and clicks on a link, a new page with a different URL loads, and the A/B testing snippet also reloads to make sure the context of the loaded page is evaluated by the solution. This enables you to track a user journey and to contextualize their experience if necessary.

With a Single Page Application, dynamic navigation means that once the page is loaded, it doesn’t require page reloading. Instead, virtual page views will be loaded by the App as visitors browse different areas of the website. The goal is to build a more natural user experience similar to what you could have with native mobile apps, by removing page loads, and reducing waiting time. This is made possible with JavaScript frameworks such as ReactJS, VueJS, or GatsbyJS.

But this lack of reloading has an impact on A/B tests, because the solution will only load once at the first page seen by the visitor. When a visitor browses from one page to another, the solution is simply not aware of it. If the tag of your optimization solution loads only once and doesn’t update according to the visitor’s progression, tracking his user journey in real time becomes complicated, if not virtually impossible.

Kameleoon is compatible with any Single Page Application framework

What good is a powerful technology if it can’t be used in any type of situation? Whatever JavaScript framework you are using for your Single Page Applications, you will be able to optimize it with Kameleoon.

There are usually 2 different scenarios in Single Page Applications. Each of them may have an impact on experiments built with the Kameleoon graphic editor because our application file will only load at the first page seen by the visitor.

1. The page doesn’t reload, but the URL is updated

Most Single Page Applications that are developed today are of this type. Even though the SPA loads virtual page views as visitors navigate different sections of the site, the URLs are being rewritten dynamically by the SPA.

Kameleoon will automatically detect visitor navigation between pages by observing dynamic URL changes. When a change occurs, Kameleoon reloads its entire engine and re-evaluate the whole context of the page so that experiments can still be run as usual on Single Page Apps.

2. The URL remains static

This case is less common, and much more complicated. When the URL doesn’t change, most solutions won’t be able to detect any changes that occur within the Single Page App, because no transition to a new URL is detected. Additionally, most SPAs can add additional elements or dynamically change elements as a visitor interacts with the app.

Kameleoon solves this issue by monitoring in real time new updates by using MutationObservers on the SPA (even if the page itself doesn’t fully reload), so that we can apply (or reapply) variation changes when something has changed on the website.

For developers who utilize our Activation API to code experiments, there is now a new function that can be called on -demand to force the reloading of Kameleoon's engine to manage advanced use cases.

For users of the graphic editor, actions currently supported by Kameleoon include style changes, wording modification, position updates (swap, insert after or before) and use of custom CSS. Insertions of new elements on the page are not currently supported.

Ready to get started? See this step-by-step guide and technical documentation.

Request a demo to see this feature and the Kameleoon platform in action.

Questions? Curious? We'd love to hear from you. Please reach us at product@kameleoon.com

,

We chose Kameleoon because it gave our marketing and product teams the optimization tools they needed to grow our business without having to rely heavily on developers.

Julien Descombes

Digital Communication Manager - Toyota

Explore our resources

What is switchback testing?

A/B testing

Article

How Prompt-based Experimentation is making experimentation easier and faster

AI

Article

Contentsquare and Kameleoon build the first analytics x experimentation agentic AI workflow

Article

Experiment your way

Get the key to staying ahead in the world of experimentation.

[Placeholder text - Hubspot will create the error message]
Thanks for submitting the form.

Newsletter

Platform
ExperimentationFeature ManagementPBX Free-TrialMobile App TestingProduct Reco & MerchData AccuracyData Privacy & SecuritySingle Page ApplicationAI PersonalizationIntegrations
guides
A/B testingVibe ExperimentationFeature FlaggingPersonalizationFeature ExperimentationAI for A/B testingClient-Side vs Server-Side
plans
PricingMTU vs MAU
Industries
HealthcareFinancial ServicesE-commerceAutomotiveTravel & TourismMedia & EntertainmentB2B & SaaS
TEAMS
MarketingProductDevelopers
Resources
Customers StoriesAcademyDev DocsUser ManualProduct RoadmapCalculatorWho’s Who
compare us
OptimizelyVWOAB Tasty
partners
Our Partner EcosystemBecome a PartnerIntegrations DirectoryPartners Directory
company
About UsCareersContact UsSupport
legal
Terms of use and ServicePrivacy PolicyLegal Notice & CSUPCI DSS
© Kameleoon — 2025 All rights Reserved
Legal Notice & CSUPrivacy policyPCI DSSPlatform Status