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

Pick one main metric before you start, and a few guard-rail metrics that must not get worse:
| Metric | Why it matters | Use as |
|---|---|---|
| Revenue per 1,000 sessions (or per user) | Captures both ad earnings and whether people keep reading. This is what pays the bills | Main metric |
| Pages per session | A layout that annoys readers shows up here first | Guard rail |
| Page RPM | Useful for context, but misleading alone: more ads per page can raise RPM while sessions get shorter | Context only |
| Viewability and CTR | Buyers watch these. A drop can lower future CPMs | Guard rail |
| Core Web Vitals (CLS, LCP) | Layout shift and slow loading hurt readers and search | Guard rail |
| Bounce or exit rate | Shows readers leaving after one page | Guard 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 by | How | Good for | Not good for |
|---|---|---|---|
| Visitor (user) | Assign each visitor to A or B with a stored random ID or a hash, and keep them there | Layouts, ad density, sticky ads, anything that changes the reading experience | Nothing; this is the default for layout tests |
| Pageview or impression | Each pageview or ad request picks A or B at random | Settings that do not change what readers see, such as floor prices or ad server settings | Layout tests: a visitor sees both layouts, so you cannot measure session effects |
| Page or section | Some articles get A, others B | Quick checks when you cannot split users | Fair 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
- 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.
- Render the layout for that group: different ad positions, a sticky unit on or off, lazy loading on or off.
- 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.
- Send the variant to analytics (for example as a user property in GA4) so you can compare sessions, pages per session and engagement.
- 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

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.
Google Ad Manager Experiments
- 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) | |
|---|---|---|
| Sessions | 212,400 | 211,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 session | 1.60 | 1.55 (-3.1%) |
| CLS (75th percentile) | 0.04 | 0.05 |
What publishers typically test
| Test | What to watch | Notes |
|---|---|---|
| Sticky footer or anchor ad on mobile | Revenue per session, pages per session, CLS | Usually earns more; keep it within the 30% screen rule |
| Ad density (number of in-content ads) | Pages per session, viewability | More is not always better; see how many ads per page |
| Lazy loading thresholds | Viewability, fill, revenue | See does lazy loading increase revenue |
| Position of the first ad | Viewability, bounce rate | Higher is more viewable but can push content down |
| Ad sizes per slot (for example 300x250 vs 300x600) | Revenue per slot, CLS | Reserve space for the largest size to avoid layout shift |
| Ad refresh rules | Viewability, CPM per refresh | Must follow ad refresh rules and be declared in Ad Manager |
| Floor prices | Revenue, fill rate | Use Ad Manager pricing rule experiments or Prebid floors |
| Number of header bidding partners | Revenue, page speed, timeouts | Split 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
- Google AdSense: About experiments
- Google AdSense: Auto ads experiments
- Google Ad Manager: Manual experiments
- Google: Earn more revenue with manual experiments (2021)
- Google Ad Manager: Key-values reporting
- Google Research: Focus on the long-term (KDD 2015)
- Evan Miller: How not to run an A/B test
- Kohavi et al.: Seven rules of thumb for website experimenters
- Microsoft Research: External validity of online experiments
- GrowthBook: Statistics details
- Prebid: Price floors module
- Ezoic: Using A/B tests
- PPC Land: Ezoic AI optimization test results (July 2026)
- web.dev: Netzwelt case study
- Fandom Engineering: Ads and data-driven web performance
- Google Search Central: Website testing and Google Search
- Google AdSense: Ad placement policies
Updated December 3, 2026.



