We've moved.
Visit our new home for news and updates from AdSense
Inside AdSense
Google's official blog for news, tips and information on AdSense.
The ABCs of A/B Testing
Thursday, August 03, 2006
If you’ve ever wondered how your earnings would change if you swapped a banner ad for a leaderboard or if you changed your color palette to Open Air, now you can find out by using A/B testing. In this brief tutorial, we'll review the fundamentals of completing an A/B test.
Tutorial
Let's say you’ve got a gut feeling that a leaderboard ad would double your revenue compared to a banner. To prove it, you'll need some evidence, so you decide to perform an A/B Test.
First, you'll need to create two
custom channels
, one for each ad unit you're going to be testing. Then, create a leaderboard ad unit and a banner ad unit with identical settings, except for the ad format. Be sure to assign each ad unit the appropriate channel created above.
You can decide how you want to run your A/B test; for example, you can choose to run the test on only 5% of your traffic or only on your home page. No matter what you choose, you'll need to run both of your ad units at the same time. But how can you easily alternate between your two ad formats? The simplest way to do this is to use the JavaScript template below - it will rotate between the two ad units, showing each 50% of the time.
<script type="text/javascript">
var random_number = Math.random();
if (random_number < .5){
//your first ad unit code goes here
} else {
//your second ad unit code goes here
}
</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
When using this template, remember to replace “//your first ad unit goes here” with your ad code inside the first set of <script></script> tags.
Keep in mind that generally, modifying your ad code is against AdSense program policies. However, we've checked with our policy folks and they've given our publishers permission to modify the code for use with this specific script for the purposes of A/B testing. Please be aware that the AdSense team isn't able to provide any support or troubleshooting help for this script or this sort of testing.
Once you’ve implemented the A/B testing code on your page, you'll be able to view the experiment results in your
channel reports
and compare the figures from the custom channels you created.
If you notice that one ad configuration clearly performs better over time, you can replace the testing script with the ad code for that ad unit to display it on a permanent basis. Or, update the script to test the performance of that ad unit against another ad configuration.
A few important things to remember when designing and running an A/B test:
1.
One of the ad configurations in your test should be the configuration you're currently displaying.
In order to understand the effects of each ad configuration, you need to compare the experimental results to a baseline. This baseline, also called the control, should be the ad configuration you are currently using.
2.
You should only make one change to the ad configuration in each A/B experiment.
The goal of A/B testing is to isolate the revenue impact or CTR change of one particular modification, so that you know exactly which change affected your revenue. By modifying the baseline ad code in only one way, you can be assured of this.
3.
For one A/B test, all configurations must be running simultaneously.
Since we need to ensure that all ad configurations are subject to the same conditions such as the same traffic patterns, all configurations must be running at the same time. The JavaScript template above is one way of implementing this.
If you’d like to read more about A/B testing, please visit our
Help Center
.
UPDATED template for accuracy
Posted by Tom Tunguz - AdSense Optimization Team
Labels
#GlobalSpotlight
2
#SuccessStack
9
Active View
9
Ad formats
22
Ad layout
6
Ad Placement
2
AdSense
5
AdSense Anniversary
15
AdSense features
231
adsense guide
14
AdSense In Your City
22
AdSense Interface
61
AdSense Team
31
AdSense101
13
AMP
3
AskAdSense
4
Audience Engagement
4
Beginner's
1
Best Practice
22
Beta
1
Case studies
99
Certified Partners
4
Content strategy
23
DoubleClick
17
download
3
Earnings/Reports
70
eBook
3
Education
4
engagement
1
Facts and Fiction
11
FAQs
1
Feedback
10
Google Analytics
7
Google's Certified Publishing Partner
3
googlenew
13
Guest Blogger
4
Help
2
How to avoid policy violations
1
India
1
infographic
3
International
118
Learn with Google for Publishers
17
Matched content
6
micro-moments
5
Mobile
67
Mobile optimization
3
Multi-Screen
32
Native
1
native ads
4
Newbie
32
Optimal ad placement
1
Optimization
165
Other
245
Other Google products
106
Page-Level
1
PageSpeed
10
Pakistan
1
Passion into profit
8
Payments
62
Policy
2
Pop-Unders
1
Pop-Ups
1
Product update
11
Program Policies
79
Programmatic
1
Social
19
Support
10
Tips
37
Urdu
1
User Generated Content
1
Video
41
Viewability
13
Webinars
15
YouTube
3
Archive
2019
Oct
Sep
Aug
Jul
May
Feb
Jan
2018
Dec
Nov
Oct
Aug
Jun
May
Apr
Mar
Feb
Jan
2017
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2016
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2015
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2014
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2013
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2012
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2011
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2010
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2009
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2008
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2007
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2006
Dec
Nov
Oct
Sep
Aug
Jul
Jun
May
Apr
Mar
Feb
Jan
2005
Dec
Nov
Oct
Sep
Aug
Feed
Subscribe to receive posts via email:
Visit this group
Follow @adsense
Useful links
Get started with AdSense
Sign in to your account
AdSense Help Center
AdSense Help Forum
Related Google products
AdMob: Monetize your app
DoubleClick for Publishers Small Business
Google AdWords
Google Analytics
Give us feedback in our
Product Forums
.