Context-level code runs as soon as the page matches against the context path-matching rules.
Some websites require CSS and or JavaScript to execute when the context matches, independent of the variant combination the user receives.
Some use cases for using context-level code include:
- Sharing re-usable JavaScript functions between variants.
- To trigger an Evolv event.
To add CSS and or Javascript to a context
- Select Edit Mode from the dropdown in the top-right of the Web Editor.
- Or select View > Edit Mode from the menu.
- Select the context from the panel on the left.
- Add your CSS and or JavaScript code to the relevant fields on the right of the Web Editor.