Campaign JS/CSS is the code which runs across your website including the variations and control. You should add global JS/CSS when you want to implement a change across all your test pages including the control. To add campaign-level JS/CSS, click Campaign JS/CSS on the upper-right side of the editor.
This is the default mode when you select the Campaign JS/CSS option. Here, you can define JS code that you want VWO to execute before the campaign code executes for a page. Campaign or global JS are used for different functions such as the following:
- Sending VWO campaign data to analytics tools
- Custom conversion goal tracking
- Defining a JS variable to capture the variation served to a visitor and then triggering the respective variation of a survey/notification widget
To add post-campaign JS, click the Settings icon next to Variation1 and then click Edit Code or click </> on VWO Visual Editor.
To add custom CSS to the website, select CSS > Include External Stylesheet.
Add your pre-campaign JS code on the right panel of the window. On the left panel, enter the global/post-campaign JS code you want to execute after applying changes.
To apply the changes, click Done.