Home

adUnitId

An adUnitId is a unique identifier assigned by an ad serving platform to a specific ad unit within an app or website. It is used by demand sources and reporting systems to distinguish one placement from another, enabling targeted delivery and performance tracking.

In practice, adUnitId is used by advertising SDKs to request ads from the platform. The value tells

Examples of formats vary by platform. In Google AdMob, ad unit IDs typically appear as ca-app-pub-XXXXXXXXXXXXXXXX/NNNNNNNNN.

Creation and management: Ad units are created in the platform’s console, assigned to an app or site,

Best practices: use test adUnitIds during development to avoid invalid traffic, replace them with production IDs

Security and privacy: adUnitIds are configuration data rather than secrets, but they should be handled carefully

the
platform
which
inventory
to
fill
and
how
to
attribute
impressions,
clicks,
and
revenue.
Different
platforms
use
different
formats
for
these
identifiers.
In
Google
Ad
Manager,
the
corresponding
concept
is
often
an
ad
unit
path,
such
as
/1234567/sports_banner,
with
SDKs
sometimes
referencing
the
path
or
a
numeric
ID
depending
on
the
integration.
The
exact
format
depends
on
the
platform
and
the
type
of
ad
unit
(banner,
interstitial,
rewarded,
etc.).
and
then
referenced
in
app
code
via
the
adUnitId.
Each
ad
unit
can
be
configured
with
supported
ad
formats,
sizes,
and
targeting
options.
Proper
organization
of
ad
units
helps
with
reporting
and
optimization.
before
release,
and
avoid
hard-coding
IDs
in
publicly
accessible
codebases.
Track
performance
by
ad
unit
to
identify
higher-earning
placements
and
optimize
inventory.
to
prevent
unintended
exposure
and
to
maintain
consistent
behavior
across
environments.