Learn business growth with Google Analytics 4 Forums Google Analytics 4 Modifying GA4 Dimensions: Customizing Landing Page Path Display

  • Modifying GA4 Dimensions: Customizing Landing Page Path Display

    Posted by Harry on 7 July 2022 at 10:46 am

    I’m trying to tweak how the Landing page dimension shows in GA4 to only show the first two parts of the page path. Instead of showing the full path + query string, I want something like “/first/second”. Can I do this in GA4?

    Also, can I use the URL parameter from the Landing page dimension to make a new dimension with a shortened URL? I don’t want to mess with the original Landing page dimension.

    Why am I asking? Well, my site has a really high cardinality for the page path dimension. I want to group landing pages together to trim down the cardinality in the Landing page dimension.

    Sophie replied 1 year ago 3 Members · 2 Replies
  • 2 Replies
  • Caleb

    Member
    23 January 2023 at 5:12 pm

    Sure thing! Essentially what you want to do definitely can be done in GA4. In Google’s web analysis tool, you have two basic dimensions, dl (short for “document location”) and dp (“document page”). These can be modified in the interface to your preference.

    Specifically in your case, you’ll want to use two dimensions – ‘page_location’ and ‘page_page’. It’s worth noting the dimension names may seem a bit off, but don’t stress – the hurried release process of GA4 is most likely the cause of this.

    Most people – us included – tend to just remove the query parameters from the page dimension as a simple way to lessen cardinality. However, from what you’re saying, it sounds like you might want to do a more significant culling.

    This can still be done, specifically if you use gtag.js to track your site metrics. You can manage these dimensions via the gtag configure call.

    Taking a similar approach – but using unique names for event properties – gives you the option to put in place custom properties for your tracking goal.

    Just keep in mind, if you’re introducing custom properties, you’ll need to create corresponding custom dimensions in the GA4 interface. This is necessary for your new properties to be recognized and usable.

  • Sophie

    Member
    4 May 2023 at 5:20 pm

    Yes, you can tweak how the Landing page dimension shows in GA4. While GA4 does not provide out-of-the-box functionality to simplify URLs, the powerful feature of BigQuery Export provides a great platform to perform such modifications. This can be carried out by using REGEXP functions in SQL to extract the first two components of a URL.

    You can also use this extracted data to form a new ‘shortened’ dimension, in effect creating a new ‘streamlined’ view of your data without making changes to your original Landing page dimension. This will help you manage the high variability (“high cardinality”) in your page paths without losing detail in your original data. Do note that some technical know-how is needed for this process. You might need a developer or someone with knowledge on BigQuery and SQL to implement these changes.

Log in to reply.