2

When I send an even through Google Analytics, more specifically GA4, is that event automatically "linked" to a page_path?

I mean, if I send 2 events on /page-a and 4 events from /page-b, I need to be able to separate them by page_path in my Analytics reports.

gtag("event", "my_event", {
  custom_parameter: "custom_value",
  page_path: "/page-a" OR "/page-b"     // DO I NEED TO PASS THE PAGE_PATH PARAMETER ???
});

Do I need to pass the page_path parameter in order to be able to relate them to the pages that they were fired from?

Or do they automatically infer the page_path from the last gtag("config") command that sent a page_view hit?

1 Answer 1

1

page_location is automatically sent on all events. I don't see page_path being sent at all but it is available in some reports including the analysis hub. I tested a few events and saw it was set. Maybe it is calculated.

Not sure what happens if you try to manually set it in the gtag.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.