# Control the rate the players see ads

The Ad Placement API is designed so that it's easy to control the way that ads
are shown within your game, without the need to rewrite the logic of your game,
and release a new version.

One of the controls we provide is for the *rate* at which ads are shown. This
can be adjusted by passing the [`data-ad-frequency-hint`](https://support.google.com/adsense/answer/9955214)
to the tag. The argument is a string like `"60s"` which specifies the minimum
time period on average that ads should be shown. Currently the default frequency
is `"120s"` (i.e. ads show no more than once every 2 minutes on average), and
the maximum rate that ads can show is once every 30s.

**The frequency control isn't applied to the very first ad placement** (i.e. the
first call to `adBreak()`).

These defaults may change over time as we further optimize the formats. Also
note that `data-ad-frequency-hint` is a client side hint that could be ignored
or overridden by a server control in future. For example, at some point we may
provide a control within the AdSense front-end for changing the ad frequency
settings of your games remotely, without having to make changes to the tag.

    <script async
          data-ad-frequency-hint="30s"
          src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-123456789"
          crossorigin="anonymous">
    </script>
    <script>window.adsbygoogle = window.adsbygoogle || [];
    var adBreak = adConfig = function(o) {adsbygoogle.push(o);}</script>

Remember:

- `adBreak()` defines a place where an ad **could** show.
- Whether an ad actually shows depends on a number of things.
- The frequency hint is one of the most important controls, and it impacts whether ads show in your placements.
- The frequency hint **isn't** applied to the first ad in your game.