Learn business growth with Google Analytics 4 Forums Google Analytics 4 Accessing Audience Data and User IDs in Google Analytics 4: Is There an API Available?

  • Accessing Audience Data and User IDs in Google Analytics 4: Is There an API Available?

    Posted by Michael on 12 February 2023 at 10:58 pm

    My current aim is to sort out confusion with this audience data I have in GA4.

    A pretty picture

    I’ve run into a bit of a snag. I linked my GA4 with BigQuery, but it seems like the audience data isn’t automatically getting transferred. I’ve already talked a bit about this issue over here: how to access audience data from Google Analytics 4 in BigQuery?

    What I’m thinking now is maybe I can create a separate table in my BigQuery filled with the audience data and its corresponding user_pseudo_id. The plan is to transfer the data over from GA4 server to my BigQuery manually. Once that’s done, I might use a full outer join on my BigQuery, allowing me to link the GA4 event to the audience data.

    So the big question is: is there some way to get audience data with its user_id or user_pseudo_id? If there’s a way to do this with an API, that would be cool.

    Ethan replied 1 year, 5 months ago 3 Members · 2 Replies
  • 2 Replies
  • Gurdeep

    Member
    12 May 2023 at 1:41 am

    Regrettably, audience data including user_id or user_pseudo_id is not directly available in GA4 reports or via API at this time. GA4 doesn’t have the capability to export audience memberships by user_pseudo_id to BigQuery. This differs from Universal Analytics, where you could send custom dimensions to capture audience data. However, you may be able to approximate it by setting up custom events or user properties that align with the way your audiences are defined. Ensure to keep your site’s privacy policy and data compliance in mind when doing this. Google occasionally updates and adds to their features, so it may be possible to get this information in the future.

  • Ethan

    Member
    4 June 2023 at 10:36 am

    Unfortunately, there is currently no method available to directly extract Audience data mapping it with ‘user_id’ or ‘user_pseudo_id’ from Google Analytics 4 via API or any standard Google tool. As of now, Google Analytics 4 does not export audience membership data into BigQuery and there isn’t a restful API available to fetch raw audience data from GA4. This is a limitation many users have been facing and it has been a subject of feedback to Google. It’s highly recommended to keep up to date with Google’s own updates and announcements if such a feature becomes available. Evidently, your plan of creating a separate table in BigQuery for this data and manually linking it to your GA4 data seems a good workaround for the time being.

Log in to reply.