What is an ad tag? The role of ad tags in serving ads

Read time: 10 minutes

Web pages are made up of hundreds of lines of code.

Often present amongst these lines are code snippets referred to as “ad tags” which play a major role in coordinating the ad serving process.

If ad servers, SSPs, DSPs, and DMPs are the highways of ad tech, ad tags are the cars driving along them – delivering information to where it needs to go throughout the process.

By the end of this guide, you’ll know how ad tags work, their role in ad tech, and how to identify the different components that allow them to function.

Table of Contents

What is an ad tag?

An ad tag (also referred to as a “creative tag” or a “placement tag”) is either an HTML or javascript code snippet present within the header or body section of a publisher’s website.

Ad tags are responsible for sending ad requests to a publisher’s ad server.

Ad requests are a signal to the publisher’s ad server that a user has loaded the webpage that the ad tag is present on, and that an ad should be served to the visiting user.

Ad tags also contain details about the format requirements for ads being served, such as dimension, format, and category, as well as other data used during the ad serving process.

How do ad tags work?

Ad tags are the “starting gun” that sets the entire ad tech ecosystem into motion.

Here’s a step-by-step breakdown of how an ad tag initiates the ad serving process:

  1. A user opens a publisher’s web page – which includes the ad tag in the page’s code.
  2. The ad tag is called by the web page as it loads.
  3. The ad tag sends a signal to the publisher’s ad server, indicating that a user has visited the web page.
    • (Optional) In some configurations, the publisher’s ad server forwards the signal to a data provider, such as a DMP (data management platform), to gather additional information about the visiting user (such as age, gender, location, etc.). The publisher’s ad server continues the process of forwarding the ad tag once this information is added to the tag.
  4. The publisher’s ad server forwards the ad tag with all of its data to an advertising “demand source” (a term used to describe platforms which allow advertisers, the “demand generators” of digital advertising, to buy ad inventory) based on how the publisher’s ad serving priority is configured.
    • This may mean that the ad tag (and the available ad impression or “ad inventory” associated with it) is passed to an advertiser’s ad server (also referred to as a “third-party” ad server) directly in the case of a direct deal, or it may alternatively first be passed through one or more DSPs (demand-side platforms) to be auctioned via an RTB (real-time bidding) process – again, based on how the publisher has chosen to configure their ad serving priority.
  5. The advertiser’s ad server forwards the ad creative (the media elements that comprise the advertisement to be displayed) to the publisher’s ad server by including an added reference URL within the ad tag which points to the ad creative.
  6. The publisher’s ad server finally serves the ad creative to the user visiting the web page by loading the finalized ad tag on the web page.

Despite appearing to be a complicated sequence of data transfers involving many steps, the entire process of serving an ad takes place in just milliseconds, typically concluding before the web page is done loading.

How do different parties in ad tech interact with ad tags?

Publishers

Publishers are the website owners who install ad tags into their webpages.

By using ad tags, publishers are able to signal the availability and details of their ad impressions to multiple advertising demand sources, simplifying the process of selling ads.

Ad tags allow publishers to facilitate a smooth ad serving process to their website by indicating the specifications required of the ad creatives they receive from advertisers.

Advertisers

Advertisers generate the demand for digital ad space by purchasing it online.

When receiving ad tags from publishers, an advertiser’s ad server is able to match appropriate ad creatives with the specifications and data outlined in the received ad tag.

Ad Networks

Ad networks are businesses that act as intermediaries between publishers and advertisers.

As managers of the ad serving process, ad networks sometimes implement ad tags on behalf of publishers, and manage ad creatives of advertisers (depending on the service).

Because ad networks often have their own ad tech ecosystems for managing their clients’ ad buying and selling needs, this means that ad tags being used within an ad network sometimes take on the role of conducting both publisher and advertiser functionalities.

Data Management Platforms (DMPs)

Data management platforms are services that store information about online user audiences.

When an ad tag is passed to a DMP prior to being forwarded to an advertiser’s ad server, the ad tag is enriched with additional known data about the user.

This process was traditionally managed by a popular technique called “cookie matching”.

However, new techniques are being developed to prepare for the end of third-party cookies, with many DMP platforms rebranding/repositioning as customer data platforms (CDPs).

What are the different types of ad tags?

There are several terms that appear frequently when discussing ad tags.

Synchronous Ad Tags

The term “synchronous ad tag” refers to an ad tag which loads at the same time as the rest of a web page’s content.

When using synchronous ad tags, the ad serving process must be completed in order for the web page to load properly.

If an error occurs, or the ad serving process experiences a delay when communicating the ad tag between different ad tech platforms, the page may load slowly or fail to load entirely.

Because of these risks and potential performance issues, other methods of deploying ad tags are typically a more popular option for most publishers.

Asynchronous Ad Tags

The term “asynchronous ad tag” refers to an ad tag which loads separately from the rest of a web page’s content.

When using asynchronous tags, a web page is able to load independently of the ad creative being served by the ad tag.

If the ad serving process encounters an error, the web page will still load normally, but the ad that was supposed to be served won’t be displayed on the page.

Third-Party Ad Tags

The term “third-party” in digital advertising refers to the “demand” or advertiser side of the ad serving process – a naming convention which has stuck since the early days of ad serving.

