Skip to main content
Adding experiment-level code
7 December 2020

The 12 Kameleoon days of Christmas: part 5

Reading time
3 min
Author
Frédéric De Todaro  Kameleoon
Frédéric De Todaro
Frédéric is Chief Product Officer and directs product strategy at Kameleoon. Focussed on continuously improving our A/B testing and personalization platform, he shares his advice on how to best deploy our technology and use it to positively impact digital conversions.

Performance is key to running successful experiments and personalizations - any slow down in page loading speed is likely to impact the visitor experience and potentially change their behavior, hitting the reliability of your results.

At Kameleoon we pride ourselves on having an extremely small script (under 30 Kb - less than half the size of some of our rivals). We’re always looking for ways to optimize performance even further, and our experiment-level code feature is designed to help achieve this.

1 Add a global code to an experiment

Available both to front-end marketers (through our graphical editor) and developers (through our Code Editor), this feature enables users to add an experiment-level code (CSS and/or JavaScript) which is shared by all variants.

Add global code to experiment

This has three main uses:

Modifying all variants including the original page

Sometimes, you may want to make changes that apply to all variants including the original page. For example, you want to display a Christmas banner announcing a new offer for all visitors no matter which version they are bucketed in, but want to run different variants of it. This is where the experiment-level code feature makes perfect sense, as it can be quicker to implement than changing the underlying website, particularly if it would involve developers or members of a different team.

Modifying all variants

Adding common elements

Often different variants share common elements (shared CSS rules or JavaScript code). Manually adding these to each variant is time-consuming and increases the size of the code, potentially impacting performance. By adding these common elements through a global experiment code you will therefore have less code on each variant, generating a simpler, smaller script and improved performance.

Add tracking to an experiment

By inserting global code in every variant you can easily add tracking to the entire experiment. This is particularly useful for client-side marketers, as they can manage tracking without needing resources and time from their development team, thus speeding up the deployment of experiments.

Find out more about the global code feature here and come back tomorrow to read about our date range exclusion feature.

ebook-12-features-kameleoon
Frédéric De Todaro  Kameleoon
Frédéric De Todaro
Frédéric is Chief Product Officer and directs product strategy at Kameleoon. Focussed on continuously improving our A/B testing and personalization platform, he shares his advice on how to best deploy our technology and use it to positively impact digital conversions.