1. Help Center
  2. Troubleshooting

Exclude bots from your experiments

THIS ARTICLE WILL HELP YOU:

Introduction

Convert Experiences automatically filters known bots from your experiment reporting results, but bots can still be bucketed in experience variations when they meet experience’s conditions.

In this article we will show you how to exclude bots from experience variations, as long as real visitors still see the Original version and you are not intentionally cloaking.

Add an Audience JS Condition

You can exclude bots from viewing an experience variation by simply adding the following Custom JavaScript condition to the Audience definition:

navigator.userAgent.indexOf("Googlebot") < 0 && navigator.userAgent.indexOf("Yahoo!") < 0


This condition ensures that bots with known user agents such as Googlebot do not trigger the experiment.  

 

You can narrow it down for specific bots by referencing the bot userAgent list here.

Verify the Audience Condition

Test the audience by overriding your web browser’s user agent using any of the popular "User-Agent Switcher" plugins.