• Other Thoughts >

    May 28, 2022

    Intro To Online Advertising: How Ads Are Served

    Let's start with the simplest ad serving scenario: when the owner of the website - aka the publisher - sells their ad space to an advertiser. This is called a direct buy, since the advertiser has bought the ad space directly from the publisher. It's not a very common scenario because it takes effort from both the publisher and the advertiser. The publisher has to employ people to handle selling and serving the ads, and the advertiser, or more likely the advertiser's ad agency, has to make individual deals with every site they want their ads displayed on. Still, it is the most straight forward from an ad serving point-of-view.

    When the publisher sold the ad space
    Ad serving when the publisher sold the ad

    Here's how it works:

    • 1. When a user visit's the publisher's website, the publisher's web server returns the HTML for the page the user is interested in.
    • 2. The HTML includes a "tag" for the publisher's ad server. This is typically a snippet of JavaScript that builds a URL for the ad server. The user's browser then requests the URL from the publisher's ad server. When it gets the request, the publisher's ad server figures out which is the best ad to serve, and returns the code for the ad to the browser.
    • 3. The code returned from the ad server generally isn't the code for the ad itself. It's usually a tag for the ad in the advertiser's ad server, because this allows the advertiser to manage their own ad campaign if needed. So when the browser recieves the ad code from the publisher's ad server, it turns around and then makes a request for the ad from the advertiser's ad server, which returns the actual ad code. The browser then displays the ad in the page.

    There can be more servers involved in this scenario. For instance, the creative assets for the ad might be hosted on a Content Delivery Network (CDN). The ad code might also include tags for other advertising rellated platforms, for things like viewability or ad fraud. The publisher's web server, and the ad servers for the publisher and the advertiser are the main players, though.

    About Programmatic Advertising

    As I mentioned before, direct buys aren't that common these days. Programmatic advertising is much more common, which is when software is used to manage the selling and buying of ad space on a publisher's web site. There are four main types of programmatic advertising: open auctions, private marketplaces or auctions (where advertisers need an invitation to participate), preferred deals (where there isn't an auction, but the publisher doesn't reserve inventory for the advertiser, and the advertiser simply has the option to buy it), and programmatic direct (where there also isn't an auction, but the publisher does reserve the inventory for the advertiser, who has agreed to buy it).

    The different types of ad buys
    The different types of ad buys

    I'm not going to outline how each of these types of programmatic deals are served, since I'd likely bore you to tears. However, I will go over the most common scenario in the next section, open auctions. It's what people most often mean when they talk about programmatic advertising.

    Open Auctions

    This involves an auction being run for the ad space with the advertiser's software making bids to buy the ad space. One of the terms you'll frequently see used interchangeably with open auctions is Real-time Bidding or RTB. In this scenario, the advertiser is using a software platform to bid on the ad inventory, and that platform is called a Demand-Side Platform or DSP. The publisher is using their own software platform to sell the ad inventory, tnat their platform is called a Sell-Side Platform or SSP.

    When real-time bidding is used to fill the ad space
    Ad serving with real-time bidding

    So here's how this scenario works:

    • 1. Just like before, a user visit's the publisher's website, the publisher's web server returns the HTML for the page the user is interested in.
    • 2. The HTML includes the "tag" for the publisher's ad server. The user's browser makes the request to the publisher's ad server. When it gets the request, the publisher's ad server figures out what to server, and this time it decides the best option is to auction the inventory. So it returns the code for the publisher's SSP.
    • 3. and 4. The SSP gets the request, and starts running an auction for the ad space. It does so by contacting the various DSPs it works with directly, and asks what the DSP would bid for this particular ad impression. The information the SSP sends to the DSP often contains information about the user too, since that can change what advertisers will bid. The DSPs all return their bids to the SSP along-side the code for the SSP to return if that DSP wins the auction. The SSP selects the winning bid, and returns the winning DSPs code to the user's browser.
    • 5. The browser uses the code the SSP returned to it to send the request for the winning ad to the associated DSP. That DSP then typically returns another snippet of code for the ad in the advertiser's ad server.
    • 6. The user's browser makes the request for the ad from the advertiser's ad server, which returns the actual ad code and the ad is finally displayed in the page.

    Just like before, there can be other systems involved in this scenario, such as ad exchanges, CDNs, Customer Data Platforms (CDP), and so on and so on. If you'd like to see all of the various platforms that can be involved in online advertising, LUMA partners publishes a series of charts called Lumascapes that try to organize the madness. Fair warning, you might end up with a headache squinting at all of the little entries on these charts, though.

    Ad Tags

    Finally, if you're curious about what an ad tag looks like, here are two examples. The first is an example of one of the most common Publisher Ad Tags, the Google Publisher Tag (GPT):

    <script async src="https://securepubads.g.doubleclick.net/tag/js/gpt.js">/<script>
    <script>
      window.googletag = window.googletag || {cmd: []};
      googletag.cmd.push(function() {
        googletag
          .defineSlot(
            '/1234/Movies/Fantasy/5stars', [300, 250], 'banner-ad')
          .addService(googletag.pubads());
        googletag.enableServices();
        });
    </script>

    If you'd like to learn more about the GPT, the Google Ad Manager Help Center has a helpful "Overview of Google Publisher Tag" article.

    The code for an advertiser's tag can come in a variety of formats. Among others, it could be the HTML code for an iframe or JavaScript code for the advertiser's ad server. When it's JavaScript for a simple image ad, it tends to follow a format like the following:

    <script src="https://[AD_SERVER_DOMAIN]/[SERVING_PATH]?[VARIOUS_URL_PARAMETERS]"></script>
    <noscript>
      <a href="[CLICK_TRACKING_LINK][LANDING_PAGE_URL]" target="_blank">
         <img src="[URL_FOR_AD_IMAGE]" border="0" width="300" height="250">
      </a>
    </noscript>

    If you made it through all of this, I'm impressed! How ads are served isn't exactly the most thrilling of topics. There is a lot going on behind the scenes, though, which I think does make it interesting. I hope this was useful as an introduction to that world.

    Thanks for reading! Kris

© 2009-. Kristen Chapman. All Rights Reserved.