Rich media All other HTML5 creatives use rich media elements, so they must be created in Studio (e.g., display expanding or display interstitial creatives). You can get HTML5 rich media creatives from Studio and set them up in Campaign Manager. This includes rich media display banner HTML5 creatives, which use rich media elements.

HTML file: The primary asset of your HTML5 creative is the HTML file. This is the entry point for your creative. It must be a complete HTML document that includes at least one click tag and can load into an iFrame. Campaign Manager serves the iFrame along with your assets. See below for click tag help.

Other files: Include any other files that are referenced by the HTML file. Do not include any files that are not referenced.

What not to include

No .zips within .zips: Do not include any .zip files within your HTML5 .zip file. However, if you have several separate HTML5 .zip files for several separate HTML5 creatives, you can zip these files together and batch upload them to Campaign Manager.

No unreferenced files: As noted above, only include files if they referenced by the HTML file.

No local or session storage: Campaign Manager does not accept HTML5 assets that use local storage or session storage.

No % in the name: Do not include a percent symbol (%) in the names of any of the files in your asset.

No backup assets: Do not include backup assets in your HTML5 .zip file unless they are referenced by the HTML file.

The trafficker must upload a separate backup image to Campaign Manager. This image is used if Campaign Manager cannot use your primary assets because they are not supported. Do not include this backup image with your HTML5 .zip file.

However, some HTML files may be coded to use their own backup assets when a browser can't handle all the features. In this case, you'll need to include a backup image in your .zip in addition to the file the trafficker must upload separately.

If you have problems uploading your file: The issue may be that your file did not contain valid HTML5 assets or contained more than 100 files (the maximum). Another issue may be that your HTML5 asset uses JavaScript APIs for local storage or sessions storage. To help protect user privacy, Campaign Manager does not allow these APIs.

To help protect user privacy, Campaign Manager does not accept HTML5 assets that use local storage or session storage. If your upload is rejected for this reason, work with your developer to remove the forbidden APIs. Then try uploading the asset again. Specifically, you cannot upload HTML5 assets with the following JavaScript APIs:

indexedDB

localStorage

openDatabase

sessionStorage

If your advertising goals depend on these APIs, try using Campaign Manager settings instead. For example, some advertisers use these APIs for ad targeting and frequency caps, but this isn’t necessary: you can use Campaign Manager to set up many kinds of targeting, and to set frequency caps. Ask support for help implementing workarounds. (Just keep in mind that regardless of how you set up your asset, you should only attempt to capture data that meets the privacy requirements in your contract with Google Marketing Platform.)

What is local storage and session storage? These are two kinds of HTML5 Web Storage. They are ways to store data on a browser. Local storage stores a file on the browser across browsing sessions. It remains on the browser permanently, unless the user clears the browser cache or deletes the file manually. Session storage only stores data on the browser during a particular browsing session. Once you close and restart the browser, all the session-stored data will be cleared.

Why isn't this type of storage allowed? The stored file can potentially include code designed to capture Personally Identifiable Information (PII), track cross-session browser activity, or send other data to third parties that may violate the terms of your Google Marketing Platform contract. This kind of data collection is certainly not the only use of local and session storage, but it's one possible use, because the file can include any type of code.

Dimensions

Unlike images or videos, HTML documents don't have dimensions on their own. For this reason, use the size meta tag to indicate the intended size for your creative. The size meta tag is an optional parameter in your HTML document. It's the best way to be sure your creative renders at the right dimensions. You can enter the dimensions as shown below:

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

Click tags

Click tags define landing pages for each exit on your creatives with HTML5 assets. An exit is any area that can be clicked that directs the browser to a landing page. Each click tag defines the landing page for a different exit.

When an exit gets a click, the creative calls Campaign Manager for the landing page associated with that exit. You can set this landing page in your creative or your ad, depending on your needs.

Campaign Manager detects click tags when you upload your assets. You can change the landing page your click tag uses anytime, even after you export tags. That's because the click tag is a standard variable, a placeholder for the landing page rather than a hardcoded value.

There are some best practices for setting up your click tags since the ad-level overrides the creative-level settings in display creatives:

The click tag should be easy for the ad server to read—no minification or obfuscation, though you can use minifers in the rest of your code and in other files.

We do not recommend hard-coded URLs in your asset because that prevents Campaign Manager from tracking clicks and prevents traffickers from updating the URL. After upload, Campaign Manager will warn you if there are hardcoded URLs in the asset.

Including Parameter

Including a # sign example

Coded to break up the tracking call to Campaign Manager and the landing page URL of the button. This needs to be done for any creative that clicks through to a destination URL that contains a pound sign (#).