This guide will help you in understanding how Experiment Code Editor works and how it can be used.
Using “Experiment code Editor”
Experiment Code Editor - Experiment JS (Global JS)
Some of the most common use cases are,
- Send data from Freshmarketer experiment to any analytics tools.
- Track goals for Custom Conversions
Experiment Code Editor - Experiment CSS (Global CSS)
Experiment CSS in Freshmarketer lets you write Style sheets that affect all variations including the Original. You can define a class and assign a CSS property which will be applied globally to all variations and also the original.
Some of the use cases are,
- Setting a color for specific element
- Defining the hover specific property
- Adding borders to table elements.
Locating “Experiment Code Editor”
This option can be found in the overlaid A/B testing toolbar.
STEP 1: In Freshmarketer’s A/B Testing toolbar, click "<>" Experiment Code Editor on the Top right-side of the toolbar.
Variation JS : Changes will be applied only for the variation you are editing
Experiment JS : Changes will be applied for all the variations including the Original
STEP 3: To add a Style sheet, click on CSS tab and choose "Variation CSS" to apply changes only for the variation you are editing, If you would like to apply the changes for all the variations including the Original then choose "Experiment CSS" tab and enter the CSS Style sheet in the text area and choose "Apply"
Variation CSS : Changes will be applied only for the variation you are editing
Experiment CSS : Changes will be applied for all the variations including the Original