- Optimizely Web Experimentation
- Optimizely Web Personalization
- Optimizely Web Recommendations
- Optimizely Full Stack
This topic describes how to:
- Understand the impact ad-blockers can have on Optimizely Experimentation.
- Develop a testing idea that may help mitigate the impact of ad-block services.
If a visitor to your site has an ad blocking service or browser extension enabled, it is possible that Optimizely Experimentation is listed under the block list for this ad blocker. Extensions like AdBlock and Ghostery have been known to block Optimizely Experimentation assets, which then prevents Optimizely Experimentation from executing on the page.
Some ad-blockers have cdn.optimizely.com on their blacklists, which will prevent 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 has been blocked by an ad-blocker or other service. In the Google Chrome browser, the console will show 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, at the moment there isn't a way around this: if your visitors have ad-blocking services enabled, they would have to manually remove Optimizely Experimentation from the blacklist in their ad-blocking extensions or disable the ad-block service in their browser.
With that said, we have found that testing messaging to request users to disable ad-block may be an alternate solution. Perhaps one suggestion would be to test a modal or message banner that encourages visitors to disable ad-block services in order 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.
We recommend against relying on the datafile response to to use your web app. You can 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. Once you've initialized the Optimizely Feature Experimentation client, you should be able to tell if it's a valid instance or not by 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.
- If Optimizely Experimentation is on a visitor's ad-block blacklist, 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's end, because the ad-block service would block all Optimizely Experimentation functionality.
- It is the user's choice to block ads, and it's all handled on the client side. Right now, ad-block users are a pretty small percentage of the overall web-browsing population.
- Last but not least, we have heard that users are successful at testing with messaging that encourages visitors to disable ad-block services on their pages.