When you upload an HTML5 banner to an ad server, the server needs two things: to decide where a click goes, and to count that click. Instead of hard-coding a link in your banner, you read the destination from a variable called clickTag. The ad server fills it in with a tracking URL that records the click and then forwards the visitor to your landing page.

The idea dates back to Flash banners — the original 123-banner.com had a clickTag page in 2008 — and lives on in HTML5 ads today.

Example clickTag code

In the banner's index.html, declare the variable in the head (the default URL is only used for testing):

<meta name="ad.size" content="width=300,height=250">
<script>
  var clickTag = "https://www.example.com";
</script>

Then make the whole banner open that URL when clicked:

<a href="javascript:window.open(window.clickTag)">
  <!-- banner content -->
</a>

Common mistakes

  • Hard-coded links. A fixed href="https://…" bypasses tracking and usually fails ad review.
  • Wrong capitalisation. Use the exact name your ad server documents.
  • External files. HTML5 ads must usually be self-contained: fonts, images and scripts inside the ZIP, no requests to other servers.
  • Missing size tag. Google Ads expects the ad.size meta tag shown above.

Don't need clickTag?

Image banners (GIF, PNG, JPG) don't use a clickTag — the ad server or your own <a> tag handles the link. See how to embed a banner.