Make any changes to your website using a simple visual editor.

Experiments (also known as web optimization or web personalization) allow you to make any changes to your website using a simple visual editor without the need to code (What You See Is What You Get editor). Our editor supports changes like adding or removing whole blocks, adding recommendations, inserting web layers or adjusting colors and fonts in various ways. They also allow you to personalize your website using the data from Exponea by using Jinja. They work on a similar basis as Web layers – you can create multiple variants, show them only to a specific audience and AB Test them. Experiments automatically track a single event called experiment when they are applied to your website so you can make further analyses based on the data collected from these events.

You can watch this video to get an overview of the basic features:

Experiments can significantly decrease your time to value as they allow you to make small changes to your website without having to know how to code or rely on your IT department. Moreover, any changes can be AB tested and evaluated right away using the Exponea interface, and you can use the data about your customers and personalize the web for them using Jinja.

What is an Experiment

An Experiment is essentially just a list of modifications. This list is ordered – the order of the modification matters, they are applied to the webpage in the exact order from top to bottom. There are multiple available modification types to choose from and they are described later in the section Modification types.

Each Experiment also has a few settings associated with it just like any other campaign. The settings are described in the section Settings.

Creating an Experiment

You can create a new experiment by going to Campaigns > Experiments > Create new

You will be prompted to enter the URL of the website you want to modify with the Experiment. This might be the homepage of your website or any other page that you wish to adjust. Please note that this does not limit the experiment to this URL; it only serves for setting up the experiment.


The page on the URL you enter must be integrated with the current project before creating the Experiment, otherwise, the Experiment won't work. If you want to preview experiments on websites that are not integrated with your project, you can download our Chrome extension.

After clicking on the Create button, you will be taken to your website and an inline visual editor (called the Experiments editor) will be loaded.

Experiments editor

Now you are in the Experiments editor with the possibility to select and change any element on the website. Let's have a look at each part of the editor now, as it is numbered in the screenshot below.





Experiment variants

Create and switch between variants of your Experiment. You can then compare their performance through an AB Test . Read more in section Experiment variants.


List of modifications

Expands the list of all modifications you made. Clicking on a modification will take you back to the editing menu of that element so you can adjust it again. You can also delete a modification, which will bring that element back to its original state. Read more in section List of modifications.


Undo / Redo

Undo or redo your changes to the experiment.



CSS selector of current modification (or the currently selected element on the page).


Number of selected elements

Shows the number of selected elements. You can select more elements on the website by holding the SHIFT button while clicking on them.


Browsing mode

Switch to the "browsing mode" if you need to navigate on the website and access another page.


Mobile preview

Mobile preview.


Close the editor

Close the editor and return to Exponea without saving your work.



Generates a link to your modified website that you can share with others. Note that this is used only to preview the changes, the Experiment will not be launched. The generated link is valid for 24 hours, after that it expires.



Exit the visual editor either with or without saving your changes. This will not launch the Experiment yet. In order to do that, you need to exit the visual editor and click Start back in the Exponea application.


Modification selection

Currently selected element(s) on the page - when clicking on the page (or element(s) modified by selected modification)


Modifications list

This menu pops up when you click on an element on the website. Each function is explained in section Modifying elements.

Experiment variants

Variants serve as a tool to compare different modifications of the same text, picture, structure, functionality, etc. while comparing it to a control group.

You can modify the variants of the experiment using the variant selector (labeled with number 1 in the previous screenshot). It is possible to duplicate, rename, and delete a variant.


There's always a variant called Control group. This is how your website looks without the changes in any other variant. This variant cannot be changed or deleted.

List of modifications

You can access the list of modified elements and the applied modifications using the Modification list button. Each modification in the list shows the modified elements and the changes made in the modification.

You can hover over a modification to highlight the edited element. You can also click on a modification to change it.

Personalized modifications

When a modification is personalized (it contains Jinja), it will be marked in the modification list.

