If you're running a modern web app like Next.js, React, or Vue, you've probably noticed something strange in your AdSense dashboard:
Page views are way lower than expected, but ad impressions seem fine.
This isn’t a bug — it’s how AdSense works (or more accurately, how it doesn’t work with SPAs).
Event | Counts AdSense Page View? | Counts Ad Impression? |
---|---|---|
Full page reload (hard refresh) | ✅ Yes | ✅ Yes |
SPA route change (no reload) | ❌ No | ✅ Yes (if ad is rendered with push({}) ) |
AdSense defines a page view as:
A full page load where at least one ad is rendered.
In SPAs, navigating between pages does not reload the page, so AdSense doesn't increment the page view counter — even if new content is shown and new ads appear.
Meanwhile, each time an ad is rendered, it does count as an ad impression, whether or not the URL changed.
adsbygoogle.push({})
After Route ChangeMany developers try this:
router.events.on('routeChangeComplete', () => {
(adsbygoogle = window.adsbygoogle || []).push({});
});
But this doesn't work reliably. Why?
Because by the time that push runs, the <ins class="adsbygoogle">
tag might not yet be in the DOM. So nothing renders — no ad, no impression.
You should call adsbygoogle.push({})
inside your ad component, once it's mounted in the DOM.
Here’s a React example:
import { useEffect, useRef } from "react";
export default function AdUnit({ adClient, adSlot }) {
const adRef = useRef(null);
useEffect(() => {
if (window.adsbygoogle && adRef.current) {
try {
(window.adsbygoogle = window.adsbygoogle || []).push({});
} catch (e) {
console.error("AdSense push failed:", e);
}
}
}, []);
return (
<ins
className="adsbygoogle"
style={{ display: "block" }}
data-ad-client={adClient}
data-ad-slot={adSlot}
data-ad-format="auto"
data-full-width-responsive="true"
ref={adRef}
/>
);
}
This ensures:
The container is in the DOM
AdSense can properly render the unit
An ad impression is counted
If you're using a SPA, ignore AdSense page views. They are nearly meaningless.
Focus on:
Ad impressions (what actually earns you money)
eCPM based on impressions
Making sure your ads are visible and filled
And yes — your AdSense page views will always be underreported unless the user refreshes the entire site.
SPAs broke the traditional pageview model years ago. Unfortunately, AdSense still hasn’t caught up. If you're relying on page view metrics to evaluate performance, you’re looking at a distorted picture.
Use the metrics that matter: impressions and revenue. Just make sure your ad units mount correctly, push cleanly, and fill reliably.