HTML5 requirements for Ad Manager

This article is for the Google Ad Manager product only. It doesn't apply to other Google products.

When building the HTML5 zip bundle you want to upload into Ad Manager, please follow the requirements described below.

  • The requirements should work for any browser that supports HTML5. However, some creative functionality may not work as desired in all environments, so please test your HTML5 creative code thoroughly.
  • You can see examples of HTML5 files in the Rich Media Gallery.

Confirm your bundle is SSL compatible

HTML5 creatives must be SSL compatible to serve to HTTPS sites.

Choose the correct environment for Google Web Designer

If you use Google Web Designer to build HTML5 creatives, select “Display & Video 360” as the environment.

Follow dimension guidelines

  • Use the size meta tag to indicate the intended size for your creative and ensure your creative renders at the right dimensions: <meta name="ad.size" content="width=[x],height=[y]">.
  • HTML5 creatives can only have fixed dimensions (e.g., 300x250, 400x400, 728x90, etc.). Dynamic sizes such as “Fluid” aren’t supported.
  • For creative HTML files in Google Web Designer bundles, the minWidth and minHeight properties of the creativeProperties parameter must be non-zero. For example, "creativeProperties":{"minWidth":0,"minHeight":0,"maxWidth":0,"maxHeight":0} results in an error.

Size meta tag example

Here's an example meta tag for a fixed size (such as 300x250):

<meta name="ad.size" content="width=300,height=250">

Follow click tag guidelines

Click tags define click-through URLs for each exit on your HTML5 creative. An exit is any clickable area that directs the browser to a landing page.

  • Learn more about adding HTML5 exits (including exits using Google Web Designer) in the Studio Help Center.

When an exit gets a click, the creative calls Ad Manager for the click-through URL associated with that exit.

  • You can set this URL in your creative or ad, depending on your needs and the creative type.
  • If you set click tags in both the creative and ad, the ad-level setting overrides the creative-level settings.

Ad Manager detects click tags when you upload assets. You can change the click-through URL the click tag uses anytime, even after you export tags.

  • Make sure your creative uses the click tag variable as the click destination.
  • The click tag should be easy for the ad server to read — no minification or obfuscation, though you can use minifiers in the rest of your code and other files.
  • We don't recommend hard-coded click-through URLs in your asset because it prevents Ad Manager from tracking clicks and prevents traffickers from updating the URL. After upload, Ad Manager will warn you if there are hardcoded URLs.

Sample click tag insertion

Here's an example of a click tag inserted in an HTML document:

<html>
<head>
<meta name="ad.size" content="width=300,height=250">
<script type="text/javascript">
var clickTag = "http://www.google.com"; </script>
</head>
[The rest of your creative code goes here.]
</html>

Your creative must use the click tag variable as the click-through URL:

<a href="javascript:window.open(window.clickTag)">
<img src="images/dclk.png" border=0>
</a>
Was this article helpful?
How can we improve it?