Overview
The Kameleoon platform offers multiple APIs that customers can use for various purposes. These APIs enable you to seamlessly conduct front-end A/B experiments, integrate Kameleoon more effectively into your digital ecosystem (by fetching and sending data), automate specific tasks such as programmatically creating or updating an experiment, and import or update your product catalog if you use our Product Recommendation and Search Personalization add-ons.
We have categorized our APIs into four main groups:
- the Activation API (JavaScript API),
- the Automation API (REST API),
- the Data API (REST API),
- and the Product Recommendation API (REST API).
This article provides a high-level overview of these APIs, helping developers quickly identify the API they need and navigate to the relevant documentation.
The Activation API
The Activation API is a JavaScript API that comes with the Kameleoon application file (kameleoon.js
), which is installed on your website if you use Kameleoon Web Experimentation or Kameleoon in Hybrid mode for Feature Experimentation. This API allows you to call its methods directly through JavaScript and access various data structures. Additionally, it provides the Kameleoon Conversion Score (KCS)—our real-time, customer-centric propensity score—available with our AI Predictive Targeting add-on.
This API serves several purposes:
-
Provides methods to implement front-end A/B testing variations without flickering. These methods are crucial for ensuring the proper functioning of the Kameleoon platform and leveraging its Anti-Flickering technology. All front-end developers working with Kameleoon should be familiar with them.
-
Provides tracking methods to send data to Kameleoon, such as conversion data or visitor/customer characteristics. These methods function similarly to those provided by analytics solutions like Google Analytics. You can call them directly via embedded JavaScript in your HTML pages or through a Tag Manager such as Google Tag Manager (GTM). We also recommend reading our documentation on the Kameleoon CommandQueue.
-
Provides methods to track product-related events, such as product views and purchases, adding products to the cart, obtaining automatic product recommendations, and retrieving product-specific statistics for social proof and urgency use cases.
-
Provides useful real-time information gathered by Kameleoon. For example, you can track a visitor's page views, with data stored and accessible across all previous visits. You can also determine how long a visitor stayed on your website during their first visit, even if they are currently on their fifth visit.
-
Provides entry points to override Kameleoon's default assignment bucketing logic. For instance, when a visitor is assigned to an A/B experiment for the first time, their variation is randomly determined. With the API, you can override this assignment and register the visitor into a specific variation.
As the Activation API is entirely JavaScript-based, scalability is not a concern. Nearly all of its methods (except those requiring a server call, such as product catalog-related functions) execute synchronously and return immediately. No authentication is required for this API, and standard browser architecture and security protocols ensure that visitors can only access their own data (stored in Local Storage) and not data from other visitors.
The Activation API is fully documented here. You can also find a separate guide on custom JavaScript Kameleoon Events.
The Automation API
The Automation API is a REST API that enables you to trigger and perform nearly every action available through our Kameleoon App programmatically. This allows you to develop your own software to interact with our platform and leverage all its features and capabilities.
For example, some of our clients have used this API to integrate Kameleoon with their Git repositories, enabling them to manage Kameleoon variation code directly within their version control system. You can also design a custom dashboard and retrieve experiment results directly from Kameleoon. This API is easy to use, making it effortless to build custom systems that operate or interface with Kameleoon.
This API follows REST principles, allowing you to call it using any REST-capable framework in any language (Java, C#, NodeJS, Python, etc.). We adhere to REST conventions, ensuring that any developer familiar with them will find it easy to use. The API is not intended for extensive usage. It should only be called a dozen times per minute per customer/user account on our systems. It is not scalable to millions of calls per minute and should not be invoked for every visitor on your website. If you require high-volume data access, refer to the Data API for more information.
We offer a VS Code extension that utilizes our Automation API. For more information, please refer to our documentation.
The Automation API is fully documented here.
The Data API
The Data API is a REST API that enables the retrieval and writing of data stored on remote servers rather than locally on the visitor's browser. Unlike the Activation API, where data is instantly available on the browser side, this API is designed for communication with external data sources, remote servers, or DMPs. However, unlike the Automation API, it can handle millions of calls per minute, making it suitable for requests on a per-visitor basis.
For example, the Data API is used for Cross-Device History Reconciliation, a powerful Kameleoon feature that automatically synchronizes a Unique Visitor's complete action history across all their devices. If a visitor browses your website twice on their smartphone and later returns on their desktop computer, we will correctly report this as their third visit in the Activation API data layer. Behind the scenes, our servers make a call to the Data API to ensure data synchronization.
Another common use case is registering "late transactions" that cannot be sent directly via the Activation API. For example, if your business sells travel packages and the final transaction or confirmation occurs in person at a physical outlet rather than online, you can use this API to record those transactions—something that would be impossible with a web/JavaScript-based API.
The Data API is a REST-compliant API, meaning it can be called using any REST-capable framework in any language, such as Java, C#, NodeJS, or Python. We adhere to REST conventions, ensuring that developers familiar with them will find it straightforward to use.
The Data API is fully documented here.
The Product Recommendation API
The Product Recommendation API is a RESTful API that enables efficient management of your product catalog and facilitates the retrieval of personalized product and search recommendations. This API is particularly beneficial for clients who wish to handle recommendation logic within their own backend systems or mobile applications.
This API serves several purposes:
Product Catalog management
The following endpoints should be used to import and update your product catalog:
- Import Categories – Upload your product categories into Kameleoon.
- Import Products – Add or update products in your catalog.
- Update Available Products – Synchronize real-time product availability.
- Remove Products – deletes products from Kameleoon.
Product and Search Recommendations
- Get Product Recommendations – Obtain personalized product suggestions based on visitor behavior.
- Get Search Recommendations – Fetch search recommendations tailored to user queries.