GA4 API User Segment vs Session Segment

28 Views Asked by At

In the GA4 platform, when you create an exploration, you can create a segment in the exploration as a User Segment of a Session Segment. My understanding of this is that a user segment follows the journey of the user that initiated the visit while the Session Segment follows the session. The biggest difference I could find was that in a Session Segment, if the person is idle for 30 minutes, the session expires and if that user comes back after 30 minutes, a new session is created. This is obviously a problem when tracking marketing performance for anyone who doesn't purchase in the first 30 minutes after a visit. If they come back after 30 minutes not clicking on another link or referring site, their visit that made the purchase would be logged as a "Direct" visit. We found the data to be more accurate using the User Segment.

Now for my question. We are using the GA4 API to automate pulling data for marketing analysis daily. Looking through the list of API Dimensions and Metrics available, I do not see a way to have the data pulled based on a User Segment vs. Session Segment. I see a Dimension option for "firstUser" but when I use that, the data that is returned is a fraction of what I get with "session" dimensions, while in the platform under Explorations my data is higher for the marketing channels. Is there any way in the API to mimic the extraction of data that I would get using a "User Segment" in explorations vs. a Session Segment?

I have tried using many different dimension options in the API but have not found an answer.

0

There are 0 best solutions below