Skip to content

How to A/B Test Ad Placements: A Practical Guide for Publishers

Most ad layout decisions are made on gut feeling: someone adds a sticky ad, revenue looks higher next week, and the change stays. But ad revenue moves by 10% to 30% from week to week on its own, because of seasonality, traffic mix and advertiser budgets. Without a proper test you cannot tell a real improvement from a lucky week, and some changes that raise RPM quietly lose readers and total revenue.

This guide shows how to A/B test ad placements properly as a publisher: what to measure, how to split traffic, how long to run a test, which built-in tools AdSense and Google Ad Manager offer, how to check whether a result is real, and the policy and SEO traps to avoid.

Short version: Split visitors (not pageviews) into two groups at random, show each group one layout, tag every ad request with the variant using a key-value, and compare revenue per session and pages per session, not page RPM. Run the test for at least one to two full weeks, decide the sample size in advance, and do not stop the moment one side looks ahead. For simple settings, use AdSense Experiments or Ad Manager's Experiments; for layout changes, use your own split.

Why before-and-after comparisons mislead

The most common "test" is a before-and-after: change the layout on Monday, compare with last week. It almost always gives a misleading answer:

  • CPMs move on their own. They drop at the start of each month and quarter and rise towards the end, and swing by season. A change made on the 25th will look great compared with the 5th. See our seasonal RPM calendar for the pattern.
  • Traffic mix changes. A news spike or a Google update brings different visitors from different countries, who earn different amounts.
  • Buyers react. More ads can raise revenue at first, then lower CPMs as viewability drops and buyers bid less.

A proper A/B test runs both versions at the same time, on comparable visitors, so all of these effects hit both groups equally.

What to measure

Diagram of a publisher ad layout A/B test: visitors split at random into two groups, ad requests tagged with a variant key-value, results compared on revenue per session
Split by visitor, tag by variant, compare per session.

Pick one main metric before you start, and a few guard-rail metrics that must not get worse:

MetricWhy it mattersUse as
Revenue per 1,000 sessions (or per user)Captures both ad earnings and whether people keep reading. This is what pays the billsMain metric
Pages per sessionA layout that annoys readers shows up here firstGuard rail
Page RPMUseful for context, but misleading alone: more ads per page can raise RPM while sessions get shorterContext only
Viewability and CTRBuyers watch these. A drop can lower future CPMsGuard rail
Core Web Vitals (CLS, LCP)Layout shift and slow loading hurt readers and searchGuard rail
Bounce or exit rateShows readers leaving after one pageGuard rail

Why revenue per session? Imagine variant B adds an ad between every two paragraphs. Page RPM rises 15%, but readers view 20% fewer pages. Revenue per session falls, and over months the site loses returning readers. Ezoic, for example, reports EPMV (earnings per 1,000 visitors) next to page RPM for exactly this reason. Google's own research on search ads found that showing more ads raised short-term revenue but taught users to ignore ads over time, which led Google to cut ad load on mobile search by 50% with neutral or better long-term results.

How to split traffic

The unit you split by decides what you can measure:

Split byHowGood forNot good for
Visitor (user)Assign each visitor to A or B with a stored random ID or a hash, and keep them thereLayouts, ad density, sticky ads, anything that changes the reading experienceNothing; this is the default for layout tests
Pageview or impressionEach pageview or ad request picks A or B at randomSettings that do not change what readers see, such as floor prices or ad server settingsLayout tests: a visitor sees both layouts, so you cannot measure session effects
Page or sectionSome articles get A, others BQuick checks when you cannot split usersFair comparisons: different pages attract different visitors and advertisers

Note that Google Ad Manager's built-in experiments split by impressions, and Prebid's floors module splits per auction. Both are fine for pricing tests, but for layout tests you need your own split by visitor.

