I am working on a realtime dashboard that would fetch data about active users from Google Analytics with Data API (GA4). The feature that I really need is filtering events by pathname.
So I would like to display users active in the last 30 minutes per page, so that I can see what pages are most popular in the last half hour.
I was working with the same API for non-realtime data and I was able to achieve that by passing a dimensionFilter
to the request. I found (after decided to use GA4) that there is a very limited subset of dimensions and metrics available and anything that I could use to filter events by page is not there.
I was also trying to implement custom event dimensions or metrics but that is not a thing for realtime data that supports only custom user properties.
I was not able to find any information on whether page dimensions or custom event support is going to be implemented or not for realtime requests. I hope that switching to UA (Universal Analytics) is not the only option because I will lose the current data that I collected with GA4.
Did anyone try to request realtime data that could be filtered by page attributes? It could be even a page title - anything that would allow me to understand what the user was actually viewing.