In the context of ad tags, a “third-party ad tag” refers to an ad tag which is generated by a third-party (again, meaning a “demand source” like an advertiser or an ad exchange).

Third-party ad tags are typically HTML based, and include tools like IMG tracking pixels (for tracking user interactions with ads) and Javascript tags (typically used for serving ads).

Third-party ad tags generated by third-party ad servers are placed by publishers onto their web pages, allowing advertisers to measure campaign performance and to serve their ads.

In cases where third-party ad tags are generated by ad exchanges, publishers will place these tags on their web pages to allow a variety of advertisers to serve ads to their website.

VAST Ad Tags

“VAST” stands for “video ad serving template” – a set of specifications developed by the IAB (Interactive Advertising Bureau) for standardizing the way video ads are tracked and served.

The VAST protocol allows video players to synchronize with ad servers, enabling video ads to be served within video content on a web page.

Ad serving tools like AdButler can help to simplify the process of deploying VAST ad items to a web page.

Other Types of Ad Tags

Many other types of ad tag formats exist.

Some of the most popular ad tag formats include iFrame/JavaScript tags, JavaScript tags (without the use of an iFrame), and universal JavaScript tags, also referred to as tags.

Google has a full list of these ad tag types and how they work available in this overview.

What does an example ad tag look like?

All of the data included in an ad tag can be broken down into segments and understood through human interpretation if you know what each piece of the tag is referring to.

Here’s an example of a first-party ad tag generated by a publisher using DoubleClick:

http://ad.doubleclick.net/ADJ/publisher/zone;topic=abc;sbtpc=def;kw=xyz;tile=1;slot=728×90.1;sz=728×90;ord=7268140825331981?

  1. http://ad.doubleclick.net/

This part of the tag should look familiar. It’s a standard URL address. In this case, the host that generated the ad tag for the publisher is DoubleClick.

  1. ADJ/

This part of the tag is a parameter that tells the ad server what type of ad is being requested. In this example, the “adj” parameter indicates that the URL is part of a JavaScript tag used to serve image files.

  1. publisher/

This section indicates properties related to the publisher using the ad tag. Details that are included in this section of the tag allow a network to verify a publisher’s identity, which validates their participation on the network.

  1. zone;

This part of the ad tag indicates which “zone” or “section” of a web page an ad will be displayed in. In essence, this section specifies whether an ad will appear in a web page’s header, in a side banner, or any other ad zone which may be present on the page.

  1. topic=abc;

This piece of the ad tag’s code refers to the topic that a web page focuses on. Of course, in this example, “abc” is a topic placeholder, which could easily be substituted for something like “sports”, “finance”, or “technology”.

In the context of an ad exchange, this information helps platforms like DSPs (demand-side platforms) to make decisions about the relevancy of the available ad slot when placing a bid.

  1. sbtpc=def;

Similar to the previous section of code, “sbtpc=def” stands for “subtopic”, while “def” is another series of placeholder letters.

A subtopic can help to further define what a particular webpage is about, further increasing the desirability of the ad slot to certain advertisers and their bidding platforms.

  1. kw=xyz;

In this instance, “kw” stands for “keyword”, while “xyz is a set of placeholder letters.

Keywords offer an extra layer of granular-level identification for ad slots.

Additionally, multiple keywords may be included in the section of the ad tag.

For example, the keyword “Stock” could be included, or additional keywords such as “Stock Market Mining” could also be included.

  1. tile=1;

In an ad tag, “tile” is a value that’s assigned to each ad call on a given page. In other words, each ad tag is assigned a tile value.

If every tile value on a page is unique, it prevents the same ad from appearing in multiple ad zones.

In contrast, if the tile value is the same for multiple ad tags on a page, it’s possible for the same ad to be displayed in multiple ad zones at once.

  1. slot=728×90.1;

The “slot” section of the code helps to distinguish ad tags apart from one another when multiple ad zones have the same dimensions on a page.

For instance a “leaderboard” ad is 728×90.

If two leaderboard ads exist on the same page, “728×90.1” indicates the leaderboard slot that appears first on the page, while “728×90.2” indicates the location of the second leaderboard slot.

  1. sz=728×90;

This piece of code within the ad tag simply indicates the size of the ad zone.

  1. ord=7268140825331981?

The final component of an ad tag is this randomly generated number section – referred to as a “cache-buster”.

As users click through a website, navigating back and forth between pages, data is stored or “cached” in their browser.

If the ad tag was completely static (unchanging) each time a visitor viewed the web page, the same ad creative would be shown to them over and over again.

The purpose of the “cache buster” is to generate an entirely unique number that provides the opportunity for each ad call to serve a different ad creative to the ad zone each time the page is loaded, even if the same user revisits the same page multiple times.

Getting ad tags to work for your business

Ad tags are a fundamental component of ad serving.

As concise but powerful code snippets, ad tags provide an effective way for publishers to optimize their ad space, while providing advertisers with a solution for maximizing their campaign performance and ad tracking capabilities.

With many different options available for deploying ad tags, it can sometimes be difficult to ensure that your ad tags are an optimized component of your ad tech stack.

The AdButler team has over two decades of experience in simplifying the ad serving process for publishers and advertisers.

We’d love to share a conversation with you. Ask us a question today!


Can't find what you're looking for?

Send us an email

hello@adbutler.com