Ad filtering: the ins and outs of how it works

Close up of white king taking down black king. Hand and fingers and chess board with vintage look

Ad filtering: the ins and outs of how it works

Browsers, Ad-filtering SDKs, Ad filtering, Shwetank Dixit, 29. June 2021

In this article, we explain some of the finer points of ad filtering and its complexities, including how it gets around ad-filtering circumvention techniques

In a recent blog post, we talked about ad filtering as a general concept, and how it’s essential in helping build a balanced, sustainable internet. This time around, we’re going to examine the nuts and bolts of ad filtering, including the underlying technology that helps ensure advertising is done in a responsible and nonintrusive manner.

In particular, it’s important to look at the practice of ad-filtering circumvention, where some websites use certain techniques to bypass ad-filtering software. The methods used are highly complex, requiring a considerable level of expertise to beat them. We take these steps because circumvention is detrimental to the building of a sustainable online ecosystem, as it means any rules around responsible advertising and allowlisting can be ignored. Being able to monetize content through advertising is crucial, but the user experience also has to be protected. This is how ad filtering helps meet the needs of all parties.

How ad filtering works

Ad filtering is applied either through browser software (such as Adblock Plus), a VPN, or comes as a default feature in some browsers (such as MS Edge, Firefox, or Opera) and works as part of the online experience ‘out of the box’. When a user requests access to a website, the technology applies business logic to identify, filter and hide invasive and annoying elements of ads, leading to an improved content experience for users.

Though, as we’ve pointed out, It’s not about blocking every ad. Filter lists are incorporated into the software, which provide a set of rules that ads have to abide by in order to appear on a web page. For our own ad-filtering software at eyeo, this means conforming to the Acceptable Ads Standard, which rules out the most intrusive ads, such as autoplay sound/video ads, ads that interrupt in the middle of a video, banner ads, interstitial ads (full-screen ads that cover the interface of their host app or site), large expanding ads, and that’s just to name some of the more common and prominent. These filter lists are constantly updated, helping maintain the all-important balance on the internet.

The ad-filtering process itself is highly complex, requiring a considerable level of technical expertise and dedicated engineering resources to make it work. Increasing this complexity further is the presence of ad-filtering circumvention techniques.

The problem of ad circumvention

Research from 2016 revealed that at least 6.7% of Alexa Top-5K websites engaged in some form of ad circumvention, so it’s not an uncommon practice. The methods employed are numerous, but below are just a few examples we’ve seen:

  • Developer tool detection: one circumvention provider wrote a script that detected when someone (such as an eyeo employee) visited a website and opened the developer tools to check the page’s coding and whether circumvention techniques were being used. On detecting a visitor, the script automatically removed all the code and information relating to ads from the page, making it much more difficult to understand their circumvention techniques or debug the code.
  • Superfluous element stuffing: this involves breaking down mentions of sponsored content in source code and separating it out, making it harder to detect and easier to bypass ad filters. This method can be defeated with a meticulous approach to ad filtering and a comprehensive understanding of code, but it takes time and effort.
  • PNG ad labels: circumvention providers display adverts by placing an image containing text on the page, rather than putting this text into the source code. As above, tackling this involves identifying patterns in complex lines of code and then taking action to block these elements.

As you can see, there are a lot of smart people with a huge depth of technical know-how working in ad circumvention. In recent years, the tussle between ad-circumvention providers and ad-filtering experts has evolved from a frantic cat-and-mouse game into a much more strategic, chess-like battle. With this in mind, it’s important that browsers don’t try to fight this fight alone.

Enter anti-circumvention

Fortunately, there’s plenty of expertise on the anti-circumvention side too. At eyeo, we have an anti-circumvention filter list that operates independently from our other filter lists. It was designed to enable fast action against circumvention techniques, and is frequently updated to take into account the constantly evolving methods of circumvention providers.

Core to our anti-circumvention list are small JavaScript functions called Snippets. These are pieces of code designed to get around a particular circumvention technique. For example, for the developer tool detection method mentioned above, we produced a Snippet that tricked the circumvention provider into thinking that the developer tools were always open, meaning that the adverts were removed from the page indefinitely. They realized what was happening and stopped the approach. This is an example of a cunning, effective way of beating a circumvention technique, and protecting the user experience in the process.

A case in point: YouTube

To illustrate our anti-circumvention efforts a little more, we’ve recently talked about the experience we had with intrusive ads getting past our ad filters on YouTube.

While we didn’t work out the exact methods that YouTube was using, we eventually produced a seemingly simple blocking filter that seems to have remedied the issue and to have stopped the ads from circumventing our filters.

Overall, the situation is a prime example of the need for rapid, decisive action and a meticulous approach when it comes to anti-circumvention.

The battle for a better internet

Ultimately, anti-circumvention is about standing up for users, and for us, also ensuring that publishers and advertisers are able to sustain themselves through a responsible approach to ads. The only way to build a better internet in the long term is to recognize this need for balance, and for all stakeholders to work together to achieve it. We welcome collaboration with anyone who shares this vision, and are ready and willing to assist any browser, advertiser, publisher or organization on their ad-filtering journey.

Photo by GR Stocks on Unsplash