What is an ad tag?

What is an ad tag?

What is an ad tag?

An ad tag is a piece of code that tells an ad server which advertisement to display in a digital placement. It also shares information that allows advertisers and publishers to understand whether an ad was served correctly and how it performed. It enables tracking, measurement, and reporting by passing information between publishers, advertisers, demand-side platforms (DSPs), supply-side platforms (SSPs), mediation platforms, and other ad tech systems.

ad tag

How do ad tags work?

Every digital ad starts with a request. When someone visits a website or opens an app, the ad tag sends that request to an ad server. The request contains information about the available placement, allowing the ad server to decide which creative should appear.

In many cases, this decision is made through programmatic advertising. Advertisers bid on the available impression, the auction takes place in milliseconds, and the winning creative is returned to the publisher. The user only sees the finished advertisement, while the technology behind the scenes completes the entire process almost instantly.

The ad tag also records information about the delivery of the ad. This makes it possible to confirm that an impression was served and provides the data advertisers need to evaluate campaign performance.

how to ad tags work?

Why are ad tags important?

Ad tags make automated advertising possible. They create the connection between publishers that have inventory to sell and advertisers that want to reach a particular audience. At the same time, they allow the different platforms involved in digital advertising to communicate with one another without manual intervention.

For marketers, this means campaigns can run across thousands of placements while still generating consistent reporting. Rather than simply delivering an ad, the tag helps verify that it appeared in the intended location and provides the foundation for optimization throughout the campaign.

Different types of ad tags

The format of an ad tag depends on the channel where an advertisement will appear. Ad tags can also be categorized in a few different ways. Some are defined by how they're delivered, while others are specific to a particular advertising format or environment.

Synchronous ad tags

Synchronous ad tags load at the same time as the content around them. This means the browser waits for the ad request to finish before continuing to load the page or app content. While this approach is simple to implement, it can slow app performance if the ad server takes longer than expected to respond.

Asynchronous ad tags

Asynchronous ad tags load independently of the surrounding content in an app. The app can continue loading while the ad request is processed in the background, creating a faster experience for users. For this reason, asynchronous tags have become the preferred approach for most modern digital advertising.

Third-party ad tags

Third-party ad tags send requests to an external ad server rather than a publisher's own infrastructure. This allows advertisers to manage creatives, update campaigns, and measure performance across multiple publishers or apps without changing each individual implementation. Third-party tags are widely used in programmatic advertising because they support centralized campaign management and reporting.

Ad tag formats

The format of an ad tag depends on where the advertisement will appear.

  • JavaScript ad tags are the most common format for display advertising on the web. They dynamically request and render ads within a webpage.
  • HTML ad tags are a simpler alternative that use standard HTML to display an advertisement. While they support fewer interactive features than JavaScript tags, they remain useful in environments where scripting isn't supported.
  • VAST (Video Ad Serving Template) tags are designed for video advertising. Instead of returning a creative directly, a VAST tag provides instructions that tell the video player which ad to display and how playback should be measured.

In mobile apps, advertising SDKs perform many of the same functions as traditional ad tags. Rather than embedding JavaScript into an app, developers integrate an SDK that requests ads, communicates with mediation platforms, and supports campaign measurement within a native environment.

Ad tags and attribution

Ad tags play an important role in campaign delivery, but they only tell part of the story.

An ad tag can confirm that an advertisement was served or that a user clicked on it. It can't tell you whether that interaction resulted in an app install, a subscription, a conversion, or another event/valuable action.

That's where mobile attribution comes in. Attribution connects advertising activity with downstream user behavior, allowing marketers to understand which campaigns drive installs, engagement, and revenue. It also gives teams the insights they need to compare channels, optimize budgets, improve return on ad spend (ROAS), and make better decisions overall. 

Together, ad tags and attribution provide a more complete picture of campaign performance. Ad tags support ad delivery and reporting, while attribution measures the business impact of every campaign.

Frequently asked questions

What's the difference between an ad tag and a tracking pixel?

An ad tag requests and serves an advertisement. A tracking pixel records specific events, such as an impression, a click, an event, or a conversion. They're often used together, but they perform different functions.

Are ad tags only used for websites?

No. Ad tags are used across digital advertising, including websites, mobile apps, connected TV (CTV), and video advertising. Although the implementation varies between environments, the purpose remains the same: deliver ads and support campaign measurement.

Do mobile apps use ad tags?

Yes, but mobile apps typically use advertising SDKs instead of traditional JavaScript ad tags. SDKs perform the same core role by requesting advertisements, displaying creatives, and collecting the data needed for reporting and measurement.

Can ad tags measure app installs?

Not on their own. Ad tags record advertising events, but they don't connect those events with user acquisition or in-app activity. Mobile attribution is needed to understand whether a campaign drove installs, engagement, purchases, or long-term value.

Measure the impact of every ad with Adjust

Serving an ad is only the beginning. To understand whether your campaigns are delivering meaningful growth, you need to know what happens after users engage.

Adjust combines industry-leading mobile attribution with analytics, fraud prevention, AI solutions and automation, deep linking, and so much more as part of our full-stack campaign measurement, enabling marketers to understand the true impact of every campaign. From app installs to lifetime value (LTV), Adjust gives you the insights you need to optimize performance with confidence.

Ready to see the full picture? Request a demo to learn how Adjust can grow your app business.

Never miss a resource. Subscribe to our newsletter.

Keep reading