Learn business growth with Google Analytics 4 Forums Google Analytics 4 How can I access the page URLs when analyzing user behavior in GA4?

  • How can I access the page URLs when analyzing user behavior in GA4?

    Posted by Aniket on 9 October 2022 at 7:49 pm

    Hey there, I’m a newbie with GA4 and could do with some help! So here’s what’s up – I’m in user explorer and I can see these default page_view events. But when I try getting into them, there’s no page paths. Any idea why that might be happening? I was hoping to see the default parameters like page_location, or page_referrer, but all I’m seeing are these custom parameters.

    take a look at this snapshot

    I thought about adding a custom page path to the gtag config, but I’m running an SPA and that didn’t really pan out as I expected. I’m considering whipping up a custom page view event in the front end code, instead of using the default page_view. What do you think about that? Any tips or advice would be super appreciated!

    Archie replied 10 months, 4 weeks ago 3 Members · 2 Replies
  • 2 Replies
  • Daniel

    Member
    15 February 2023 at 4:40 pm

    In Google Analytics 4 (GA4), some of the parameters like page_path are no longer sent automatically like they used to be in the previous Universal Analytics version. You’ll find that GA4 captures page_location by default which holds the full URL (including query parameters) of the page where the event was captured. You’ll need to implement custom tracking to capture page path separately. If you’re using Google Tag Manager, there are various methods to capture this data, for instance, you could set up a custom JavaScript variable to strip out the domain and just return the path. If you’re using gtag.js directly, you may need to implement additional JavaScript to capture this on the page_view event. Creating a custom event could potentially work as well, but before you do that, you’d have to consider what other default data you might lose by not utilizing the built-in page_view event and weighing out if it’s worth it. A more comprehensive solution would be modifying the tracking setup slightly to send the page path with the default page_view events.

  • Archie

    Member
    22 February 2023 at 4:40 am

    It seems like you’re having trouble viewing the default parameters in Google Analytics 4 (GA4). In GA4, page paths aren’t visible directly in the user explorer under page_view events. This is different from how things worked in the previous versions of Google Analytics. Currently, GA4 focuses more on events and user actions rather than page views, which could be why you’re seeing more custom parameters.

    You mentioned that you’re considering creating a custom page view event in your front-end code. This is definitely a good idea, and it allows you to capture the data you need. However, it can be a bit complicated, especially if you’re new to GA4.

    It’s always advisable to consult with someone more experienced or seek advice from Google’s support or community forums before making such changes. This can ensure that you have the best setup for your specific needs and that you’re utilizing GA4 to its full potential.

Log in to reply.