How Firebase Analytics calculates (unique) Users
Asked Answered
D

1

21

Since I noticed a misalignment between the count of Users and the count of User IDs on Google Analytics (for mobile apps), I need to understand technically how Google counts Users in mobile apps. While I have extremely clear that on Web Users are counted based on cookies, on mobile app I still have doubts (I never developed a mobile app). I made some research and I'd like to have a confirmation from people who knows it.

  • I start with this assumption: the metric Users in Firebase / Google Analytics represents the count of the field user_pseudo_id (StackOverflow answer). A comment to this question seems to confirm this assumption, as well as this sentence in the official documentation to set the User ID: "Setting a user ID is never required for Analytics to work correctly. If you're only interested in finding events belonging to the same user for the same app on a single device, you can use the user_pseudo_id. This value is generated automatically by Analytics and is stored within BigQuery for each event."
  • user_pseudo_id should correspond to the App Instance ID (BigQuery Export Schema). If it's correct, why on the documentation the App Instance ID is referenced as an example? The field allows customizations?
  • The App Instance ID can change in some cases (device factory reset, app uninstall, data cleared, etc. --> Instance ID API), and that would explain the misalignment.

Since, as mentioned before, I have zero experience in mobile app development, can someone confirm this flow? Is everything correct or am I missing something?

Thanks!

Directorial answered 18/11, 2019 at 15:15 Comment(0)
A
0

Well, this is good and complex question, I will try to simplify it. First of all, I will start a bit wider and then I will get back to your questions.

  • Consider who is "User" in your mobile app. Is it user who logged in? Or do you consider "User" as "App Installation"? This is different project by project.
  • Regarding reporting itself in Google Analytics 4 UI - it depends what settings in Reporting Identity you use. Upon this settings your GA4 UI is calculating all metrics. Into this calculation comes into the play if you collect User ID, Device ID, enabled/disabled Google Signals and if received some consent from your end users. Because Google Analytics 4 is trying to combine data from multiple identifiers to represent a single "user".*

I start with this assumption: the metric Users in Firebase / Google Analytics represents the count of the field user_pseudo_id (StackOverflow answer). A comment to this question seems to confirm this assumption, as well as this sentence in the official documentation to set the User ID: "Setting a user ID is never required for Analytics to work correctly. If you're only interested in finding events belonging to the same user for the same app on a single device, you can use the user_pseudo_id. This value is generated automatically by Analytics and is stored within BigQuery for each event."

-> Basically metric 'Users' is the result of reporting identity. It depends what you collect, how you configure your GA4 UI, received consents (if some).

user_pseudo_id should correspond to the App Instance ID (BigQuery Export Schema). If it's correct, why on the documentation the App Instance ID is referenced as an example? The field allows customizations?

-> No, this field can't be customized. The field expects only specific format (string, length). The example value is DC05363C3AD34B47A33536755FCC9C3E

The App Instance ID can change in some cases (device factory reset, app uninstall, data cleared, etc. --> Instance ID API), and that would explain the misalignment.

-> Yes, this is true.

Just to give an idea about the identifiers that Google is collecting:

  • App Instance ID -> ID that is generated when app in installed. If unninstalled or consent is being changed new ID is generated. If user doesn't give you consent in CMP (Cookie banner), the Firebase SDK is collecting value null into user_pseudo_id column.
  • Device ID -> By default on iOS is not accessible, you need to implement ATT dialog to start collecting. On Android it is accessible and Firebase SDK is collecting this identifier by default.
  • User ID -> Your back-end User ID after user logged into your mobile app

*If you use "Device-based" reporting Identity you are reporting only upon collected App Instance ID

Alkoran answered 1/8 at 12:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.