Page Summary
-
By default, Google Analytics automatically sends a
page_viewevent when a page loads or the browser history changes. -
You can disable automatic pageview measurement and manually send
page_viewevents, which is useful for single-page applications or infinite scrolling. -
To manually control pageviews, you need to disable the default behavior by setting
send_page_viewtofalsein the Google tag snippet. -
You can then manually send
page_viewevents using thegtag('event', 'page_view', {...})call. -
Ensure you disable automatic pageviews before sending manual ones to avoid duplicate pageviews.
Whenever someone loads a page of your website or their browser history state is
changed by the active site, an enhanced measurement
event called
page_view is sent from your website to Google Analytics. Because the event is
sent automatically, you don't need to send pageview data to Analytics manually.
However, when you want to manually control how pageviews are sent (for example, single-page applications or infinite scrolling), you can disable pageviews and then manually send them from your website. Learn how to Measure single-page applications.
This document describes the default pageview behavior and then how to send your own pageviews manually.
For information about how to measure screenviews on a mobile app, see Measure screenviews instead.
Before you begin
This guide assumes that you have done the following:
- Create a Google Analytics account and property. This step automatically creates a Google tag for you.
- Create a web data stream for your website
- Place the Tag Manager snippets on your website
- Install the Google tag in Tag Manager
It also assumes that you have the following:
- Access to the Tag Manager container for the website
- The Editor (or above) role to the Google Analytics account
Default behavior
When you set up the Google tag, pageviews are sent to Google Analytics when the tag triggers. You can include additional pageview parameters under Configuration settings.
When customizing the pageview behavior, the following keys may be used:
| Name | Type | Required | Default value | Description |
|---|---|---|---|---|
page_title |
string |
No | document.title | The title of the page. |
page_location |
string |
No | location.href |
The URL of the page.
If you override |
send_page_view |
boolean |
No | true |
Whether or not a pageview should be sent. |
For example, the following overrides the page_title and page_path values:
Manual pageviews
When you want to manually control how pageviews are sent (e.g. single-page applications or infinite scrolling), do the following:
Disable pageview measurement
To disable the default page_view event:
- In Tag Manager, edit the Google tag that shouldn't send a pageview.
- Under Configuration settings, add the following parameter and value:
- Parameter:
send_page_view - Value:
false
- Parameter:
- Save the tag and publish the container.
Manually send page_view events
Where appropriate, make the following update, replacing placeholder values as
necessary. Note that the following update uses a Google Analytics: GA4 Event tag
for the page_view event instead of relying on the pageview that's sent
automatically with the Google tag.
See pageview and screenview data
Once your website or app is sending page_view (collected automatically for
standard websites) or screen_view events, you can analyze this data in several
reports within the Google Analytics interface:
Pages and Screens report: The primary report for analyzing user engagement with your content. It details metrics like Views, Active users, Views per user, and Average engagement time for each page path or screen name.
- In Google Analytics, navigate to Reports > Engagement > Pages and screens.
- See the guide: Pages and screens report.
Real Time report: To see page and screenview data as it comes in. You can select cards like "Views by Page title and screen name" or view event counts for
page_vieworscreen_view.- Navigate to Reports > Real Time.
- Learn more: GA4 Realtime report.
Explore (Custom reports): For more advanced analysis, create custom explorations in the Explore section. You can combine dimensions like
Page path + query string,Page title and screen name, orScreen classwith theViewsmetric to build custom tables and visualizations.- Navigate to Explore and select or create a "Free form" exploration.
- Get ideas: GA4 Explore playbook.
These reports will help you understand which pages and screens are most viewed by your users.