A simple setup for a layout test

  1. Assign the variant. On the first page view, generate a random number and store "A" or "B" in a first-party cookie or localStorage. Keep the visitor in the same group for the whole test.
  2. Render the layout for that group: different ad positions, a sticky unit on or off, lazy loading on or off.
  3. Tag every ad request with the variant as a key-value in Google Ad Manager, for example abtest=placement_b. Make the key reportable before the test starts; Ad Manager does not fill in reporting for dates before the key was added.
  4. Send the variant to analytics (for example as a user property in GA4) so you can compare sessions, pages per session and engagement.
  5. Join the data: ad revenue by key-value from Ad Manager, sessions by variant from analytics, then revenue per session for each group.

If you use AdSense instead of Ad Manager, you cannot tag requests with key-values the same way. Use AdSense's own experiments for the settings it supports, or use separate ad units per variant and compare their earnings.

Built-in tools: AdSense and Ad Manager experiments

Google Ad Manager help page listing manual experiment types such as inventory rules, unblock categories, pricing rules and native ad style
Google Ad Manager lets you test several settings without code changes.

AdSense Experiments

  • What you can test: Auto ads settings (formats and ad load, or Auto ads on versus off) and blocking controls (ad categories and sensitive categories). Only one Auto ads experiment can run per site at a time.
  • How it works: AdSense splits traffic between the original and the variation and reports a probability that the variation earns more. You can choose the winner or let Google apply it.
  • Duration: results can take from several days to one or two months, depending on traffic. Experiments stop automatically after 90 days.
  • Limits: it measures revenue, not reader behaviour, and the old Ad balance experiments were retired in 2020.

  • What you can test: pricing rules (floors), unblocking categories, native ad styles, ad formats such as web interstitials and anchors, interstitial frequency and triggers, yield groups, Prebid trafficking and more.
  • How it works: you choose the share of impressions for the variation (for example 50/50). Google recommends running for at least 7 days, and allows up to 31.
  • Opportunities: Ad Manager also suggests experiments based on your data. When Google launched manual experiments in 2021, it said publishers in the beta saw an average revenue lift of 6.5% from the ones they applied.
  • Watch out: Google advises checking total network revenue too, because buyers can change their behaviour in both groups.

For floor price tests, also see our guide on what floor price to set; floors are one of the most common things publishers test, and Ad Manager's pricing rule experiments are well suited to them.

How long to run a test, and how big it needs to be

Ad revenue per user is very uneven: most visitors earn almost nothing and a few earn a lot. That makes revenue tests noisier than click tests, so they need more traffic and time than people expect.

  • Run at least one full week, preferably two. Weekday and weekend traffic behaves differently. Microsoft's experimentation team recommends at least a week, and longer when results are close.
  • Avoid big calendar edges. Do not start a test on Black Friday or across the turn of a month or quarter if you can help it, or make sure both groups run over the same dates.
  • Decide the size in advance. A common rule of thumb for the users needed per group is 16 x variance / (smallest difference you care about)². If you check results every day and stop when one side looks ahead, your chance of a false winner rises from 5% to about 26%, as Evan Miller showed in a well-known explanation.
  • Expect small effects. Most good layout changes move revenue per session by a few percent. To detect a 3% difference reliably you often need hundreds of thousands of sessions per group. If you do not have that traffic, test bigger changes.
  • Watch for novelty. Readers sometimes react to any change at first. If the effect fades during the test, trust the later weeks.

Checking if the result is real

For revenue per session, compare the average per user in each group with a Welch t-test, or with a bootstrap (resample the users thousands of times and see how often B beats A). Tools such as GrowthBook do this for you. Two practical tips from Microsoft researchers' experimentation rules of thumb: cap extreme values (for example a few users with huge revenue) before testing, because a handful of outliers can decide the result, and treat any result that looks too good to be true with suspicion.

Variant A (current)Variant B (sticky footer added)
Sessions212,400211,900
Ad revenue$1,486$1,577
Revenue per 1,000 sessions$7.00$7.44 (+6.3%)
Page RPM$4.37$4.80 (+9.8%)
Pages per session1.601.55 (-3.1%)
CLS (75th percentile)0.040.05
Illustrative example of a two-week test. B wins on revenue per session, but the drop in pages per session should be watched over a longer period.

What publishers typically test

