ANDREW BROGOON: Hey, everybody.
I'm Andrew Brogoon, and welcome back to the Mobile Ads Garage.
Today, with the help of my partner, Gary the Graphics Guy,
we're going to talk about test ads, why they're important,
and a couple of ways to enable them.
All right, let's start with the why.
Test ads are kind of like the seat belts in a drag racer.
Not the sexiest part of the machine,
but they will save you from a ton of trouble.
When you use test ads properly, you help insure three things.
Number 1, advertisers are charged correctly.
Number 2, everybody's stats and reporting can log correctly,
including yours.
And 3, you avoid one of the most common causes
of account suspensions.
Let's take a look at these real quick.
Number 1 is pretty easy.
If you test with live ads, the server
thinks your impressions and click throughs are real,
which means they get logged and somebody ends up
paying for them.
That may not sound like much, but when tens of thousands
of developers do it at once, all over the world,
that's a lot of imaginary traffic
to ask somebody to pay for.
Number 2, accurate stats and reporting.
If you're testing with live ads, all those impressions and click
throughs record it as real, which
means your reporting is off, as are the numbers for the ads
and advertisers themselves.
Last and probably highest on the list of your concerns
is that test ads help you avoid account suspensions.
If you're working on your app, loading and clicking live ads,
the server is going to say, hey, this person just clicked
on like, 10 ads in a row.
That looks like click fraud, and then down comes the ban hammer.
All right, so that's the why.
Now, let's talk how.
The good news about implementing test ads
is that there's two fairly simple ways to do
it, one of which is dead easy.
Fair enough.
The quickest way to make sure you get test ads
is just to use one of our predefined test ads units
when loading ads.
We have a list of them at our Android and iOS testing guides.
Each format is covered, and you can
take the ad units right out of there
and pop them into your apps.
Plus, this video that you're watching right now
is embedded in the test ads guide.
So if you're watching me in an embedded player
right now instead of on YouTube.com,
chances are you're on the right page already.
Just pause me and scroll down.
If you use those test ad unit IDs,
you'll see a creative like this.
It'll probably declare itself as a test ad
so you'll know right away that you're doing it right.
All right, so that's the first way of implementing test ads.
The other is to use test devices when making your request
object.
These APIs for Android, IOS, and Unity
allow you to register a particular device
to receive test ads, even when using your own ad units.
You pass them a hash device ID and the SDK
will make sure that when that device runs the code
and makes a request, it always gets a test ad.
That's a good question.
They're shown in the Android or iOS device logs
when an ad is requested.
Just look for a line that references test devices,
copy the ID, and you're good to go.
Another good question.
You can use one of the tested unit IDs I mentioned above,
or just download and run one of our samples.
You'll see the device hash in a log either way.
One of the advantages of using test devices with your own ad
units is that you're not stuck with the default test
creatives.
Instead, you get dummy versions of production ads
that are clearly tagged as test ads.
So you get to see a wide variety of creatives
while still using test ads.
Plus, when you use your own ad units,
your mediation configurations are still
in play, which means you'll sometimes see the AdMob test
ad, but you'll also get mediated ads.
That can help you test mediated ad units.
But be careful.
You can see, there's no test ad label here.
Not every network is capable of deciding at runtime
to show a test ad instead of a real one.
Some have server side flags, their own way of registering
test devices, things like that.
So make sure you check the documentation provided
by the networks you're mediating and configure them accordingly.
All right, that's about it for this episode.
But I do have some resources for you
down in the description for this video.
First up, our links to our testing guides
for Android, iOS, and Unity.
You'll find those test units I mentioned,
along with some other good tips.
There's also a link to our SDK support forum,
where you can post technical questions
and get answers from our support team.
And of course, if you have a question
about this video or an idea for a topic you'd like us to cover,
leave a comment below, and Gary and I will see you next time.
[MUSIC PLAYING]