HTML5 requirements for Ad Manager

Guidelines for HTML5 creatives

This article is for the Google Ad Manager product only. It doesn't apply to other Google products. Click the following links if you're looking for HTML5 requirements for Studio or Google Web Designer.

Follow these guidelines for building the HTML5 zip bundle you want to upload into Ad Manager. These guidelines 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.

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 tag is not supported in GWD bundle-based HTML5. A GWD-published bundle should use exit events instead of defining var clickTag(s).

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.

A click tag should be inserted in the head of an HTML document. See this example:
   <meta name="ad.size" content="width=300,height=250">
   <script type="text/javascript">
      var clickTag = "";

In the body of your HTML document, your creative must use the click tag variable as the click-through URL:

<a href="javascript:void(">
   <img src="images/dclk.png" border=0>

Was this helpful?
How can we improve it?

Need more help?

Sign in for additional support options to quickly solve your issue

Clear search
Close search
Google apps
Main menu
Search Help Center