TestWhat to watchNotes
Sticky footer or anchor ad on mobileRevenue per session, pages per session, CLSUsually earns more; keep it within the 30% screen rule
Ad density (number of in-content ads)Pages per session, viewabilityMore is not always better; see how many ads per page
Lazy loading thresholdsViewability, fill, revenueSee does lazy loading increase revenue
Position of the first adViewability, bounce rateHigher is more viewable but can push content down
Ad sizes per slot (for example 300x250 vs 300x600)Revenue per slot, CLSReserve space for the largest size to avoid layout shift
Ad refresh rulesViewability, CPM per refreshMust follow ad refresh rules and be declared in Ad Manager
Floor pricesRevenue, fill rateUse Ad Manager pricing rule experiments or Prebid floors
Number of header bidding partnersRevenue, page speed, timeoutsSplit by user or by auction; see how many SSPs to use

Real results from publishers

  • Netzwelt, a German tech site, reworked its ad layout for speed and viewability: a sticky top ad, fewer large units at the top, lazy-loaded ads lower down and reserved ad space. In Google's case study it reported 18% more ad revenue, 20% to 30% higher CPMs and 27% more pageviews. That was a relaunch rather than a controlled test, which shows how hard it is to separate effects.
  • Fandom ran real-traffic A/B tests of ad placeholders and lazy loading. A 250px placeholder above the fold reduced layout shift but cost space; most top ads were under 100px, so they cut it to 100px. Some lazy loading variants reduced layout shift but also reduced viewability and were not rolled out.
  • Ezoic reported in 2026 that its AI placement testing, compared against a control group across about 950 sites, raised earnings per 1,000 visitors by 7.7% on average. That is a vendor-reported number, but it gives a realistic sense of size: good optimisation moves revenue by single-digit to low double-digit percentages, not by multiples.

Mistakes and traps

  • Testing layouts that break ad policy. Never test ads placed to cause accidental clicks, ads next to navigation or download buttons, misleading labels, or auto-refresh that is not allowed. A winning variant that violates policy can cost you the account.
  • Clicking your own ads to check a variant. That is invalid traffic. Check variants with ad preview tools or test ad units.
  • Hurting SEO. Google says A/B tests are fine if you do not cloak (show Googlebot something different on purpose), use rel=canonical on any variant URLs, use 302 rather than 301 redirects, and end the test when it is done.
  • Too many changes at once. If B moves three ads and adds a sticky unit, you will not know which change made the difference.
  • Ending tests too early. A three-day test on a site with modest traffic is mostly noise.
  • Ignoring the long term. Recheck big wins after a few months. Ad blindness and reader habits can erode gains.

Frequently asked questions

How long should an ad placement A/B test run?

At least one full week to cover weekday and weekend traffic, and preferably two or more. Google recommends at least 7 days for Ad Manager experiments; AdSense experiments can take several days to two months depending on traffic.

Should I measure page RPM or revenue per session?

Revenue per session (or per user) as the main metric. Page RPM can rise while readers view fewer pages, which lowers total revenue.

Can I A/B test ads in AdSense?

Yes, for Auto ads settings and blocking controls, using AdSense Experiments. For layout changes outside Auto ads you need your own split with separate ad units.

How do I report results per variant in Google Ad Manager?

Pass the variant as a key-value on every ad request (for example abtest=b), make the key reportable before the test starts, and report revenue by that key-value.

Do ad A/B tests hurt SEO?

Not if you follow Google's guidance: do not cloak, use rel=canonical on variant URLs, use temporary redirects and end the test when it is finished.

How much traffic do I need for an ad test?

It depends on the effect size. Detecting a change of a few percent in revenue per session often needs hundreds of thousands of sessions per group; smaller sites should test bigger changes or run longer.

Sources

Updated December 3, 2026.

Alvils Karlštrems

About the author

Alvils Karlštrems

Alvils Karlštrems is the founder of bannerTag and COO at a header bidding and monetization company. He has worked in programmatic advertising and ad operations since 2017, with hands-on experience in Prebid, Google Ad Manager and publisher ad stacks. Have a question about your ad setup? Connect with Alvils on LinkedIn and send him a message.

View all posts