execute
Theexecute() method executes JavaScript and applies CSS for the specified variation ID.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Reference for the Kameleoon.API.Variations.execute method, which runs a variation.
execute() method executes JavaScript and applies CSS for the specified variation ID.
if (Kameleoon.API.Utils.querySelectorAll("#KameleoonPopin").length == 0) {
Kameleoon.API.Experiments.getById(123456).variations.forEach(function (variation) {
if (variation.name == "MyVariation") {
Kameleoon.API.Variations.execute(variation.id);
}
});
}
Was this page helpful?