This website works best with JavaScript enabled. Learn how to enable JavaScript.

How to Add External JS/CSS Libraries

Last updated

The code editor is a powerful tool for users to implement changes on test variations using code. Using the editor, you can edit the variations by directly editing JS/CSS of the webpage and also import custom libraries or a standard library using the quick add option.

  • Adding Custom JavaScript
  • Importing External CSS

Adding Custom JavaScript

  1. To add JavaScript code, click the Settings icon next to the variation you want to modify and select Edit Code option on the Variation settings pop-up.
  2. To add your own JS library, select JavaScript > Include External JavaScript under Campaign JS/CSS.
  3. To import custom JavaScript, go to Settings and click Include External JavaScript. Then, type the file path to your custom JS and then click Done.editor-50
  4. There are some common Javascript libraries included in the Quick Add drop-down. You could select one and then click Done. By default, VWO automatically includes the jQuery adding the custom JavaScript code snippet.editor-51
  5. The JavaScript code snippet for the selected library is included in the variation, as displayed in the following screenshot. Make your modifications to the library and then click Done.

Importing External CSS

  1. To add your custom stylesheet into the variation, select CSS > Include External Stylesheet.editor-52
  2. To import the stylesheet, enter the file path to your custom CSS.
  3. To use some commonly known CSS libraries, select one from the Quick Add list and then click Done.

Was this article helpful?

Thanks for your feedback!
Please email us at to tell us what you were looking for. We'll send the answer to your inbox.

Contact Us / Login