Page without a viewport tag
The rewarded ad only works on mobile-optimized pages, with neutral zoom. Without the viewport tag, GPT may not create the slot.
Implementation guide
Rewarded ads for web
The person chooses to watch an ad and, in return, gets a reward from the site, such as more articles unlocked or an extra life in a game.
Understand it in 1 minute
The rewarded ad is an ad that the person chooses to watch to get something from the site. It is like at an amusement park: you hand over a ticket and get a ride. Here, the ticket is watching the ad, and the reward can be reading more articles, earning coins or an extra life in a game, or unlocking airport Wi-Fi. The most important thing: the person must say yes first. Nobody is forced to watch.
In Ad Manager, GPT, the Google Publisher Tag, which is the Google code that requests ads, is what shows this ad. You create a slot, which is the ad space, of the rewarded type. When the ad is ready, GPT tells your site. Then the site shows an invitation, for example: want to watch an ad to earn a reward? If the person says yes, your code asks GPT to show the ad in full screen. If they say no, the slot is removed.
The site is the one that creates the invitation screen and delivers the reward. To earn it, the ad must stay visible for at least 7 seconds and, when it is a video, the person must watch it. If the person tries to close it earlier, they get a warning that they will lose the reward. When it ends, the ad stays on screen until the person closes it.
There are strong rules. The reward cannot be money, a gift card, cryptocurrency or a physical item. It must be usable only inside your site or app and cannot be passed on to someone else. Before each ad, you must say clearly what the person has to do and what they will get. This format makes sense when your site has something people really want, such as gated content or in-game perks.
Step by step
Implemented example
<!-- No head; a página precisa da etiqueta de viewport -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<script async
src="https://securepubads.g.doubleclick.net/tag/js/gpt.js"
crossorigin="anonymous"></script>
<script>
window.googletag = window.googletag || { cmd: [] };
let rewardedSlot;
let rewardPayload;
googletag.cmd.push(() => {
rewardedSlot = googletag.defineOutOfPageSlot(
"/1234567/exemplo",
googletag.enums.OutOfPageFormat.REWARDED
);
// Volta null se a página ou o aparelho não aceitar premiado
if (!rewardedSlot) return;
rewardedSlot.addService(googletag.pubads());
googletag.pubads().addEventListener("rewardedSlotReady", (event) => {
// Seu convite: o anúncio só aparece se a pessoa disser sim
if (confirm("Ver um anúncio para liberar 3 artigos?")) {
event.makeRewardedVisible();
} else {
googletag.destroySlots([rewardedSlot]);
}
});
googletag.pubads().addEventListener("rewardedSlotGranted", (event) => {
rewardPayload = event.payload; // prêmio concedido
});
googletag.pubads().addEventListener("rewardedSlotClosed", () => {
// Entregue o prêmio (se rewardPayload existir) e apague o slot
googletag.destroySlots([rewardedSlot]);
});
googletag.enableServices();
googletag.display(rewardedSlot);
});
</script>What Google recommends
Tips
Watch out
The rewarded ad only works on mobile-optimized pages, with neutral zoom. Without the viewport tag, GPT may not create the slot.
GPT returns null when the page does not support rewarded ads. The code must stop in that case.
Google's example destroys the slot when the person closes the ad or declines the invitation. Follow the same path in your code.
With the Block non-instream video ads protection turned on, the rewarded ad is not delivered.
You do. The site creates the invitation, delivers the reward and is solely responsible for it.
The ad must stay visible for at least 7 seconds. If it is a video, the person must watch it. Google counts it as completed when the video ends, when the set display time is reached or when the skip point arrives.
Yes. Rewarded on the web works on computer, mobile and tablet, always on mobile-optimized pages.
No. The rewarded ad creates its own box when there is an ad.
No. The policies prohibit text that pushes the person, such as saying that watching the ad helps the business. Describe only the action and the reward.
Library
Everything on this page follows Google's official documentation. Read it straight from the source:
The audit reads the site as a visitor would, without clicking anything, and shows what to fix.