
The 12 Kameleoon days of Christmas: part 5
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.
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.
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.

Read more in the series here:
- Day 1: Visualization of modified/tracked elements on a page
- Day 2: Reallocating traffic in case of issues
- Day 3: Simulation mode: visit and visitor generator
- Day 4: Click tracking: automatically send events to analytics tools such as Google Analytics
- Day 5: Adding a global code to an experiment
- Day 6: Excluding time periods from results
- Day 7: Measuring confidence stability
- Day 8: Switching to custom views
- Day 9: Using custom data for cross-device reconcilation
- Day 10: Personalization campaign management
- Day 11: Adding CSS selectors
- Day 12: Changing hover mode