Open workspace

Implementation guide

Rewarded ad on the web

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.

  • Ad Manager
  • mobile, tablet and desktop (on mobile-optimized pages)
Desktop
Mobile

Understand it in 1 minute

What the rewarded ad on the web is

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

How to implement

  1. Create the unit and set the rewardCreate an ad unit and enter the reward amount and type. The Ad Manager default is 1 reward per ad viewed, and you can change it.
  2. Create the line itemIn reservations, choose the Video or audio type with the size 1x1v (Video / VAST). In Ad Exchange, choose Display (Standard) with the size 1x1 (custom). The unit size does not change delivery.
  3. Turn off the video blockThe Block non-instream video ads protection must be turned off for the rewarded ad to work.
  4. Add GPT and show the invitationWhen GPT says the ad is ready, show your invitation. Only if the person accepts, ask GPT to make the ad visible.
  5. Deliver the reward and remove the slotWhen GPT says the reward was granted, save that information. When the ad is closed, deliver the reward and destroy the slot.
  6. If you want, confirm on the serverServer-side verification (SSV) makes Google's servers notify your system when someone completes the ad, which helps against fraud.

Implemented example

The code and how it looks on screen

Everything goes in the head of the page; replace the simple confirmation window with the invitation in your site's look.
<!-- 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>
On desktopOn a computer, nothing appears until the person accepts the site's invitation; then the ad opens in full screen with close and sound controls.
On mobileOn mobile, the page must be optimized with the viewport tag; when the person accepts, the ad takes up the whole screen until they close it.

What Google recommends

Do and don't

Allowed

  • Give rewards that are only valid inside your site or app and cannot be passed on to someone else, such as unlocked articles, game coins or an extra life.
  • Give a discount or voucher for a physical item, as long as it does not exceed 25% of the item's total value.
  • Give a random reward, if the odds are stated beforehand, if all possible rewards are easy to see (including whether you can win nothing) and if the chance is greater than zero.
  • Use icons to explain the exchange, as long as anyone understands without doubt.
  • Ask for several ads for one reward, as long as you say beforehand how many ads there are and what the reward is.

Not allowed

  • Do not give money, cryptocurrency, gift cards or anything that works as payment in the real world.
  • Do not give physical items or loyalty points that can be transferred.
  • Do not show the ad without the person accepting first, with a clear yes or accept button.
  • Do not get in the way of normal use of the site for people who say no or skip the ad.
  • Do not use texts or icons that push the person toward a choice, such as saying that watching the ad helps the business.
  • Do not say or imply that Google checks or guarantees the reward.

Tips

To do it right

Watch out

Common errors

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.

Not checking whether the slot came back empty

GPT returns null when the page does not support rewarded ads. The code must stop in that case.

Not removing the slot on close

Google's example destroys the slot when the person closes the ad or declines the invitation. Follow the same path in your code.

Video block turned on

With the Block non-instream video ads protection turned on, the rewarded ad is not delivered.

Frequently asked questions

Who delivers the reward?

You do. The site creates the invitation, delivers the reward and is solely responsible for it.

How long does the person have to watch?

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.

Does it work on a computer?

Yes. Rewarded on the web works on computer, mobile and tablet, always on mobile-optimized pages.

Do I need to create a div?

No. The rewarded ad creates its own box when there is an ad.

Can I ask the person to watch the ad to help the site?

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

Official Google source

Everything on this page follows Google's official documentation. Read it straight from the source:

Does your site use this format the right way?

The audit reads the site as a visitor would, without clicking anything, and shows what to fix.

Run an audit