This article explains each of the different Code Editors within the Convert app and removes any confusion about them. After reading this, you will be able to differentiate between them and decide where your code should go.
There are 5 different editors in the Convert App that we will describe next.
Global Experience CSS
Here's how to style an element on your site with CSS and apply the changes on the experience level:
You can also apply CSS changes on the variation level.
This editor is to insert plain CSS that will be appended to the web page when the visitor is assigned that specific variation.
CSS is more persistent than changes included in the other editors, as CSS rules are permanent, and are not a victim of race conditions.
Whenever, CSS code is appended, but not working, you can append !important, to supersede all other rules already included in the page.
However, the code inserted in this section needs to consider that this is executed before the elements of the page have loaded. So, you either have to insert a special code to deal with this or execute after document.ready or DOM Loaded, which might bring flashing or blinking.
Global Experience JS
Code Call Order (Priority)
- Global Experience JS
There is also a code calling order based on the experiment id for the code within each experiment. Code from experiments with lower experiment's id is called first, later experiment code with higher ones.