Your web application provides an option to configure and execute certain JavaScript code before the JS code of your web application. This option does not affect native site code and aids in running complex experiments involving advanced audience targeting, reusable variables, etc.
For Example, Let us assume that a site owner wants all of the collected site data to be sent to the analytics tool, Eg: Google Analytics, before the JS code runs every time. For this situation, your web application’s Javascript option can be used where the corresponding code is written in the text area provided.
Other examples where this option may be used include:
Targeting multiple experiments in an organization to a specific set of similar audiences,
Running experiments on SPA (single-page-apps) sites,
Reusing custom written modules for multiple experiments,
Tracking custom events like mouse hover, scroll depth, etc.
To add the Javascript,
1 Go to Admin settings > CRO settings, and click Javascript.
2. This opens the Javascript page. Add your script in the section and click Save.