Skip to content
revrolo

How to calculate AdSense RPM for every URL with Google Analytics 4

Updated November 20, 2026 · 6 min read

Page RPM is the most useful number on an AdSense site, and AdSense won't calculate it for you. GA4 has all the data you need to get AdSense RPM by page, as long as you pick the right metrics and avoid three or four traps that skew the result. Here is the complete method, with a worked example.

Quick refresher: what RPM measures

RPM (revenue per mille, per thousand) is calculated like this:

RPM = earnings ÷ pageviews × 1,000

A page that earned $18.40 from 4,600 views has an RPM of 18.40 ÷ 4,600 × 1,000 = $4.00. In other words, every thousand views brings in $4. The examples here are in dollars; your own figures will display in your account's currency.

AdSense also shows an impression RPM (earnings per thousand ad impressions). It helps judge auction quality, but to compare posts with each other, page RPM is what counts: it already includes how many ads were shown, how viewable they were and how often they were clicked.

Before you start

AdSense must be linked to your GA4 property, otherwise the revenue metric stays empty. The guide to link AdSense to Google Analytics 4 covers the setup. Also check that:

  • the GA4 tag is present on every page that shows ads;
  • the GA4 property currency (Admin > Property details, under Property settings) matches your AdSense account currency;
  • the link has been active for at least a few weeks, so you have a usable period. Linking is not retroactive.

Build the exploration

Create the table

In GA4, open Explore and start a Free form exploration. In the Variables column:

  1. Import the dimension Page path and screen class. This is the URL path without the domain or query parameters.
  2. Import the metrics Views and Total ad revenue. Add Publisher ad impressions if it's available; it helps with diagnosis later.
  3. Drag the dimension into Rows and the metrics into Values.
  4. Set the date range to 28 days.

Raise the number of rows shown to the maximum (the "Show rows" setting at the bottom of the Tab settings column), otherwise you'll only see your top pages.

Add RPM directly in GA4

GA4 lets you create calculated metrics at the property level (Admin > Custom definitions > Calculated metrics). If you have Editor access, create a "Page RPM" metric with the formula {totalAdRevenue} / {screenPageViews} * 1000. It becomes available in explorations. Standard (free) properties have a small quota of calculated metrics, so save them for what you actually use.

If you'd rather not touch the property configuration, export the table to Google Sheets or CSV and calculate RPM in a column.

Worked example over 28 days

Here is an export from a gardening advice site with mostly US, UK and Canadian traffic, trimmed to six rows:

Page Views Earnings RPM
/how-to-prune-roses 24,000 $81.60 $3.40
/vegetable-garden-for-beginners 15,000 $60.00 $4.00
/best-robot-lawn-mower 4,000 $38.00 $9.50
/do-i-need-a-permit-for-a-shed 2,500 $27.50 $11.00
/garden-quotes 10,000 $11.00 $1.10
/ 6,000 $4.80 $0.80

Quick read: the homepage and the quotes page drag the average down, which is normal (thin content, short visits). The two pages at $9.50 and $11 are about a purchase or an expensive project: advertisers pay more for those audiences. Those are the pages worth an SEO push.

The site-wide RPM for the period is:

(81.60 + 60.00 + 38.00 + 27.50 + 11.00 + 4.80) ÷ (24,000 + 15,000 + 4,000 + 2,500 + 10,000 + 6,000) × 1,000 = 222.90 ÷ 61,500 × 1,000 = $3.62

Be careful: this is not the average of the row RPMs, which would be $4.97. For a site-wide RPM, always divide total earnings by total views; averaging page RPMs gives a small page the same weight as your biggest one. You can check the math in the RPM calculator.

The traps that skew RPM by page

URL parameters and duplicates

If your URLs carry campaign or pagination parameters, the same page can appear on several rows. The Page path and screen class dimension strips the query string, which fixes most cases. AMP variants or URLs with and without a trailing slash can still show up separately: merge them in the spreadsheet before calculating.

Consent

In the EU, UK and a few other regions, a significant share of visitors decline cookies. Depending on your consent mode setup, GA4 either models those visits or ignores them, while AdSense keeps serving non-personalized ads. The result: missing views on one side, unattributed revenue on the other. Since the bias hits all pages roughly the same way, comparing pages remains valid. The absolute RPM, however, can be 5 to 15% off from what AdSense shows. If most of your audience is in the US, the gap is usually smaller.

Low-volume pages

A page with 150 views and $2.10 shows an RPM of $14. Two clicks more or less and it jumps to $4 or $25. Set a threshold (500 views over the period, for example) and ignore the rest, or widen the date range.

The 24-hour delay

Ad revenue per page reaches GA4 about a day late. If your range includes today or yesterday, the RPM for those days will be artificially low. End the range the day before yesterday for a clean calculation.

Realtime

GA4's Realtime report and the matching API don't provide ad revenue. They don't give the page path either: the available dimension is the page title (unifiedScreenName), over the last 30 minutes. To estimate live earnings you have to match the page title back to its URL, then multiply traffic by historical RPM. That is what the guide on AdSense real-time earnings covers.

Pages without ads

Contact, privacy policy, internal search and category pages without ad slots log views but no revenue. They pull the site-wide RPM down without saying anything about monetization. Exclude them from the calculation, or keep them in a separate group, so your average RPM reflects the pages that actually carry ads. On a 300-post blog, these pages often account for 5 to 10% of views.

Mixed traffic geography

Two pages with the same placements can show very different RPMs simply because one ranks in the US and the other gets most of its views from India or the Philippines. Before labeling a page as low-value, add Country as a secondary dimension and check where its views come from. Sometimes the fix is a better-targeted title, not a new ad layout.

What to do with RPM by page

Once you have the table, three uses come up every week:

  • Prioritize updates. A page at $9 RPM that gains 1,000 views a month earns $9 more; a page at $1 earns $1 more. For the same effort, the choice is easy.
  • Spot anomalies. Compare 7-day RPM with the previous 14 or 28 days. A drop of more than 30% on a page that keeps its traffic deserves a check. The guide on why your AdSense RPM dropped lists the usual causes.
  • Choose topics. The high-RPM topics on your own site are a better guide than any market average, though average AdSense RPM by niche helps you see where you stand.

What Revrolo automates

Revrolo runs this calculation for every page, every day, from your GA4 and AdSense data, with read-only access. Each page's 7-day average RPM then feeds the realtime estimate: GA4 traffic from the last 30 minutes, matched to your URLs through the page title, is multiplied by that RPM, and the total is recalibrated every 20 minutes against the official AdSense figure. History is kept for 12 months and exportable to CSV, and an alert fires when a page's RPM or CTR drops sharply against its 14-day baseline.

All of it is free. If you want to see the pages table before connecting your account, open the live demo.

Frequently asked questions

Which GA4 views metric should I use for RPM?+

Use Views, which counts pageviews (page_view events). Users or sessions give you a different number, revenue per visitor, which can't be compared with AdSense page RPM.

My GA4 RPM is lower than in AdSense. Is that normal?+

Yes, fairly often. GA4 can count views on pages without ads and leave part of the revenue unattributed because of consent. Focus on comparing pages with each other, using the same source.

Can I calculate RPM per page in real time with GA4?+

Not directly. The Realtime API returns neither ad revenue nor the page path, only the page title over the last 30 minutes. You have to apply a historical RPM to realtime traffic.

Should I calculate RPM over 7 or 28 days?+

Both have a use. Seven days reacts quickly to changes, 28 days smooths out noise on low-traffic pages. For a page under 200 views a day, use 28 days.