What is Page Path and Query String in Google Analytics 4?
If you're trying to figure out which pages on your website get the most traffic, Google Analytics 4 points you to a dimension called "Page path and screen class." But what a page path is, how it’s different from a full URL, and what all those characters after a question mark mean can be confusing. This article will explain what Page path and query strings are in GA4, how they work together, and how you can use them to get much clearer insights into your site's performance.
A Quick Refresher on URL Structure
Before jumping into Google Analytics, let's quickly break down the components of a typical URL. Understanding this structure is the foundation for grasping page paths and query strings.
Consider this example URL:
https://www.mystore.com/shoes/running-shoes?utm_source=newsletter#details
It's made up of several parts:
- Protocol:
https://tells the browser how to connect to the site. - Domain:
www.mystore.comis your website's primary address. - Page Path:
/shoes/running-shoesis the specific page being viewed on your site. - Query String:
?utm_source=newsletteris a set of parameters that pass information to the server or tracking tools like Google Analytics. - Fragment:
#detailsis an anchor link that directs the browser to a specific part of the page. Google Analytics typically ignores fragments.
For analytics, we’re mainly concerned with the Page Path and the Query String.
What is Page Path in Google Analytics 4?
A page path is the part of the URL that comes directly after the domain name and before a question mark (?). Looking at our example, the page path is simply:
/shoes/running-shoes
In Google Analytics 4, the primary dimension used to identify pages in most reports is officially called "Page path and screen class."
- For websites, this dimension shows the page path.
- For mobile apps, it shows the screen class (the name of the app screen the user is viewing).
Since most marketers are analyzing websites, you can think of it simply as "Page Path." When you look at the Pages and screens report in GA4, you're looking at a list of your page paths, not the full URLs.
Why Is Page Path the Default?
Google Analytics defaults to reporting on the page path because it provides a clean, consolidated view of a page's performance. Many different URLs can actually lead to the same piece of content. For example, all of these URLs point to the same running shoes page:
https://www.mystore.com/shoes/running-shoes?utm_source=facebook_adhttps://www.mystore.com/shoes/running-shoes?utm_source=google_organichttps://www.mystore.com/shoes/running-shoes?session_id=123xyz
If GA4 reported on the full URL by default, it would list these as three separate pages in your reports. This would fragment your data, making it incredibly difficult to answer a simple question like, "How many people viewed the running shoes page?"
By using the page path (/shoes/running-shoes), GA4 groups all views of that page together, regardless of the tracking parameters in the URL. This allows you to easily evaluate the core performance of your content.
What is a Query String in Google Analytics 4?
A query string is the part of a URL that starts with a question mark (?). It’s made up of one or more "parameters," which are key-value pairs separated by an ampersand (&). Think of them as tags that carry extra information about a user's visit.
Let's look at a more complex query string:
?utm_source=facebook&utm_medium=cpc&utm_campaign=spring_sale
This string contains three parameters:
utm_source=facebookutm_medium=cpcutm_campaign=spring_sale
Query strings are used for many purposes, but here are some of the most common:
- Campaign Tracking: These are the famous UTM parameters used to track the performance of marketing campaigns. They tell you where the traffic came from (e.g., source, medium, campaign name).
- Site Search: If you have a search bar on your website, the search term is often passed in the query string. For example:
/search?q=men's+t-shirts. Analyzing these can give you direct insight into what your users are looking for. - Product Filtering and Sorting: On e-commerce sites, parameters are used to apply filters or sort products. A URL might look like
/apparel/tops?color=blue&size=M. - Session IDs: Some systems use query parameters to track individual user sessions, though this is less common now with cookie-based methods.
The Combined Power: "Page Path + Query String"
While viewing the clean page path is great for a high-level overview, there are times you need to see the details hidden in the query string. This is where the Page path + query string dimension in Google Analytics 4 becomes essential.
This dimension shows you exactly what the name implies: the page path combined with any query string that was present in the URL.
Let's return to our previous example:
- URL 1:
https://www.mystore.com/shoes/running-shoes?utm_source=facebook_ad - URL 2:
https://www.mystore.com/shoes/running-shoes?utm_source=google_organic
Here’s how the two dimensions would report this traffic:
- The Page Path report would show one row:
/shoes/running-shoes» 2 sessions. - The Page path + query string report would show two separate rows:
/shoes/running-shoes?utm_source=facebook_ad» 1 session/shoes/running-shoes?utm_source=google_organic» 1 session
This approach allows you to analyze how different traffic segments are behaving on the exact same page. You can answer questions like, "Do people arriving from my Facebook ad convert at a higher rate than those who came from an organic search?"
When to Use Each Dimension: A Practical Guide
Knowing which dimension to use depends on the question you're trying to answer.
Use "Page Path" for High-Level Content Analysis:
Use the default Page path and screen class dimension when you need to understand overall content performance. It’s perfect for:
- Identifying your most popular pages: Quickly see which posts, products, or landing pages get the most views, engagement, and conversions.
- Conducting a content audit: Find pages with low traffic or poor engagement that need to be updated or removed.
- Analyzing content categories: Use a filter to see the combined traffic for all pages under a specific subdirectory, like
/blog/or/products/.
Use "Page Path + Query String" for Granular Campaign and Behavior Analysis:
Switch to the Page path + query string dimension when you need to analyze the context behind the traffic. It’s ideal for:
- Analyzing marketing campaign performance: Filter your report by a specific
utm_campaignvalue to isolate traffic from a particular campaign and see exactly which page URLs it drove traffic to. - Understanding on-site search behavior: Filter by page path containing
/searchand use the query string dimension to see a list of actual terms users are searching for on your website. - Debugging data and tracking: If you notice unusual data for a page, inspecting the full query strings can help you identify if a specific parameter (like a faulty ad click ID) is causing the issue.
How to Access Both Dimensions in GA4
You can find and switch between these dimensions in both the standard reports and the more advanced Explore tool.
In Standard Reports (Pages and Screens):
- Navigate to Reports on the left-hand menu.
- Click on Engagement → Pages and screens.
- By default, you will see the report with Page path and screen class as the primary dimension.
- To change it, click the small downward-facing arrow next to the primary dimension heading ("Page path and screen class").
- From the search dropdown, type and select Page path + query string. The report table will instantly reload with this more detailed dimension.
In an Exploration:
- Go to Explore on the left-hand menu and start a new Free-form exploration.
- In the Dimensions panel, click the "+" button.
- Search for and import both "Page path and screen class" and "Page path + query string" into your exploration.
- Drag the dimension you want to analyze into the Rows section of the canvas.
- From the Metrics panel, import and drag metrics like Sessions, Engaged users, and Conversions into the Values section.
This approach gives you complete control to slice and dice your pageview data to find the insights you need.
Final Thoughts
Understanding the distinction between Page path and Page path + query string moves you from simply counting pageviews to truly analyzing user behavior. One gives you a bird's-eye view of your content's performance, while the other provides the granular, context-rich detail needed to evaluate campaign effectiveness and user intent.
Of course, digging through Google Analytics is just one piece of the puzzle. Most marketers are also managing half a dozen other platforms for ad performance, e-commerce sales, and CRM data. With Graphed, we simplify this process by connecting directly to GA4 and all your other tools in one place. Instead of spending time clicking through reports, you can just ask in plain English: "Compare sessions and conversion rate for my top 5 blog posts last month," and get an answer and visualization instantly, giving you back time to focus on strategy.
Related Articles
What SEO Tools Work with Google Analytics?
Discover which SEO tools integrate seamlessly with Google Analytics to provide a comprehensive view of your site's performance. Optimize your SEO strategy now!
Looker Studio vs Metabase: Which BI Tool Actually Fits Your Team?
Looker Studio and Metabase both help you turn raw data into dashboards, but they take completely different approaches. This guide breaks down where each tool fits, what they are good at, and which one matches your actual workflow.
How to Create a Photo Album in Meta Business Suite
How to create a photo album in Meta Business Suite — step-by-step guide to organizing Facebook and Instagram photos into albums for your business page.