Detailed guide on pageview event in Google Analytics 4

Although Google Analytics 4 tracks pageview events automatically when you set it up using Google Tag Manager, Gtag or Analytics.js, it is helpful to learn what parameters are accessible in GA4, where you can find pageview data and how to structure your data in GA4 correctly.

This article will cover all of these questions in detail. Let’s get started with the definition. 

What’s a pageview event in GA4?

Whenever someone lands on your website or opens your app, this user generates a pageview event. 

As I mentioned above, Google Analytics 4 allows you to track pageviews for websites (including one-page applications based on Node.js, etc)  and screens for mobile apps by placing the default GA4 code. You don’t need to set up anything else to track it. 

Once you implement the code, you will be able to see the following parameters along with the event:

  • language
  • page_location
  • page_referrer
  • page_title
  • screen_resolution
  • campaign
  • term
  • medium
  • source
  • ga_session_id
  • ga_session_number

All these parameters are available in GA4, and you can use them without creating custom definitions. This gives you first insights into how users behave on your website or app, and you can create the funnel in the GA4 Explore report builder. 

However, before looking at GA4 data, let’s look at how we can implement it correctly on our website or app.

How to set up a pageview event in GA4

You can read more about how to set up GA4 on your website or app in my other article, here, I will provide a quick overview of how to do it using Google Tag Manager.

  1. Open GA4 and go to Data Streams, Create a new one

    GA4 Data Streams

  2. Copy your measurement ID 

    Step #8 - Copy Measurement ID

  3. Open Google Tag Manager and create a new tag. 


  4. Click on Tag Configuration and select “Google Analytics: GA4 Configuration” tag type.
    Provide measurement id and name the tag

    Selecting GA4 Tag in GTM

  5. Select the trigger for this tag. It will be “All Pages / Page View”. Save it.


  6. Publish the GTM container


Once you do all of these steps, your GA4 account starts to collect the first data and you can check it in Realtime report. 

Remember that GA4 needs at least 24 hours to prepare your first data for all default reports. Therefore you can’t access page views data on the same day. 

If your website is one-page application, then you should take additional steps:

  1. Go to GA4 – Data Streams -> Web Stream -> Enhanced measurement 
  2. Activate “Page changes based on browser history events” and save the changes.

After that, GA4 will track all pages successfully.

Sometimes, you can also find that you want to track a specific action on your website as a page – virtual pageview. It’s easy to do with GA4. 

How to set up a virtual pageview event in GA4

To set up a virtual pageview for GA4, you should send an additional event “pageview” to GA4 (the same as you send other events); you can find the complete instruction here.

So if you use Google Tag Manager, the tag setup will look the following way. 

GA4 Virtual Pageview Setup

After we created all necessary pageview events and waited for 24 hours, we can go to GA4 and find our pageview data there.

Where are pageviews data in Google Analytics 4?

There are a few ways how you can access pageview data in Google Analytics 4. 

Firstly, you can access it using GA4 default report. To do that, open GA4 and go to Reports -> Lifecycle collection -> Pages and screens. 

GA4 Pageview Default Report
GA4 Pageview Default Report

Secondly, you can access this data using GA4 Explore report. To do that, open GA4 and go to Explore, create a new report add the following metrics and dimensions: 

GA4 Pageview Data using Ga4 Explore
GA4 Pageview Data using Ga4 Explore

If you play with parameters, you find no clean page_path dimension; you can see it with path queries or page titles. I like page titles and can match this data with my other data in Google Sheets, but if you want a clean page path in GA4, here is a solution. 

How to set up GA4 to show Page Path

As I mentioned above, you can use page_title paramater with page_view event to group you pages almost the same way as you would do with the page path and even if you are interested to have a page path instead of page title, you can easily add it using LOOKUP function in Excel or Google Sheets. 

However, sometimes people want to have everything inside Google Analytics 4. Therefore, I will show you a workaround solution.

The solution is to send an additional custom event_parameter with every pageview event. To do that, you should modify your existing GA4 configuration tag according to screenshot below.

GA4 + GTM Path Clean
GA4 Path Clean setup

Then, you should publish the GTM container and create a new dimension, “page_path” in GA4. 

GA4 Path Clean Custom Dimension
GA4 Path Clean Custom Dimension

After you make all these changes, GA4 needs 24 hours to process the first data. 

Use Content Grouping in GA4 to analyse pageviews 

Another popular solution to analyse pageviews is to use content grouping. I encourage you to read more about it in my other article, where I explain it in detail. Here I will provide a brief overview of what’s that and how to set it up.

First, content grouping is a feature in GA4 to group similar pages. For instance, ecommerce website can have product, listing, and checkout pages. You can group them for the analysis.

Or, you can run a blog about GA4, Data Studio and BigQuery, and you can split articles into groups based on the topic. 

This will help you to analyse your pages more efficiently; moreover, it makes a huge difference when you have 100+ pages to look after.

In order to activate content grouping in GA4, you need to use Google Tag Manager and change your GA4 configure tag. Here I’m offering an example of how you can group pages using the regex table. You can also use a lookup table in GTM. 

GTM Tag updates to send Content Groups into Google Analytics 4
GA4 Content Grouping using GTM
RegEx Table GTM Variable to send content groups data into GA4
Content Groping RegEx Table Variable in GTM

Once you setup it up, you will be able to access this data in “Pages and screens” report and also in GA4 Explore. You don’t need to create custom dimensions. 

GA4 Content Grouping
GA4 Content Grouping

Final Thought

In this article, I covered every detail about pageviews in Google Analytics 4. If you can’t find answer to your question, please feel free to comment below.

Frequently Asked Questions

What’s a pageview event in GA4?

Whenever someone lands on your website or opens your app, this user generates a pageview event.

Where are pageviews in Google Analytics 4?

You can find page views data in GA4 by navigating to Reports -> Lifecycle collection -> “Pages and screens” report. 

How to setup a virtual pageview in GA4?

To set up a virtual pageview for GA4, you should send an additional event “pageview” to GA4 (the same as you send other events.

Does GA4 have unique pageviews?

No, It doesn’t have unique pageviews metric.

Leave a comment

Your email address will not be published. Required fields are marked *