18.12 Web Advertising Fundamentals

Often the issue of advertisements is ignored and even prohibited in academic settings due to the complications of third-party ads on university-owned servers and the like. If the social media section has taught us anything, it’s that a website can become worth millions of dollars, and many of those millions of valuation are derived from projected advertising revenues.

18.12.1 Web Advertising 101

Relative to the 17 chapters that preceded this, advertising is not an especially challenging technical topic. It does, however, require some insight into business metrics and some technical integration with your existing web applications.

If your site ever gets big enough, or is sufficiently local, you can create and manage your own client accounts through your own home brew–advertising network. You will have to sign up clients and cold-call local companies. Tracking impressions, delivering ads, and reporting results will all be done in-house. However, for the vast majority of the world, do-it-yourself means no customers and no ad revenue.

Ad Networks

The vast majority of advertising is done through advertising networks. These networks can manage thousands of customers, all wanting to pay for ads to run on many sites. These companies profit by charging the customers more than they pay site owners to run the ads. They normally offer site owners free registration, and only pay out once a predefined threshold has been reached.

In web advertising, there are three classes of party involved: the ad network, the advertisers, and the website owners as illustrated in Figure 18.39.

Figure 18.39 Relationship between the parties in web advertising
The figure illustrates the relationship between the parties in web advertising.

The first step in serving ads is therefore to sign up as a website owner. (You can sign up later as an advertiser as well if you want to.) You will need to confirm your identity with a bank account and documentation for most top-tier ad networks. After being confirmed, you will have to learn to navigate the company’s web portal.

Ad Types

There are many types of web advertisement that go beyond the basics such as the dreaded pop-up and the popular interstitial ad (where you must see the ad before proceeding to content). This section focuses on the three most common types of advertisement served by major ad networks, namely graphic, text, and dynamic.

Graphic ads are the ones that serve a static image to the web browser. The image might contain text and graphics, enticing the user to click the ad, which will direct them to a URL.

Text ads are low bandwidth, since they are entirely text-based. Like graphic ads, they too encourage the user to click and be directed to a destination URL. They are popular due to their low bandwidth and low profile, which do not take user attention away from the main content.

Note

More clicks result in more revenue for your site. You might consider going all over town to surf to your website and click on all the ads to generate a few dollars (never mind the money you spent on gas to drive around town). Alternatively, you might mail all your users, pleading to click the ads to keep the site afloat. Don’t. It’s called click fraud, and it costs millions of dollars each year to advertisers. (You can ask them to turn off ad block plugins).

Although advertising networks detect and deter fraudsters, click fraud remains a real threat to legitimate websites.

Dynamic ads are graphic ads with additional moving parts. This can range from a simple animated GIF graphic ad all the way up to complex Flash widgets or JavaScript, which allow interaction with the user right on your page. These advertisements tend to have higher bandwidth and computation needs and can be possible vectors for attack (XSS) if advertisers can upload malicious code, as has happened to Facebook in 2011.17

Creating Ads

The actual advertisements are normally a little piece of JavaScript to embed on your page. Getting your own particular code with your credentials and selections is normally done through the web portal that controls your account. While each particular advertising network is different, they usually have similar code snippets. For example, the Google AdSense network generates the snippet in Listing 18.18; you can clearly see some identifiers are required to link the ad with your account.

Listing 18.18 Google AdSense advertising JavaScript
<script async
src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js">
   </script>
<!-- Ad -->
<ins class="adsbygoogle"
     style="display:inline-block;width:728px;height:90px"
     data-ad-client="YOUR_ID_HERE"
     data-ad-slot="3393285358"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

Although you might think you can tinker with the width and height, you should not manipulate the ads directly, since they might be warped and not look quite right. There are predefined sizes of ad, color schemes, and the like, and you should browse your network’s options to choose the one right for your page.

18.12.2 Web Advertising Economy

In the world of web advertisements, there are a few long-standing ideas that exist across all click-based advertising networks.

Web Advertising Commodities

The website owner can display ads in exchange for money. The website owner has three commodities at his or her disposal: Ad Views, Ad Clicks, and Ad Actions.

An Ad View (or impression) is a single viewing of an advertisement by a surfer. It is based on one loading of the page and although there may be multiple ads in the page, an impression is counted for each one.

An Ad Click is an actual action by a surfer to go and check out the URL associated with an ad.

An Ad Action is when the click on the ad results in a desired action on the advertiser’s page. Advertisers may pay out, based on a successful account registration, survey completion, or product purchase, to name but a few.

Web Commodity Markets

With these commodities in mind, advertisers can pay for their ads using a combination of Cost per Click, Cost per Mille, and Cost per Action settings. The determination of where the ad appears depends on the popularity of the term, and the cost other advertisers are willing to pay to show up for that term. Auctions match up buyers and sellers as illustrated in Figure 18.40. In reality the auctions are automated, with the advertisers agreeing to maximum and target values for CPC and CPM values for their campaigns ahead of time. These values are coupled with daily budgets and actual traffic to ensure advertisers can manage their spending while simultaneously ensuring website owners (and the network) get as much as possible from the advertisers.

Figure 18.40 Real-time auctions and ad placements in an advertising network
The figure illustrates the Real-time auctions and ad placements in an advertising network.

As a publisher of ads on your site, you have almost no control over what ads appear (you can blacklist domains, like your competitors, but that’s about it). You cannot simply demand 100 dollars per click on your website about hamsters, because no one would be willing to pay. Conversely an advertiser should not be able to get one-penny ads on your successful site, if the demand from better advertisers willing to pay more is high.

The Cost per Click (CPC) strategy is to decide how much money a click is worth, regardless of how many times it must be displayed.

Cost per Mille (CPM) means cost per thousand impressions/views of the ad. Obviously this rate is lower than a CPC rate, since not every impression results in a click. In modern ad networks, the relationship between the CPM and the CPC is calculated as the click-through rate (CTR).

The Click-through Rate (CTR) is the percentage of views that translate into clicks. A click-through rate of 1 in 1000 (0.1) is fairly normal in search engine networks (social network ads tend to have much lower click-through rates, like 0.05). The higher the click-through rate, the more effective the ad. Low click-through rates may signify bad ads, or more likely, poor placement on sites that do not relate to the content of the ad.

Cost per Action (CPA) relates the cost of advertisement to some in-house action like buying a product, or filling out a registration form. By dividing the number of actions by the total budget, you get the Cost per Action (sometimes termed Cost per Acquisition).

In some advertising networks, you can sign up for CPA payment where you are only paid when an ad results in a transaction. Needless to say this cost is normally the highest, since a purchase of a car might well be worth thousands of dollars to the company, as an extreme example. A more common example is an iPhone app paying per install (acquisition of client). While certainly not worth thousands of dollars, it might be worth a couple of quarters or more, depending on the cost of the app.