Ad tag
A piece of HTML or JavaScript code added to the source code of a publisher’s website or app, ad tags trigger an ad request and help deliver relevant ads to the right audience at the right time. They are also known as creative tags or placement tags.
What is an ad tag?
An ad tag is a snippet of code inserted into a website’s or app’s source code that serves as a placeholder for actual ads. Ad tags are the driving force behind the ad tech ecosystem, and they facilitate seamless communication among publishers, advertisers, ad servers, and other platforms.
Ad tags help load, display, and track ads on the publisher’s app. When a user visits the app, the ad tag initiates an ad request, telling the publisher’s ad server that a user has loaded the app page associated with the ad, indicating it’s time to serve a relevant ad to the user.
An ad tag includes various components that specify how, where, and what kind of ads will be displayed on the app. It also defines the optimal dimensions of the ad creative. Typically, ad tags contain HTML or JavaScript code, and publishers can use platforms like Google Ad Manager to generate tags for their ad inventory.
Besides the source code, ad tags can also be added to a website’s header or iFrame wrapper.
Types of ad tags
The ad tech ecosystem uses various ad tags to make digital advertising a reality. The most commonly used ad tag types include:
- Synchronous ad tags
- Asynchronous ad tags
- Third-party ad tags
1 – Synchronous ad tags
This type of ad tag simultaneously loads with all the other content of the app, meaning the ad request must be triggered, and the ad must be served before the app can load. If an error occurs in the process, it could slow down the app’s loading speed or prevent it from loading altogether.
2 – Asynchronous ad tags
As the name suggests, these ad tags load independent of the remaining content of an app, meaning the ad serving process doesn’t interfere with page speed or user experience. If the ad request fails or an error occurs, the app’s page will still load, but the ad won’t.
3 – Third-party ad tags
These ad tags are generated by demand-side platforms (DSPs) or an advertiser’s ad server, and refer to HTML code snippets that help track ad impressions and engagement.
Ad exchanges can also generate third-party ad tags to help publishers allow multiple advertisers to display ads on their apps.
Other ad tags include VAST ad tags (for video ads), iFrame/JavaScript tags, and universal JavaScript tags.
Ad tag example
Here is an example of what a sample ad tag looks like:
http://ad.server.com/ADJ/publisher/zone;topic=abcd;sbtpc=hijk;kw=wxyz;tile=1;slot=728×90.1;sz=728×90;ord=12345679012346?
And now, let’s take a closer look at what the individual components denote:
1. URL
The “http://ad.server.com/” part of the sample ad tag is a URL that stands for the publisher’s ad server. In some cases, it could also include the host used to generate the tag.
2. Ad type
The “ADJ/” part of the sample ad tag specifies the requested ad type. In the example above, it denotes a JavaScript tag used to serve image-based ads.
3. Publisher details
The “publisher/” section contains vital details about the publisher, and helps ad networks and DSPs validate a publisher’s identity.
4. Zone
Describes the part of a web page or app page where the ad will be displayed. It’s used to specify whether the ad will be placed in the header, sidebar, footer, or other section of an app page.
5. Topic
This specifies the content available on the publisher’s website or app, and helps DSPs and advertisers serve relevant ads for a given ad slot.
6. Subtopic
Is denoted by “sbtpc” and includes more information about an app page’s content.
7. Keyword
The “kw=wxyz” segment of the ad tag includes keywords that further describe what the app page is about. Publishers can include multiple keywords in this section.
8. Tile
A unique value is assigned to each ad call on the app page, and a tile helps prevent the same ad from appearing in different zones on the app page.
9. Slot
This section distinguishes ad tags when different ad zones have the same dimensions. In this case, “slot=728×90.1” indicates the first leaderboard ad slot that’ll appear on the app page.
10. Size
Specifies the optimal dimensions for the given ad zone, denoted by “sz=728×90” in the example above.
11. Cache-buster
The “ord=1234567901234678?” part of the ad tag works as a cache-buster. It’s a randomly generated number used to distinguish individual ad calls from the same user, helping serve a variety of ads as users browse back and forth between different app pages.
How do ad tags work?
What are the steps involved in raising an ad request and serving a relevant ad? Here’s how it goes:
- When a user loads an app page, the app calls the corresponding ad tag.
- The ad tag sends an ad request to the publisher’s ad server, indicating that a user is about to browse the app page.
- The publisher’s ad server forwards the ad request to a data management platform (DMP), which collects consenting visitor information, including age, gender, location, etc. for the purpose of improving user segmentation and ad experience.
- The publisher’s ad server forwards the ad tag and its data to the advertiser’s ad server (in case of a direct deal) or a DSP (in case of real-time bidding). For real-time bidding, the ad inventory is auctioned among different advertisers, and a winner is selected.
- The advertiser’s ad server or DSP adds a URL to the ad tag, which specifies the location of the ad creative.
- The publisher’s ad server loads the ad from the URL (in the ad tag) and serves the ad on the app page.
While the ad serving process involves multiple steps, it takes less than a second to complete.
Who uses ad tags and why
Publishers
Publishers can use ad tags to optimize the process of selling ad slots, offering their inventory to multiple advertisers. Ad tags also help them serve relevant ads to their audience and maximize revenue.
Advertisers
Advertisers can use ad tags to select ad slots to help them reach their target audience. Moreover, they can match ad creatives to a publisher’s requirements, ensuring fail-proof ad delivery, and also help advertisers monitor the performance of their ad campaigns.
Ad servers
Ad servers use a publisher’s ad tags to forward ad requests in the ad tech ecosystem. Whether implementing direct or using programmatic deals, ad tags simplify the process of selling/auctioning inventory and delivering ads.
Key takeaways
- Ad tags are blocks of HTML or JavaScript code that facilitate the buying, selling, and auctioning of ad inventory. They help drive the ad tech ecosystem by moving ad calls from a publisher’s app to an advertiser’s ad server or DSP.
- They include a wide array of information about the publisher’s requirements, including ad dimensions and format, and contain identifiers to differentiate multiple ad calls from the same user.
- Ad tags help publishers optimize the process of selling ad inventory to multiple advertisers and earn more revenue, while enabling advertisers to monitor ad performance and improve their return on ad spend (RoAS).