How to activate headline and image A/B testing

Marfeel offers headline and image A/B testing as an add-on. This article assumes you have the feature enabled on your account. In case you don’t, do not hesitate to contact your Account Manager to activate it for a trial.

Marfeel offers two different ways to implement A/B testing. Each option with its pros and cons.

No code A/B testing activation

Marfeel allows publishers to give headline and image A/B testing without having to add any code or extra instrumentation.

The Marfeel SDK will lazy load when needed the required A/B testing runtime. This option can be easily enabled from and will get you started within seconds.

The no-code activation is ideal to give A/B testing a go, to get you started without any friction and any costs, to see all the power and what you can achieve with it.

To activate headline and image A/B testing you need to create a new Editorial A/B testing Tag Experience:

You’ll have to specify the url of the page where you want to have A/B testing enabled:

Javascript based instrumentation

Marfeel allows publishers to directly load the A/B testing runtime on the pages using it. This method avoids a round-trip to the Marfeel servers and helps preventing visual flickers when swapping headlines.

Once you’ve decided to fully adopt A/B testing we strongly recommend using this activation method.

To activate it you have to add these 2 extra lines of code to the pages where you want to enable A/B testing, most of the times it will only be the homepage.

Remember to replace the site_id=0 with your account ID, and url= with the URL where the script is loading
<script type="module" src=""></script>
<script type="application/javascript" src="" nomodule=""></script>

The nomodule attribute on the script tag is a browser hint to only load one or the other depending on its supported features. It’s not supossed to load both of them. If nomodule is not present both JS files will be incorrectly loaded. You can read more about nomodule on Mozilla docs.