Login
English

Select your language

English
Français
Deutsch
Platform

PROMPT-BASED EXPERIMENTATION

Optimize any website by chatting with PBX, Kameleoon’s AI. Learn more

SOLUTIONS
Experimentation
Feature Management
KEY Features & add-ons
Mobile App Testing
Recommendations & Search
Personalization
specialities
AI in Experimentation
Single Page Application
Data Security & Privacy
Data Accuracy
Integrations & APIPartners ProgramSupportProduct Roadmap
Solutions
for all teams
Marketing
Product
Engineering
Data Scientists
For INDUSTRIES
Healthcare
Travel & Tourism
Financial Services
Media & Entertainment
E-commerce
B2B
Automotive

Samsung gains autonomy and speed in its most advanced tests with PBX

read the success story
PlansCustomersResources
Book a demo
Book a demo

Quick links

Heading 2
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

Addressing customer concerns: 22 online banking examples to drive better test ideas

Banking

Article

PBX multitasking and waiting time for faster, more fluid workflows

Article

Risk-free A/B testing for banks and financial services

Article

“We needed a way to assess visitor interest more accurately. With manual scoring, lead quality was too low. We chose Kameleoon for its AI, which precisely targets visitors based on their interest in our cars.”

Caroline Josse
Head of Marketing Digital & Acquisition at Toyota

“This campaign shows the multiple benefits of artificial intelligence for personalization. Toyota’s teams have been completely convinced by the performance of Kameleoon’s AI personalization solution and are expanding this approach across the customer journey.”

Caroline Josse
Head of Marketing Digital & Acquisition at Toyota
before ai
Book a demo
Book a demo
Book a demo
Book a demo
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