You can add your own JavaScript or CSS declarations to maintain total control of your pages. In the editor, click on the tab of the desired variation to make the following drop down menu appear:
To change the CSS or the JavaScript, click on "Add CSS" or "Add JavaScript,” respectively. A new window will appear, allowing you to insert the desired code.
After you have finished your code, click on the "Save" button to validate your changes.
Note 1: The CSS that is added will replace the existing CSS, depending on the parts of the CSS that were rewritten.
Note 2: To add JavaScript, it is not necessary to add the
tags. Just write your code directly in the window.
Note 3: JavaScript can be added in two places:
- At the test level, with the icon
: the code applies to the entire test and all the variations, including the original version. Note: the code applied at the test level can only be run when you use the Preview function. It cannot be run when the test is active.
- At the variation level, as described above: the code is only applied to the selected variation.
Note 4: The order in which the various scripts are run can be important depending on the test scenario. You should know that we apply scripts in the following order:
- First, we run the JavaScript code defined at the variation level.
- Then we run the code defined at the test level.
- Finally, the code at the account level (Global Code Feature) is run.
Comments
0 comments
Please sign in to leave a comment.