Learn how to add and update variations with the visual editor or code editor.
Use variations to show alternate versions of site pages. You have the flexibility to launch small edits (e.g., text, image, or styling changes), large edits (e.g., full-page redesigns), or edits that span multiple pages (e.g., navbar, header, or footer). First, create an optimization to define where and what you want to edit (e.g., homepage headline), then create a variation for each alternate version you want to run (e.g., each alternate headline).
Choose an editor
You can create variations using the visual editor or the code editor. In most cases, we recommend the visual editor.
- Visual editor — make code-free changes to headlines, paragraph text, images, buttons, and more
- Code editor — use JavaScript and CSS to build advanced changes
How to create a visual editor variation
Note
When a variation runs, Optimize applies changes in the order you create them. If your variation includes multiple changes that depend on each other, make sure any prerequisites appear earlier in the change list.
Open your Optimize site in Webflow, then:
- Click Optimizations in the Navigation panel
- Click an optimization
- Click Add variation
- Enter a name for the variation in the Variations panel
- Make your edits:
- Select an element to edit it
- Use the Changes panel to apply changes (e.g., text, style, layout)
- Hover over an existing element to insert a new element
- Explore common variation edits you can make with the visual editor
- Click Save at the bottom
- Preview your variation before launching it
How to create a code-based variation
Before you get started
Review the code editor guide to learn about writing code in Optimize. Need jQuery? Enabled it as a plugin.
Open your Optimize site in Webflow, then:
- Click Optimizations in the Navigation panel
- Click an optimization
- Click Add variation
- Enter a name for the variation in the Variations panel
- Click the Changes tab at the top of the Changes panel
- Click X by any changes listed and/or click Enter custom JS or CSS
- Set a Selector and/or Precondition — at least one is required per optimization for coded variations
- Enter JavaScript or CSS in the associated code fields at the bottom
- Click Run code to preview your code
- Click Save at the bottom
- Preview your variation before launching it
How to edit a variation
Important
Always pause live variations before editing them to avoid visitors seeing unintended content or issues.
Open your Optimize site in Webflow, then:
- Click Optimizations in the Navigation panel
- Click an optimization
- Hover over a variation, then click the Options icon > Edit
- Make your edits:
- Select an element to edit it
- Use the Changes panel to apply changes (e.g., text, style, layout)
- Hover over an existing element to insert a new element
- Explore common variation edits you can make with the visual editor
- Click Save at the bottom
- Preview your variation before launching it