Please note that these modifications load slower than modifications that are not personalized. This also affects any modifications that are applied after the personalized modifications. If possible, sort your modification list in such a way that all (or as many as possible) non-personalized modifications are placed before the personalized modifications.


"Selector" is a CSS selector of the current modification (or the currently selected element(s) on the page).

Whenever your mouse cursor is on any element on your page, its name will appear at the upper-middle section called Selector. You can select the desired element by clicking on it. If you hold the SHIFT key, you are able to select more items by clicking, as could be seen in the picture above.

After selecting an element(s) by clicking on it, you can still edit the auto-generated CSS selector by clicking on a pencil-shaped icon in the top bar. For example, your page may have many different pictures and adjusting all of them will take too much time; select one picture and rewrite the selector in order to select more (or all) items.


Note: the change of the selector has to be confirmed by hitting the ENTER key after modifying the selector.

Saving your work

Confirm your changes by clicking on the Save button in the top menu. You will return back to the Exponea app where you can edit additional settings of the Experiment and set up AB testing.


Because of security concerns, it is not possible to save the experiment directly from the Experiment editor. Therefore, do not just close the browser tab when you click on the Save button. Instead, wait until you are redirected to the Exponea app and it fully loads. You should see a confirmation message Success! Your experiment was successfully saved.

Modifying elements

After clicking on any element, a menu will pop up presenting you with several options on how to modify that element. Different modification types are described separately in section Modification types.

Select parent / child / similar element

Change your current selection to the parent or a child of the currently selected element. You have to understand a little bit of HTML and its structure to use this effectively. Selecting a parent element means going one level up within the website structure. Each element can also contain multiple children and you can select one of them to move down within the website structure.

Modification types


Use this option to change the element visually. You can edit the dimensions, colors, fonts, spacing of the element, etc. You can enter the colors manually (using the hex or RGB color format) or use the color picker. When changing the font, make sure it is loaded onto the website. And finally, the sizes need a number and a unit (for example 43px or 12em). The format you should use is indicated in the fields as a placeholder.

This modification type also allows you to change an image on the website and a link's URL address. In order to do that, you have to first select an image or a link.

If you are advanced, you can switch to the Code tab and modify the HTML of the selected element. You can use Jinja here to personalize the content for the user.


This will open a menu with your Web layers and HTML Blocks saved in the Asset Manager. In both cases, you can either pick an already existing template or create a new one using the code editor.

See the next section to learn how to go about placing the HTML block on the website.

  • Weblayer: Web layers are campaigns that are shown on the specified pages of your website to a specified audience. They are executed using HTML/CSS/Javascript. You can use them to show a message to the customer or prompt them to action. Use any Web layer from your project and display it using Experiments.
  • Block: Use any existing HTML Block from your project. You can tweak its parameters.
  • HTML: Write your own custom HTML and use Jinja to personalize it.


Moving an element has two parts. Before selecting an anchor point on the website, you need to select whether you want to place your currently selected element before or after that anchor point. You can also put it inside that anchor point as the first or last child.

Before and after are self-explanatory and also the most-used options — the new content will be placed right before or after the selected element. Using these two options places the new content outside the selected anchor element which means that the new content will not inherit the style of the selected element. If you put the element inside as the first or last child, it will inherit the style of the anchor element. See the screenshot below.

In a non-programming vocabulary, the first-child matches the first element of a series of tags. Last-child works absolutely identical as first-child, but it selects the last element in the list.In a non-programming vocabulary, the first-child matches the first element of a series of tags. Last-child works absolutely identical as first-child, but it selects the last element in the list.

In a non-programming vocabulary, the first-child matches the first element of a series of tags. Last-child works absolutely identical as first-child, but it selects the last element in the list.

Next, click on the target button and then select the element which you want to use as the anchor point for these settings.


You can delete the selected element completely. After clicking this button, you can also choose whether you want to leave blank space instead of this element or not.

Run script (advanced - requires the usage of Javascript)

