On a headless site a pageview is sent to analytics once - when the document loads. When a visitor moves on, the document is not reloaded, and the new pageview never reaches the report. For the numbers to match reality, pageviews and key actions have to be sent from code.
In our projects we keep seeing the same picture: one pageview per session in the report, even though the person went through five pages. The site works, the tag is installed, visitors show up in realtime. What breaks is not the tag installation, but the moment the event is sent.
The behavior is documented. As of Q4 2026, GA4 sends a pageview when the page loads, and for sites with client-side navigation enhanced measurement has an advanced setting that sends a pageview on browser-history events, listening to pushState, popState and replaceState. The setting covers the typical case and leaves everything else open.
Below is how the tag works, the three symptoms that reveal the loss, and what to check in a single pass.
The danger is that analytics does not fail with an error. The numbers look plausible, and that is exactly why nobody questions them. Budget gets allocated against them for months, and the discrepancy surfaces by accident - when someone compares real inbound leads against the page report.
Event: a unit of data the site sends to analytics on a specific action - a page load, a form submission, a button click.
dataLayer: a shared object on the page where the site puts events and their parameters, and the tag system picks them up from there and passes them on to analytics.
How Analytics Counts a Pageview and Why This Breaks on a Modern Site
The classic tag model is tied to the document load. The browser requests new HTML, runs the analytics script, and the script sends a pageview with the current address and title. Each page is a separate load, and each load is a separate pageview.
On a site with client-side navigation this does not happen. When a visitor follows an internal link, the code swaps the content and the address in the browser bar, but the document stays the same. The analytics script has already run and does not run again.
The result is predictable. GA4 receives exactly one pageview per session - the one that went out when the site was first opened. The remaining pages do not exist as far as the report is concerned, even if the visitor spent ten minutes on them. This is not a tag failure, it is a direct consequence of the site architecture.
GA4 has a built-in answer to this. Enhanced measurement lets you turn on sending a pageview when browser history changes, and the Google Analytics help center documents which calls are tracked in that case. It is a working mechanism, but it has two weak spots.
First: the event fires at the moment history changes, while the title and content of the page on a headless stack update slightly later. The pageview goes out with the old title, and the report fills up with rows that do not exist on the site.
Second: some navigation does not go through browser history at all, or goes through it in an unexpected order. Multi-screen form steps, catalog filters, modal windows acting as pages and prefetching of the next screen land in analytics at random.
Three Symptoms That Show Events Are Being Lost
The loss is visible in the reports, without access to the code. Three signs show up more often than the rest.
One pageview per session on a long session. The average number of pageviews sits around 1.0 while the average session duration is two to three minutes. On a multi-page site that combination means navigation is not reaching analytics.
Bounce rate behaves unnaturally. In GA4, bounce rate is the inverse of the share of engaged sessions. A session counts as engaged if it lasted longer than 10 seconds, contained a key event, or included two or more page views.
When pageviews are lost, only one of the three conditions is left - the time threshold. Bounce rate collapses to almost zero, because anyone who stayed on the site longer than 10 seconds automatically counts as engaged. If key events are not configured either, the picture flips: bounce rate jumps to 80-90% and looks like a collapse in traffic quality.
The page report shows only entry points. Open the list of pages and compare it against your sitemap. If it holds the home page and a couple of landing pages, while service sections, the catalog and articles return single-digit pageviews, the problem is not traffic - it is that internal navigation is not being recorded.
A quick cross-check is the landing page report. If the list of landing pages almost matches the list of all pages in the report, analytics has not recorded a single internal page.
What Exactly You Need to Send Manually
The minimum set for a headless site has three parts, and none of them appears on its own.
A pageview on address change. It is sent after the page has updated its address, title and content, not at the same moment the navigation starts. The order matters more here than the sending method.
User actions. A lead submission, a click on a phone number or an email address, a file download, a move into checkout. These are the events analytics exists for in the first place, and they are the ones most often left unconfigured.
Page parameters. Page type, section, language, product or service identifier. Without them the report shows addresses but not structure: you cannot compare all service pages against the catalog. The rule of thumb is simple - if a parameter cannot support a meaningful grouping, it is redundant, and if a grouping you need will not assemble, a parameter is missing.
A separate trap is events fired at the moment of leaving the page. When navigating to an external domain the browser unloads the document, and the analytics request may not make it out. Such events are more reliably recorded before the navigation or on the server side.
Automatic enhanced measurement does not cover everything, because it relies on markup rather than on application state. A form submission is captured through the standard browser event, and if the form goes out through an API without a reload, there is nothing to capture. Something else matters more: the fact that a button was clicked is not the same as a successful lead, and that is a separate problem - why form submissions never reach the recipient is worth working through before you build goals on top of them.
How a Reliable Data Layer Works
A reliable design has two independent parts. The site writes events into a shared object on the page, and the tag system reads them from there and distributes them to the recipients: GA4, ad platforms, CRM. The site knows nothing about who will send the data where next, and connecting a new recipient does not require code changes.
The second principle matters more than the first: events are sent from code, rather than attached to elements by selectors. A tag-system rule along the lines of “count a click on a button with this class” survives exactly until the next markup refactor, after which it quietly stops working. Code, on the other hand, knows the state: a successful server response arrived, a record was created, an order total was calculated.
The third effect is verifiability. The contents of the shared object are visible in the browser console, so you can check exactly what went out without digging through the tag system settings.
Conceptual sketch of sending events through the data layer
// A sketch, not tied to any specific framework or its version.
window.dataLayer = window.dataLayer || [];
// 1. Send the pageview AFTER the address and title have updated
function trackPageView(path, title, pageType) {
window.dataLayer.push({
event: 'spa_page_view',
page_path: path,
page_title: title,
page_type: pageType
});
}
// 2. Send the form event on a successful server response, not on click
async function submitLeadForm(payload) {
const response = await sendToBackend(payload);
if (response.ok) {
window.dataLayer.push({ event: 'lead_submitted', form_id: payload.formId });
}
}
You choose the event names and the set of parameters - what matters is that sending is tied to application state, not to markup.
How exactly tags read this object, and what limitations each sending method carries, is covered in Google’s tag platform documentation. If the site needs to be wired to a CRM, a payment system and analytics so that events reach every system without duplicating, that is a separate layer of work - connecting a site to external systems.
A Step-by-Step Check of Your Own Analytics
1. Walk Through the Site and Watch the Realtime Report
Walk through five or six pages of the site in a row with the GA4 realtime report open. If the pageview count stops growing after the first navigation, the diagnosis is confirmed in a minute.
2. Compare Pageviews Against Sessions
Take a month of data and divide pageviews by sessions. A value around 1.0 on a multi-page site is not user behavior, it is lost events.
3. Check the Script Loading Order
A tag loaded after the first navigation will miss the initial pageview. Deferred loading is often turned on for speed, and analytics gets caught up in it along the way. How this affects the site overall is covered in the piece on third-party scripts and site speed.
4. Check Cookie Consent as a Cause of Missing Events
If the consent banner blocks tags until a choice is made, some events will not be sent at all - that is expected behavior, not a bug. Check what happens to the data on a refusal and whether consent mode is configured. The details are in the breakdown of GDPR cookie consent on a headless site. The tag settings themselves and the conditions that trigger them are checked in the Google Tag Manager help center.
The order of magnitude from practice looks like this. On a services site with 10-15 thousand visits a month, the report showed 1.1 pageviews per session at an average duration of 2 minutes 40 seconds. After pageviews and form events were sent manually, the figure rose to 2.8-3.4, and the share of sessions with two or more pages climbed from low single digits to 40-55%. These are typical ranges, not a measurement from one project: traffic did not grow, only the volume of what analytics could see.
Common Mistakes
- The pageview is sent before the title updates. Pages with the wrong names show up in the report, and there is no way to merge them afterwards.
- Double sending. The automatic browser-history setting is on while manual sending runs at the same time. Pageviews are counted twice, and bounce rate drops to zero.
- Events are tied to selectors. Any markup change switches off data collection without a single console error.
- The goal is set on a button click. Attempts get counted, not leads: sending failures land in the report as conversions.
- Page parameters are not passed. The report consists of addresses that will not assemble into a single grouping.
Who This Matters Most For
This affects teams that build their site on a modern stack and make decisions from reports: product companies with a landing page and a blog, SaaS with free sign-up, agencies running paid traffic to a headless site. The larger the share of paid traffic, the more expensive the mistake, because bids, placements and creatives are optimized against events that are not in the system. If the site ships fast and the markup changes every two weeks, the data layer stops being perfectionism and becomes the condition under which reporting means anything at all.
Frequently Asked Questions
Why GA4 Shows Visitors but Does Not Count Navigation Between Pages
Because these are two different mechanisms. A user’s presence is registered through the active session and the automatic events that accompany it, while a pageview is sent as a separate event on document load. On a site with client-side navigation the document loads once, so the user is visible and their route is not. It takes a minute to check - open the realtime report and walk through several pages in a row, watching the pageview counter.
Is Enabling Automatic Browser History Tracking Enough
For a simple site with ordinary links it often is. The problems start where navigation does not reduce to an address change: multi-step forms, filters, modal windows, and cases where the page title updates later than the navigation itself. On top of that, the automatic setting does not send lead, contact-click or payment events, and those will have to be sent from code in any case. The practical route is to turn the automation on, verify that titles are correct in the report, and fill in what is missing by hand.
How to Tell Lost Events From a Real Traffic Drop
By the shape of the report. In a traffic drop the number of sessions and users falls while the average number of pageviews per session stays the same. In event loss the sessions are still there, but pageviews per session collapse towards 1.0 and internal sections disappear from the page report. An extra check is a comparison against server logs or a CDN report, which show every page request regardless of what the browser sent.
The Bottom Line
On a headless site, analytics stops being a question of installing a tag and becomes a question of architecture: the pageview goes out from code after the page updates, events are tied to application state, and tags read one shared data layer. The check takes a single pass through the site with the realtime report open, and it pays for itself before another budget goes out against wrong numbers. If your reports already diverge from reality and it is unclear where exactly the events are getting lost, send Exceltic.dev the site address and a description of your stack. We will go through the sending scheme and tell you what can be fixed in settings and what needs code.