Skip to main content

A/B Test with and without an OptiMonk campaign

Updated today

Setting Up a Control Group for Revenue Measurement

To measure the additional revenue generated by your OptiMonk campaigns, you can run an A/B test that compares campaign performance against a control group. In this test:

  • Variant A: Visitors who see your campaign

  • Variant B (Control): Visitors who don't see any campaign

This approach isolates the impact of your campaigns and reveals the true incremental revenue they generate. You can track and analyze results directly in Google Analytics.

mceclip13.png

Here you can see even more detail:

mceclip9.png

We will need a benchmark for the measurement, where we can see how much our visitors spend when they do not see any OptiMonk Campaigns. We will need two OptiMonk Campaign Variants for this measurement: one of the Variants will work as a usual Campaign, which will show up to half of our visitors (as we are running an A/B test with 2 Variants). The other Campaign Variant will not show up at all, this will be the benchmark.

Thanks to the two Variants, we will be able to use Google Analytics to compare the spending of our visitors who had seen our OptiMonk Campaign and the visitors who did not see any of our OptiMonk Campaigns. With these measurements, we will be able to tell without any doubt if our Campaign is profitable.


Setup Instructions

Step 1: Access Your Campaign

Log in to your OptiMonk account at https://app.optimonk.com/login/en, select Campaigns from the left sidebar, and choose the campaign you want to test.

mceclip0.png

Step 2: Create Campaign Variants

Click Add new variant to create at least two versions of your campaign.

mceclip1.png

Step 3: Activate Both Variants

Ensure both variants are active by toggling the Inactive switch to active. Then, click on the name of the variant you want to use as your control group (the one that won't display to visitors).

mceclip2.png

Step 4: Access Developer Mode

In the selected control variant, navigate to Dev mode from the left sidebar.

mceclip3.png

Step 5: Hide the Control Variant

  1. Select JS editor

  2. Choose Popup shown from the JS event dropdown

  3. Insert the following JavaScript code:

    $('#om-holder-campaign-' + campaign.getId()).hide();  setTimeout(function(){    $('body').css('overflow','visible');   $('html').css('overflow','visible'); }, 0);
  4. Click Save on the right, then Save & Exit at the top

mceclip0.png

What this code does: It ensures the control variant remains hidden from visitors while still tracking their behavior for comparison.


Step 6: Track Results in Google Analytics

You can now monitor and compare the revenue performance of both variants using Google Analytics. Follow our guide: A/B test performance report in Google Analytics

That's it! If you have any further questions or need any help, just let us know at [email protected], and we would be happy to assist you!

Did this answer your question?