How to Rename Pages in Google Analytics

Cody Schneider••7 min read

Thinking you can simply rename a page in Google Analytics 4 is a common trip-up. GA4 reports what your website sends - messy URLs, query parameters, and all. If your site’s page title is “index.php?id=123,” that’s unfortunately what you’ll see in your reports. This article will show you the right way to clean up your page-level data using Google Tag Manager so your GA4 reports become clearer and far more useful for analysis.

GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

Why You Can't "Just Rename" Pages in GA4

Unlike its predecessor, Universal Analytics, Google Analytics 4 is built around collecting raw, unfiltered event data. When a user views a page, GA4 records exactly what’s passed from their browser, including:

  • Page location (page_location): The full URL, including things like ?utm_source=facebook or other tracking parameters.
  • Page title (page_title): The exact content within your page's <title> HTML tag.

Universal Analytics had features like "Views" and "Filters" that let you manipulate incoming data on the fly. You could create a filter to automatically strip out query parameters or consolidate pages based on a URL pattern. GA4 does away with this. The philosophy is to collect the raw data first and then handle any transformations during the analysis and reporting phase. While the "correct" long-term fix is always to clean up your website's URL structure and page titles at the source (in your CMS), that's not always fast or practical. For immediate, powerful control over your reporting, we need to adjust the data before it's finalized in GA4.

The Problem: 3 Common Messy Page Reports

Your goal is to have clean, readable reports where one row equals one logical page. When you don't clean your data, you end up drowning in reports that fragment your insights. Here are three classic examples.

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

1. Dynamic URLs

If you run an e-commerce site or a site with user profiles, you'll see page paths like:

  • /products/item-1015/
  • /products/item-8432/
  • /user/profile/jane-doe/
  • /user/profile/john-smith/

In your reports, each one appears as a unique page. What you really want is to group all of them under a single, consolidated name like "/product-detail-page" or "/user-profile/" to analyze the performance of the page template as a whole.

2. Pesky Query Parameters

Query parameters are strings added to the end of a URL after a question mark (?). They are often used for tracking, filtering, or session IDs. For example:

  • /pricing?utm_source=newsletter
  • /pricing?session_id=xyz123
  • /pricing

All three of these are the exact same pricing page, but GA4 will report them as three separate rows. This fractures your data, making it impossible to see the true total pageviews, engagement rate, or conversions for your pricing page without manually adding them up in a spreadsheet.

3. Unhelpful or Duplicate Page Titles

Sometimes, your Content Management System (CMS) produces generic page titles. You might see hundreds of pages all named "Search Results" or "Checkout." These titles provide zero context in a GA4 report. Renaming "Checkout | YourStore.com" to something more specific like "Step 1: Shipping Information" makes your funnel analysis much clearer.

The Solution: Sending Cleaner Data with Google Tag Manager

The best way to clean up your page data for GA4 is by using Google Tag Manager (GTM). GTM acts as a middle layer between your website and GA4, allowing you to intercept, modify, and enrich the data you send. Think of it as your data quality control center.

Our game plan involves four main steps:

  1. Capture an identifier in GTM (like a page's URL path).
  2. Create a GTM variable that applies rules to clean up or categorize that path.
  3. Send this clean value to GA4 as a new parameter with every page view.
  4. Register that parameter in GA4 as a custom dimension, making it available in all your reports.

Don’t worry, this is easier than it sounds. Let’s walk through it.

GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

Step-by-Step: Renaming URLs with GTM & GA4

For our example, we'll solve the common problem of stripping query parameters from URLs, giving us a clean "Page Path" for our reports.

Part 1: In Google Tag Manager - Create the 'Cleaning' Variable

First, we need to create a variable in GTM that takes the original page path (e.g., /pricing-plans?utm_source=email) and strips everything after the ?. A little snippet of JavaScript is the cleanest way to do this.

  1. Navigate to Variables in your GTM container.
  2. Under "User-Defined Variables," click New.
  3. Name your variable something clear, like JS - Clean Page Path.
  4. Click Variable Configuration and choose Custom JavaScript.
  5. In the code box, paste the following snippet:
function() {
  var pagePath = {{Page Path}},
  return pagePath.split('?')[0],
}
  1. Click Save. This variable now automatically takes the built-in {{Page Path}} variable and returns only the part before the question mark.

Part 2: In Google Tag Manager - Send the Variable to GA4

Now, we need to attach our new, clean variable to our main Google Analytics tag so it gets sent with every page view.

  1. Navigate to Tags and find your main Google Tag (or Google Analytics: GA4 Configuration tag). Click to edit it.
  2. Click into the Configuration settings section within the tag.
  3. Under Configuration parameters, click Add parameter.
  4. For the Configuration Parameter, type clean_page_path. It's important to use a custom name, not a default GA4 name, to avoid conflicts.
  5. For the Value, click the Lego block icon and select the {{JS - Clean Page Path}} variable you just created.
  6. Click Save on your tag, and then be sure to Submit your changes to publish your GTM container live.

Fantastic! From now on, every time a user views a page, GTM will send a parameter named clean_page_path along with it, containing the URL path without any query parameters.

Part 3: In Google Analytics 4 - Register Your Custom Dimension

GA4 is now receiving our custom clean_page_path parameter, but it doesn't know what to do with it yet. We have to officially "register" it as a Custom Dimension to be able to use it in reporting.

  1. In your GA4 property, navigate to Admin (the gear icon on the bottom left).
  2. In the Data display column, click on Custom definitions.
  3. Click the Create custom dimensions button.
  4. Configure the dimension as follows:
  5. Click Save.

Important Note: Custom dimensions can take 24-48 hours before their data starts appearing in standard and exploration reports. Be patient!

Part 4: Use Your Brand New Dimension in Reports

After a day or so, you can start using your clean data. Navigate to Reports > Engagement > Pages and screens. At the top of the data table, you'll see a dropdown menu that likely defaults to "Page path and screen class." Click it, and you should now see your custom "Clean Page Path" dimension available. Select it, and voilà! Your report is now neatly consolidated by the clean URL path, free of any pesky query parameters.

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

What About Grouping Content?

Renaming individual pages is great, but often you want to group pages into higher-level categories to analyze performance. This is exactly what content groups are for. The process is nearly identical to what we just did, but instead of cleaning a path, you create a variable that assigns a category name.

In GTM, you could create a Lookup Table or Regex Table variable. For example, a Lookup Table variable could be configured as:

  • Input Variable: {{Page Path}}
  • Lookup Table:

You would then send this variable to GA4 using the reserved parameter name content_group, and it will automatically populate the "Content group" dimension in your reports.

Final Thoughts

Cleaning up your reports boils down to a key workflow: Stop trying to edit data inside GA4, and start sending cleaner, more organized data into it. By using Google Tag Manager to create custom rules and variables, you gain full control over how pages are named and grouped, leading you to much more accurate and actionable insights.

Once you have that clean data flowing, making sense of it all is the next step. At Graphed, we've simplified this part entirely. Instead of navigating GA4's complex interface to build reports on your new custom dimensions, you can connect your Google Analytics account directly to Graphed. Our platform automatically understands your data structure and lets you build real-time dashboards by simply asking questions in plain English, like "Show me a chart of my top 10 pages in the Blog category last month." We turn hours of report-building in GA4 into a 30-second conversation.

Related Articles