Firebase Analytics: first_open event missing for part of my users - firebase

I'm creating some funnels and journeys for my app's events from Firebase Analytics using BigQuery, starting with first_open and continuing with other custom events. My understanding is that using user_pseudo_id, I should be able to track a single user's journey.
The problem I'm facing is that some user_pseudo_ids found in the custom events do not have a corresponding first_open event, so I'm not sure when they started using my app.
Are there cases where a first_open may not be recorded? Or cases where the user_pseudo_id may change after first_open?

TL;DR: In order to reliably track users, one should use setUserId().
As noted in this answer, user_pseudo_id comes from getAppInstanceId(), and it's reasonable to assume its lifetime is not dissimilar to FirebaseInstanceId, which can change in the following cases:
App deletes Instance ID
App is restored on a new device
User uninstalls/reinstall the app
User clears app data
Reinstalling triggers the first_open event again, so that wouldn't be my case, and my app does not delete the Instance ID.
Going through the logs, the last option can be discarded (in my case), because I can see the users were logged into my app when the new user_pseudo_id started being used.
So that leaves restoring the app on a new device as the likely culprit.
I'm now using setUserId() in order to track users.

Related

How Does Firebase Analytics count New Users in Web App

We have a web app that users log into using Firebase Auth. According to our the authentication section of our firebase console, we have 690 user that have created accounts, and we believe that is correct.
According to our Firebase Analytics console, we have 2,100 new users in the past 90 days. I think I understand that Firebase Analytics tracks users with a device ID (?). So, if this were a iOS app, an uninstall and install would trigger a a new user counted in analytics. But, how does this work on a web app? Cookie? Some kind of browser id? A session?
So, I think if we want to track unique users accurately, we would use the set the user id, with this:
https://firebase.google.com/docs/reference/js/firebase.analytics.Analytics#setuserid
Which according to the docs linked above, 'Use gtag 'config' command to set 'user_id'. So it does this: https://developers.google.com/analytics/devguides/collection/gtagjs/cookies-user-id#set_user_id
Which allows the users to be tracked across sessions. Therefore, users should not double count.
Notice that the setUserId section in the firebase analytics docs does not have a web section (although the setUserID function does exist in the javascript sdk as shown tow links above) https://firebase.google.com/docs/analytics/userid
So... would it then work to get the user id (uid) when they log in (https://firebase.google.com/docs/reference/js/firebase.User). And then use the setUserId method to set the id?
It's unclear because the documentation does not seem to be in one source. I am just trying to put it all together
You are correct that you can use the setUserId API (across iOS, web and Android) in order to identify the same user across platforms. Note that you'll need to:
Set the default reporting identity to "By User-ID then Device" in the Reporting settings for Google Analytics in the Firebase console (see attached screenshot and docs for more info).
Make sure you are following the Privacy Policy when using the User ID.

Firebase Remote-Config crash free users

I'm trying to display a "Rate Me" popup to most active users that haven't received crashes recently.
I can easily track how active an user is by using analytics and conditions, and setting a remote-config flag to true.
Is there a way to create an audience or a condition to select users without crashes?
Yes, you can do this by creating an exclusion group in your Analytics audience that excludes users who have logged an app_exception event within a specific timeframe.
The best way to do this, assuming you're already creating an audience for the active users you want to target, is to add on the exclusion group to that audience as well to remove users who have experienced a crash recently.
See attached screenshot for an example from the Firebase console.

Logging Analytics events from functions

We have three mobile apps that connect to our firebase instance: a client facing app, and two admin/employee facing apps. We log a variety of events in each, but we have several categories of events that we'd like to log that are not client-facing or initiated, but we need to attribute to a user. For example, if a user places an order and their payment is denied, or if they place an order that our system automatically cancels for some reason. Is it possible to log these from a function? We know the user ID, so it would be easy for us to attribute the event to the correct user, but I don't see a way to do this from a function.
Firebase Analytics does not support direct logging of events from sources other than the mobile app. However, you can:
Export your Firebase data to BigQuery, making sure that your events have the ID of the user
Write backend code to log other events to another table in BigQuery, using the same ID
Write a query to join those tables on the common ID to get continuity among all those events
Essentially, you will need to corral all your data in BigQuery to make it possible to merge your data from both the frontend and backend.

Google Calendar: limit API access to a single calendar?

I'd like for my app to add/delete/update events on a user's Google Calendar. The app only needs to delete and update events that the app itself has added.
Have I understood it correctly, that in order for this to work, the users have to give the app full access to their Google Calendars, meaning that the app could potentially read and delete private events on any calendar?
Or, is there a way to limit the access that a user gives to the app, for example, allowing the app to create a single calendar and only giving it access to events on that one calendar?
I've read through the relevant Google Calendar API, and I'm not seeing that this is possible. However, giving full access seems crazy and unnecessary!
It seems that this isn't possible. Google, why!?
What I ended up doing was skipping the API and using a calendar subscription. Limited use since the user needs to be able to set up a subscription and, especially, because Google takes up to a day to update subscribed calendars.

Firebase Analytics first_open from Google Analytics

My Android app right now uses Google Analytics.
However, I want to add Firebase Analytics as well.
Let's say the new version of the app now has FA.
Will the 'first_open' event be triggered for old users and mark them as they've first opened the app only now?
Is there any possibility to link FA with GA and get the correct 'first_open' for the old users?
Should I introduce my own 'user property' to mark users that had a previous version of the app when they first run the new version?
Maybe a tricky question: If a user installs the new version, and FA attempts to set such 'user property' (only once ever), but the user doesn't have an Internet connection at this moment. Will this 'user property' be sent to FA somehow in the future?
Thank you!
The current Firebase Analytics library will report first_open when an app with Firebase Analytics is first launched. This includes launch after the app is update from version w/o Firebase to version with Firebase. We are working on excluding first_open from users after update to app with Firebase but this change is not in yet.
FA is not aware of GA in the app and there is no way to tell FA if this is first_open after upgrade vs first_open after app install. This will be automated in one of the next releases as I mentioned earlier.
Setting user property will not work as first_open is recorded early in the app life cycle and before you can get access to FA singleton. You will not have a chance to set the user property before first_open event is recorded.
Setting user property is orthogonal to the app connectivity. All events logged before the property was set will not have it, all event logged after the property is set will have the property set. Connectivity only impacts when the data can be uploaded, not the content of the data. If your app is running on device that is offline the data will be uploaded when the device gains connectivity. The data itself is almost identical.

Resources