How can I retrieve Firebase user properties? - firebase

Is there any way to retrieve Firebase user properties in Analytics for Firebase?
For example, Analytics has all user records. I want to retrieve a record about user information, such as country code, etc. using Analytics.
Is there any API available for this?

Google Analytics for Firebase doesn't retain any PII (Personally Identifiable Information) about anyone using your app. It aggregates information across users. It doesn't associate specific user information from Firebase Authentication.
Also, there is no API for data it stores. If you want access to raw data, you have to export it to BigQuery (but there will still not be PII in that export).

Related

Does Firebase Analytics link data to user identity?

I am trying to publish my React Native iOS app (which uses Firebase Analytics) on the App Store. The App Store requires me to specify what data is linked to the user.
The problem is: I cannot figure out whether Firebase Analytics links the data it collects to the user identity.
Specifically, I am unsure if Firebase Analytics links data from the following categories to the user identity: Contact Info, Identifiers, Diagnostics, Location, Usage Data, and Other Data. Can anyone advise?
I found Google documentation explaining how to enable/disable privacy settings: Privacy controls in Google Analytics
For location data, they state: "You have the option to enable/disable the collection of granular location-and-device data on a per-region basis. Analytics collects this data by default."
For user level data acccess, they state: "For Universal Analytics properties, you can pull event information for any given user identifier via the User Explorer report or the User Activity API. These features allow you to analyze and export event level data for a single user identifier. " -- I think this means that the data is in fact linked to user identities if you use Firebase Analytics.

Is it possible to get which user triggered an event in Firebase Console?

Im learning how to use the analytics tool of firebase, i have the following problem:
I'd like to get who triggered those events, how would i got about doing that?
Google Analytics for Firebase only collects anonymized data by default. The console doesn't give you the identity of users who trigger events.
If you want per-user information, you're going to have to write client code to set a user property with the identifying piece of data (for example, a user ID), then export Analytics data to BigQuery, and make queries from there.

Google Analytics - UserID report get data

I've setup of google analytics USER-ID report where i send user id's, i want to get the details of each any userid using get or post request
It's not possible. Google analytics only utilises User Id for sessions unification through different devices. User I'd is not exposed in the reports. Consider using unique custom dimensions values to split sessions across users

List of clientIds of active users with Google Analytics API

I'm looking for a way to get the list of client ids of users that are currently on the website. Realtime reporting API seems to be giving just the metrics like the number of currently active users.
Is there any way to get actual client ids?
No, you cannot get that information with the Realtime Reporting API. Here is a list of all the dimensions and metrics that API allows you to query:
https://developers.google.com/analytics/devguides/reporting/realtime/dimsmets/
To expand on this a bit, none of the reporting APIs give you access to the client ID. You can, however, store the client ID in a custom dimension and send that along with all your hits. This will give you access to the client ID through the Core Reporting API, but it still won't give you access through the Realtime Reporting API.

How can I generate a GA tracking code programmatically?

How to generate Google Analytics tracking code programmatic-ally?
I am new to Google Analytics API, can someone please help
It is NOT possible to create new Google Analytics accounts or profiles programmatically using the existing APIs.
There are two APIs available, the Data Export API and the Management API. However, they are bot read-only.
With the Google Analytics Data Export API, you can develop client applications to request data from an existing Analytics profile for an authorized user, and refine the results of the request using query parameters. Currently, the Data Export API supports read-only access to your Google Analytics data.
Currently, the Management API supports read-only access to five components of the Google Analytics Management system: Account data,Profile data, Web property data, Goal data, Advanced segments
Seems like it's finally possible in 2021 with alpha api.
https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/properties/create#authorization-scopes
It's not currently possible to create Google Analytics accounts automatically at the moment but generating the tracking code is possible.
The only real variation between the tracking code generated each time you create a profile for a new domain is the web property ID. This is in the format UA-XXXXXXX-X. Each X is a number - the first 7 numbers are the account number and the number after the last dash relates to each web property set up for the account.
You can use the accounts feed of the API to get a list of accounts and their profiles. If an account only has one profile then it's possible to use the web property ID of it to automatically generate the tracking code. However, if there's multiple web properties then you would need a way to decide which one to use (present the user with a selection list etc).

Resources