HTML5 Display Ads vs App Campaigns: Different Code
Display and App campaigns both accept HTML5, but they expect different click handling, layout and review. Here is what changes in the code and what can stay shared.
Key takeaways - Display campaigns and App campaigns both accept HTML5, but they are not interchangeable targets. Click handling, sizing and review expectations differ. - The most common wrong build is the click path: Display builds are structured around a clickTag, App campaign HTML5 assets use the Exit API. - Display ads are made for fixed slots. App campaign assets appear in contexts you don't control, so layout has to adapt to the viewport. - Keep one codebase for gameplay and visuals. Isolate click handling, size declaration and packaging in a thin per-target layer. - Check Google's current HTML5 requirements before each build. Limits and script references change, and copying a number from an old article is a common route to rejection.
Same file type, different job
Both campaign types accept HTML5, so it's easy to assume one build serves both. It doesn't, because the campaigns answer different questions.
A Display campaign places your creative in specific ad slots across sites and apps. You upload a finished ad at a defined size, and it runs as designed. You own the whole composition.
An App campaign works from assets. You supply pieces such as text, images, video and HTML5, and Google decides how to combine and show them. You don't pick placements or design a layout around them. The HTML5 asset is one ingredient, usually an interactive playable, and its job is to move someone toward the install.
Almost every technical difference below follows from that. For the asset side in detail, see how Google uses the HTML5 asset in App campaigns.
Click handling: clickTag vs Exit API
This is where builds break most often.
In a Display campaign, the ad reads a clickTag value supplied when the ad is served and sends the user to it on tap. The destination isn't baked into your file. Google injects the click URL so it can measure the click and apply the landing page you set on the ad. If you hardcode a store URL, you bypass the mechanism meant to handle that.
In an App campaign, the HTML5 asset uses the Exit API. Your code calls an exit function, and the platform sends the user to the store listing configured in the campaign. There is no URL for you to provide, so a hardcoded link has no role here either.
Practical consequences:
- A Display build that only calls the Exit API, with no clickTag handling, may not do what you expect when tapped.
- An App campaign build that reads
window.clickTagcan fail validation or lead nowhere. - In both, fire the click only from a real user gesture. Timers and load events that trigger exits look like forced clicks, and reviewers treat them that way.
Google's Exit API is loaded through a script reference that Google documents. That is the kind of detail to copy from the current official page, not from an old project or a blog post, including this one.
For example call patterns and a side-by-side view, read Exit API vs clickTag: Google HTML5 ad click paths.
Sizing and layout
A Display ad is made for a slot. You declare its dimensions in the file as Google's spec describes, and you usually upload a separate version for each size you want to run. The canvas is known, so the creative can be planned to the pixel.
An App campaign asset has no single canvas to plan against. A playable might appear on a small phone, a tall phone or a tablet, in portrait or landscape, with notches and safe areas. Design it to respond to the viewport rather than to a fixed rectangle.
In practice:
- Display: declare the size exactly as the spec requires, and make the content fit that box with no scrolling and no overflow.
- App campaigns: read the viewport size at runtime, scale the game canvas to it, and keep controls and the call to action away from the edges.
- Test a tall narrow phone, a short wide phone and a tablet shape before upload. Layout bugs show up at the extremes, not in the middle.
I'm leaving specific dimensions out on purpose. Supported sizes and orientations differ by campaign type and change over time, so check Google's current HTML5 specification for your campaign type.
What the creative is supposed to do
A Display HTML5 ad is often a short animated banner or a light interaction. The viewer glances at it while reading something else, so it has to communicate quickly, and the tap is the goal.
A playable in an App campaign asks for more. The user plays a small slice of the product, such as a match-three move, a runner dodge or a sorting puzzle, and then sees an end card with an install button. The interaction is the pitch.
That changes design choices:
- A Display ad should deliver its message without input. A playable can wait for the first touch.
- A playable needs an obvious first action within seconds. A user who can't work out the controls just leaves.
- A playable needs a defined end state: a win or fail moment, then the store call to action. A Display ad usually loops or rests on a final frame.
If you are weighing reward mechanics, Rewarded Playable Ads: How They Fit Beside Rewarded Video explains where the formats overlap. Much of that lives outside Google's own placements, so don't assume it carries over.
Packaging and self-containment
This layer is shared. Both targets want a ZIP with an entry HTML file and every asset it needs inside the archive.
- No CDN-hosted libraries and no web fonts loaded from a remote server.
- No analytics or tracking calls to third-party hosts from inside the creative.
- Relative paths for every image, script and audio file.
- A lean, tidy folder structure. Bloated or messy archives cause trouble in review and in loading.
The exception is the one script reference Google itself documents for its click or exit handling. Everything else should ship inside the ZIP.
Many rejections come from this layer rather than from anything campaign-specific. A build can pass your browser test because your machine is online and forgiving, then fail because the validator or reviewer sees an outside request. Self Contained HTML5 Ad: No CDNs, No Web Fonts walks through how to find those dependencies.
One codebase, thin per-target layer
You don't need two separate projects. Treat the ad as a shared core plus a small adapter.
Shared core
- Game logic, input, art, audio and the end card.
- Responsive scaling, which Display builds can use too, even with a fixed declared size.
Display adapter
- Size declaration in the form Google's spec requires.
- clickTag reading and a single click handler that uses it.
App campaign adapter
- Exit API call on the install button and end card.
- Viewport-driven layout and safe-area handling.
Route every click through one function, for example openStore(). The core calls that function and the adapter decides what it does. When a platform changes its click mechanism, you edit one file.
Pre-upload checks that apply to both
- Open the entry file from the unzipped folder with your network disconnected. If anything breaks, you have an external dependency.
- Tap every interactive element and confirm each one reaches the single click handler.
- Confirm no click fires without a user gesture.
- Resize the window through several shapes and orientations.
- Re-read Google's current requirements for the campaign type you are uploading to, not the one you used last time.
For a fuller pass focused on playables, use the Playable HTML5 QA checklist.
Choosing which build to make first
If you have to start with one target, start with the one your campaign actually uses. A mobile game running App campaigns should build for the Exit API and flexible layout first. A team running Display placements with a fixed set of sizes should build for clickTag and declared dimensions.
Keep the shared core clean from day one. Retrofitting a second target is easy when click and size logic are isolated, and painful when they are scattered through the game code.
Where a tool can help
Hand-building the adapter layer isn't hard, but it is repetitive, and a one-line mistake in the click path costs a review cycle. PlayableRun generates an HTML5 playable from a store listing and exports a ZIP for Google Ads, which is useful if you want to see how a finished package is structured before wiring your own. You can still check the result against Google's current requirements, and you should.
If you want to see a finished playable before deciding anything, the demos are open to try, and a free account lets you build one from your own listing.
Frequently asked questions
›Can I upload the same HTML5 ZIP to a Display campaign and an App campaign?
Usually not without changes. The two campaign types expect different click handling and have different sizing and review expectations, so the click layer and size declaration need to be adjusted per target. Gameplay and visuals can stay shared.
›Does a Display HTML5 ad use clickTag or the Exit API?
Display builds are typically structured around a clickTag that Google supplies at serve time. Check Google's current HTML5 requirements for the exact pattern it accepts, since supported approaches can change.
›How does click handling work in an App campaign HTML5 asset?
The asset calls the Exit API instead of opening a URL you supply. The destination comes from the app listing in your campaign settings, so a hardcoded store link has no role.
›Does an App campaign HTML5 asset need a fixed size?
Plan for it to appear in different screen shapes and orientations. Scale the canvas to the viewport at runtime and keep controls and the call to action away from the edges. Check Google's current spec for what is supported.
›Why does my HTML5 build work in a browser but fail in Google Ads?
Usually it is a missing or wrong click handler, an external request such as a CDN library or web font, or a structure problem in the ZIP. The browser is more forgiving than the validator and review process.
Turn your store listing into a playable
Paste an App Store or Google Play link and get an HTML5 playable you can test in minutes. The first one is free.
Keep reading
- Google Ads HTML5
Google Ads HTML5 Eligibility: Get Your Account Ready
7 min read
- Google Ads HTML5
Self Contained HTML5 Ad: No CDNs, No Web Fonts
8 min read
- Google Ads HTML5
Google Ads HTML5 Validator Errors Explained
7 min read