This modification can be used to run custom code for the selected element(s). You can choose to run your code at different points in time — either immediately when the page loads, after the page is loaded, or once for each selected element.

Execute options are:

  • immediately, before the page content is loaded – You code will run once the customer opens the page and the browser starts loading the content. Note that the page content may not yet be fully loaded.
  • once for each matched element – Your code will run once for each element selected for this modification. You can get a reference to the element using this.element (see below). Note that the code may run multiple times based on the number of selected elements. Make sure to account for this in the code.
  • on document ready event with all matched elements – Your code will run once with all matched elements when the page fully loads. You can access the elements using this.elements (see below).

The remove function

Your code should return an object with a single function called remove when using the Run script modification. This function will be called by Exponea when the Experiment should be reverted. Use the function to revert any modifications that you performed in the modification.

return {
    remove() {
            // your revert/undo code

Using this in your code

You can use the special this keyword in the code to access data provided by Exponea. The data is described in the table below.



this.data and this.params

Contains data about the experiment. You can use either variable but we recommend using this.params because it is more readable in the code. See below for what properties this object has.


The ID of the current experiment.


The name of the current experiment.


The AB Test variant that is currently shown to the user.


The name of the AB Test variant that is currently shown to the user.


Reference to the selected HTML element. If multiple elements are selected, only the first one is provided here. Great to use with code that is run once for each matched element.


(Notice the plural form.) An array of references to all selected HTML elements for the modification.


This is either true when previewing the experiment in the visual editor or false when running the experiment in production.


Reference to the Exponea SDK. You can use it, for example, to track events using this.sdk.track('event_name').


The CSS selector (string) that was used to select the elements.

Design (AB test settings)

In the Design tab, you can create multiple variants of the Experiment and set up AB Testing. You can also change the preview page URL, change the variant names, and even duplicate them.

You can choose the traffic distribution of your customers in the right-middle part of the page. If you select the Automatic traffic distribution (default setting), Exponea will determine the best performing variants of the Experiment automatically and then prefer these variants over the less performing ones. Contrary to that, Custom traffic distribution allows you to select the percentage of your customers to see each of your variants. Note that both cases allow you to create a control group, which is a group of people who will continue to see your original page for the purpose of a better evaluation.

You can also choose to duplicate your variant.


You can modify the settings of the Experiment in the settings tab.

Conversion goal

The automatic AB test optimization and the automatically generated evaluation report are based on this setting.


You can choose to display the experiment instantly or set a specific time period in which the experiment is shown.

Show on

Choose on which URLs to show the experiment.

Javascript condition

You can specify custom javascript as a condition for displaying the experiment. This code is then executed before the experiment is applied to the page, either by the SDK or by the non-flickering script. Jinja is NOT supported here.

For more info see the section below.

Target devices

Show on any device or only desktop or mobile.


Set until when you want to keep showing the experiment for each eligible customer.

  • Once: Shown only once for the whole period of running the experiment. This is tracked when the event experiment tracks action=show.
  • Once per visit: Shown only once between a session_start and session_end. Once action=show is tracked, it will be shown again only in the next session.
  • Always: Will be shown all the time for each visit, each day and after each page refresh even when the user closes the web layer. This is the default and makes the most sense for experiments


Choose which consent is required for a customer to see this experiment.
Read more about Consents.
If you don't use consents yet, you will see the campaign groups setting here.


Define your custom audience that will see this experiment. You can use our standard customer and event filters.


Tip for testing your Experiment

For testing purposes, we recommend setting the condition Show on page URL containing to something like #test. After you have launched the Experiment, you can simply go to www.yourwebsite.com/#test and you will see it in the real environment. You can even send this link to anyone and it will work until you stop the campaign.


Every Experiment has a built-in evaluation dashboard. This dashboard displays common metrics and analyses. If AB testing is enabled for the Experiment, the dashboard will also show you how each variant is performing through funnels and accompanying tables.

If you want to customize the evaluation dashboard, you can save it as a custom dashboard using the menu in the top right corner next to the Save button.

Custom Javascript condition

You can specify your own Javascript code as a condition for displaying the experiment. This code is then executed before the experiment is applied to the page, either by the SDK or by the non-flickering script. It should return true when the experiment should be shown and false when not.


Jinja is NOT supported here!


The Javascript condition code has to be synchronous and it has to return a value – your code has to contain a top-level return statement. If it does not, your code by default returns undefined (that is how Javascript works) and this is a falsy value – which means that if your code never returns a truthy value, the Experiment will never be displayed!

This code is also provided with data from Exponea in the special this keyword, similar to the Run script modification. You can use the same variables except this.element and this.elements. Read more about the provided data in the section Run modification.


Now that you have your Experiments set up and prepared for production, read about how to integrate and use Experiments on your website correctly. This is a necessary step to optimize the experience of your Experiments for your users.


Here are some common issues with using Experiments. If you have any issues with integrating Experiments into your website, have a look at the troubleshooting section in Integrating and using experiments.

I have launched the experiment but cannot see it

There can be several reasons for this:

  • If you use AB testing, you might have been assigned to the control group, which is usually set to show the original. You can check whether this is the case by going to Customers and checking what events have been tracked to your profile. Alternatively, you can try using our Chrome extension (still in Beta stage) and see what events are being tracked live in the console.
    If this is the case, then either change the AB testing or try opening the page in an incognito mode until you get assigned to the correct variant (the incognito mode changes your cookie every time you open it).
  • In Settings:
    • Check the condition "Show on" and make sure it matches the page that you are loading.
    • Check "Category": If the campaign is set to show only to customers with specific consent, your profile must have that consent too.
    • If you specified any conditions in the "Audience" part, you must match them.
  • If you set up a Custom Javascript Condition for the experiment, ensure that the code behaves as expected and make sure that it returns true. Note that if your code does not return anything, the Experiment will never be shown.

The experiment showed once but it doesn't load again

  • If the Display option in Settings is set to Once or Until interaction then you will either need to change it or use the incognito mode to see the campaign again.
  • If the Experiment is using a specific schedule, the schedule might have ended.

The experiment editor won’t start

  • It may be possible that your backend server is removing some parameters from the URL. The experiments editor relies on a special parameter in the URL called exponea-editor-params to function properly. Make sure that you server is not removing this parameter from the URL when showing a webpage. Here is a list of other URL parameters used by Exponea.
  • Make sure to disable any ad blocking extension you might be using.
  • If nothing helps, please contact our support team.

My visual changes are not applied to the element

  • The visual changes in the experiment are applied to your website with CSS. CSS works with priorities and so it is possible that your changes are overwritten by the CSS on you website. A bit of technical knowledge is required here, or alternatively, consider contacting our support team.
  • If you understand CSS a little, you know that your experiment styles are probably overwritten by your existing website styles. Consider manually writing a longer CSS selector for the element which would get a higher priority.
  • If you are changing the background color or image of an element, it is possible that the element is using the new picture element with a set of source elements. Again, technical knowledge is required to fix this problem. To fix this problem (and have your new image shown in the webpage), you have to edit the HTML of the element, remove all source elements and replace them with a single new source (or img) element with the correct src set to your new image.
  • The changes might get overwritten by another Experiment that is published in your Exponea project.
  • The changes might be overwritten by the Javascript running on your webpage. This tends to be hard to spot and requires some technical knowledge of your website.

Updated 4 months ago

What´s next?

When you set up your experiments, read about how to correctly integrate them on your website. Also read about what's called a "flickering effect" in experiments and how to avoid it.

Integrating and using experiments
Non-flickering Experiments


Make any changes to your website using a simple visual editor.

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.

We rely on cookies

to optimize our communication and to enhance your customer experience. By clicking on the Accept and Close button, you agree to the collection of cookies. You can also adjust your preferences by clicking on Manage Preferences. For more information please see our Privacy policy.

Manage cookies
Accept & close

Cookies preferences

Accept & close