34,333
edits
Changes
no edit summary
The use of ad blocking has increased over the last few years because many people are tired of visiting websites that are overloaded with intrusive ads. Surveys suggest, however, that many people using ad blockers do not object to advertising appearing on websites as long as those ads do not adversely affect the web browsing experience. The problem for web publishers is that ad blocking technology does not distinguish between websites that use advertising responsibly and those that do not.
In the chapter entitled [http://www.ebookfrenzy.com/AdBlocking/index.html Denying Website Access to Ad Blocking Visitors], we will look at ways to prevent visitors to your site accessing page content until ad blocking is turned off. A more subtle, and often overlooked strategy for dealing with ad blocking, however, is simply to appeal to the better nature of your website visitors by politely asking them to disable ad blocking. In this chapter we will explore some of the ways to go about implementing such a strategy.
== Asking Politely ==
When making such a request it is important to achieve the right balance. The idea is not to antagonize visitors to your site, but rather to remind them how much they value your content. If a dialog is used to make the request, visitors should be able to dismiss the dialog and continue accessing the site content (denying access to visitors until ad blocking is disabled is covered in a later chapter). It will also be important to decide whether you want the visitor to see the request on every page visited, or only on the initial landing page.
If your site content targets less technically skilled visitors it may make sense to include a link to a page where steps are provided for whitelisting your website.
Though a variety of techniques are available for displaying a notification bar within a web page, this chapter will make use of the NavBar component from the Bootstrap JavaScript framework. This component provides a range of configuration options including positioning the bar at the top or bottom of the page, and the ability to fix the bar so that it remains visible during page scrolling.
This chapter assumes the implementation of some form of ad blocker detection such as those outlined in the chapter entitled Basic [http://www.ebookfrenzy.com/AdBlocking/index.html Ad Blocker DetectionTechniques]. The use of the Bootstrap framework requires that some items be imported into the web pages on which the notification is to appear, for example:
<pre>
== Adding Tracking Code ==
Data about the number of visitors who opt to disable ad blocking in response to the request can be tracked using the techniques outlined in the chapter entitled Assessing the Damage[http://www.ebookfrenzy.com/AdBlocking/index.html Measuring Revenue Lost to Ad Blocking]. Assuming that you have a Google Analytics account and the tracking code embedded in your web pages, tracking can be implemented by sending different events depending on the dialog button selection made by the visitor:
<pre>