Pages per session tells you how many pages users visit during a single session—a key measure of engagement and content depth. In Google Analytics 4, this metric works differently than Universal Analytics because GA4 uses events instead of pageviews as its core model. You can view this metric directly in standard reports or pull custom data from the API.
Understanding Pages Per Session in GA4
GA4 calculates pages per session differently than older versions. Here's what you need to know.
Know what GA4 counts as a page
In GA4, a 'page' is measured by the page_view event. Every time the page_view event fires, GA4 increments the page count for that session. This is different from Universal Analytics, which tracked pageviews separately. Make sure your implementation actually fires page_view events on each page load—GA4 doesn't do this automatically if you're using gtag.js without explicit event setup.
// GA4 fires page_view automatically when gtag.js loads
gtag('config', 'GA_MEASUREMENT_ID', {
'page_path': '/your-page',
'page_title': 'Page Title'
});
// OR explicitly fire a page_view event
gtag('event', 'page_view', {
'page_path': '/your-page',
'page_title': 'Page Title'
});Understand session duration and idle time
GA4 defines a session as a group of user interactions within a 30-minute inactivity window (customizable). If a user returns after 30 minutes of inactivity, it's a new session. This affects your pages per session calculation—a user who visits 5 pages, waits 35 minutes, then visits 3 more pages counts as two sessions with 5 and 3 pages respectively, not one session with 8 pages.
page_view events when routes change. GA4 won't automatically detect client-side navigation.View Pages Per Session in GA4 Reports
The fastest way to see this metric is through GA4's built-in reports.
Navigate to the Engagement overview
In your GA4 property, go to Reports > Engagement > Engagement overview. The top section shows key engagement metrics, including Pages / screens per session. This is your pages per session metric calculated by GA4 for the selected date range. You can break it down by adding a dimension like traffic source, device, or user acquisition channel.
Use the Reporting API to fetch the data programmatically
For automated reporting or integration into your own dashboards, use the GA4 Reporting API. Request the screensPerSession metric—note that 'screens' includes both web pages and app screens since GA4 treats them identically.
const {BetaAnalyticsDataClient} = require('@google-analytics/data');
const client = new BetaAnalyticsDataClient();
async function getPagePerSession(propertyId) {
const request = {
property: `properties/${propertyId}`,
dateRanges: [
{
startDate: '2025-01-01',
endDate: '2025-12-31'
}
],
metrics: [
{
name: 'screensPerSession'
}
]
};
const [response] = await client.runReport(request);
console.log(response.rows[0].metricValues[0].value);
}
getPagePerSession('YOUR_PROPERTY_ID');screensPerSession, not pagesPerSession. This is intentional—GA4 unifies pages and screens.Calculate Pages Per Session by Segment or Dimension
Filter and break down pages per session to understand which user groups or traffic sources drive engagement.
Add a filter or dimension in the GA4 UI
In the Engagement overview report, use Add filter at the top to isolate specific traffic sources, devices, or user segments. GA4 will recalculate pages per session for that filtered subset. You can also click View full report and add a dimension breakdown to see pages per session side-by-side for each value (e.g., mobile vs. desktop, organic vs. paid).
Query the API with dimensions for custom analysis
Use the Reporting API with dimensions to break down pages per session by any attribute. Include sessions as a secondary metric to provide context—a high pages per session with 10 sessions is less meaningful than with 10,000 sessions.
const {BetaAnalyticsDataClient} = require('@google-analytics/data');
const client = new BetaAnalyticsDataClient();
async function getPagePerSessionByDevice(propertyId) {
const request = {
property: `properties/${propertyId}`,
dateRanges: [
{
startDate: '2025-01-01',
endDate: '2025-12-31'
}
],
metrics: [
{
name: 'screensPerSession'
},
{
name: 'sessions'
}
],
dimensions: [
{
name: 'deviceCategory'
}
]
};
const [response] = await client.runReport(request);
response.rows.forEach(row => {
const device = row.dimensionValues[0].value;
const pagesPerSession = row.metricValues[0].value;
const sessionCount = row.metricValues[1].value;
console.log(`${device}: ${pagesPerSession} pages/session (${sessionCount} sessions)`);
});
}
getPagePerSessionByDevice('YOUR_PROPERTY_ID');Common Pitfalls
- Confusing pages per session with average session duration. Pages per session counts page interactions; duration measures time spent. A user visiting 10 pages in 2 minutes has high pages per session but low session duration.
- Forgetting that GA4 requires
page_viewevents to fire. If your site isn't firing these explicitly (especially in single-page apps), GA4 won't count pages accurately. Verifypage_viewis firing in the Events report. - Not accounting for the 30-minute session timeout. Two users with similar browsing patterns but different pacing may show different pages per session if one exceeds the idle timeout.
- Using the API metric name
screensPerSessionwithout understanding it includes both web pages and app screens. For web-only analysis, filter by deviceCategory or platform.
Wrapping Up
Pages per session is a straightforward engagement metric in GA4—view it in the Engagement overview report, break it down by dimension using filters, or pull custom data via the Reporting API. The key is making sure your page_view events are firing correctly on every page load. If you want to track this automatically across tools, Product Analyst can help.