Control the rate the players see ads
Stay organized with collections
Save and categorize content based on your preferences.
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
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.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-12-05 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-12-05 UTC."],[[["The Ad Placement API allows easy control of ad display within games without requiring code changes or new releases."],["Ad frequency can be adjusted using `data-ad-frequency-hint` to specify the minimum average time between ads, ranging from 30 seconds to the default 120 seconds."],["The frequency control does not affect the very first ad displayed in the game."],["Default ad frequency settings are subject to change for optimization purposes and can be overridden by server-side controls in the future."]]],["The Ad Placement API allows control over ad display frequency using `data-ad-frequency-hint` within the tag. This string argument, like \"60s\", sets the minimum average time between ads, with a default of \"120s\" and a minimum of \"30s\". The frequency control does not apply to the first ad placement. The `adBreak()` function determines a potential ad location, while the actual ad display depends on several factors, including the frequency hint. The control is a client side hint that may be overridden in the future.\n"]]