---
url: https://docs.dataflair.ai/marketplace/ad-tags.md
description: >-
  The two ad tag formats, web page and ad server, and how impression and click
  tracking work inside the ad frame.
---

# Ad tags and tracking

DataFlair serves every ad through one stable surface: the **ad frame**, `GET /ad/{code}`. You embed a tag that loads that frame. The frame shows the currently approved creative, with click and impression tracking built in. If the creative changes during a campaign, the same code keeps working. You do not need to paste the tag again.

The same tracking link comes in **two formats**. Both are offered from the Install Kit in your DataFlair Marketplace dashboard. **Both formats serve the same creative.** Only the embed wrapper differs.

## 1. Web page (default)

Paste this where the ad should appear on a normal web page, a CMS or a template.

```html
<!-- DataFlair ad tag · campaign CMP-… · placement Sidebar MPU -->
<iframe src="https://t.dataflair.ai/ad/{code}"
  width="300" height="250" frameborder="0" scrolling="no"
  marginwidth="0" marginheight="0" referrerpolicy="no-referrer-when-downgrade"
  sandbox="allow-scripts allow-popups allow-popups-to-escape-sandbox allow-top-navigation-by-user-activation allow-same-origin"
  style="border:0;display:block;overflow:hidden" title="Advertisement"></iframe>
```

Freshness is guaranteed on the server. A raw web page has no macro engine, so this format uses **no cache-buster and needs none**.

## 2. Ad server or GAM

Use this format when you traffic the tag as a **third-party creative** inside your own ad server, for example Google Ad Manager. It is the web tag with one addition: a cache-buster macro in the `src`.

```html
<iframe src="https://t.dataflair.ai/ad/{code}?cb=%%CACHEBUSTER%%"
  width="300" height="250" … ></iframe>
```

* **`%%CACHEBUSTER%%`** is replaced by your ad server with a fresh random number on every serve. Each fill becomes a unique URL, so every serve counts as a fresh impression. This keeps your ad server's impression counts in line with DataFlair's.
* The ad frame ignores the value of the cache-buster. It exists only to make the URL unique.

### Clicks with iframe creatives

The click happens **inside a cross-origin iframe**, so your ad server cannot wrap the click itself. With the ad server format:

* **Impressions** reconcile through the cache-buster, as above.
* **Clicks** are counted and shown in DataFlair's own reporting, not in your ad server's. This is a general limit of iframe-based ad tags. It applies to every tag of that kind.

Fixed-size display, the format DataFlair uses, works correctly without click tracking in your ad server. It only changes where you see click totals.
