Ad Blocker Best Practices
Follow these best practices to avoid issues caused due to overzealous ad blockers
Ensure content doesn't look like an ad
- Blocked content can be detected the same way as any other network/loading failure. Add error handlers to your code that deal with uncertain loading conditions.
- Some publishers are choosing to fight ad-blocking through the use of anti-ad-blocking tools/services like PageFair.
If you're depending on an external script, have an error callback. Avoid using callbacks from analytics calls, etc. to run critical code.
// If the analytics script that fires analyticsCall is blocked, cartNextStep will never run! window.analyticsCall("myCoolAnalyticsEvent", cartNextStep);
Review the site with common ad-blockers installed to see what content is being blocked on a regular basis. Unfortunately, the blacklist/algorithms of ad blockers are changing everyday, so there's no way to ensure that content that is displayed one day isn't blocked the next. Also use tools like Ghostery to audit a site to find out what external scripts end up on the page.
If content is incorrectly flagged as an ad by an ad blocker, reach out to the developer to ensure that it is whitelisted! Here is the whitelist application request page for a coalition of ad-blockers including AdBlock Plus, Crystal App, etc.