Ad blocker issues

  • Updated
  • Optimizely Feature Experimentation
  • Optimizely Full Stack (Legacy)
  • Optimizely Web Experimentation
  • Optimizely Performance Edge

If a visitor to your site has an ad blocking service or browser extension enabled, Optimizely Experimentation may be listed in the block list for this ad blocker. Extensions like AdBlock and Ghostery may block Optimizely Experimentation assets, which then prevents Optimizely Experimentation from executing on the page.

Some ad-blockers have cdn.optimizely.com on their block lists, which prevents the Optimizely Experimentation snippet from properly loading. This can affect Optimizely Experimentation's ability to record conversions on metrics and cause discrepancies in expected behavior for visitors with ad-block services enabled.

You may find an error logged in your browser's console if Optimizely Experimentation is blocked by an ad-blocker or other service. In the Google Chrome browser, the console shows ERR_BLOCKED_BY_CLIENT if a visitor has an ad-blocking service that blocks Optimizely Experimentation on the page.

Ask users to disable their ad-blocking service

Unfortunately, there is no workaround. If your visitors have ad-blocking services enabled, they have to manually remove Optimizely Experimentation from the block list in their ad-blocking extensions or disable the ad-block service in their browser.

With that said, you could test-message a request for users to disable ad-block as an alternate solution. You could test a modal or message banner that encourages visitors to disable ad-block services to provide a more personalized experience.

Ad blockers impact on Optimizely Feature Experimentation experiments

If you are using Optimizely Feature Experimentation and your implementation of Optimizely Feature Experimentation relies on the datafile response to use the site or app, having an ad blocker enabled can break the experience for the visitor with ad-block services enabled.

You should not rely on the datafile response to to use your web app. Instead, cache the datafile (perhaps in localStorage) on each load and fall back to the cached datafile in the event that your request for the datafile fails. After you initialize the Optimizely Feature Experimentation client, you can tell if it is a valid instance checking the optimizelyClient.isValidInstance property in the client.

Key Takeaway – Update your code to handle cases when there is no response/do not get the datafile expected.

To summarize:

  • If Optimizely Experimentation is on a visitor's ad-block block list, no experiments run. Optimizely Experimentation does not even load on the page.
  • There is no way to know if a visitor is using an ad-block service from Optimizely Experimentation, because the ad-block service would block all Optimizely Experimentation functionality.
  • It is the user's choice to block ads, and it is handled on the client side. Ad-block users are typically a small percentage of the overall web-browsing population.
  • Testing with messaging that encourages visitors to disable ad-block services on their pages may find success.