2

I'm doing some research around the user_engagement event in Firebase Analytics for apps.

In BigQuery, with a query I produced some event data. Hereby, I included the following columns:

  • The value of standard Firebase fields: event_name, user_pseudo_id, event_timestamp (for information about these fields, see https://support.google.com/firebase/answer/7029846?hl=en)
  • pa_session_id: The value of parameter 'session_id' which is sent with each event.
  • pa_engagement_time_msec: The value of the parameter 'engagement_time_msec', which is sent with each user_engagement event, and which is defined by Google as 'The additional engagement time (ms) since the last user_engagement event', see also https://support.google.com/firebase/answer/7061705?hl=en.
  • 'event_previous_timestamp_own_calc' and 'pa_engagement_time_msec_own_calc': Custom calculated versions of the original fields 'event_previous_timestamp' and 'engagement_time_msec', where I did custom calculations myself to compare with the original fields.

See an extract of the dataset in the attached screenshot below, where I filtered on a specific user_pseudo_id to make my point and ask questions about. I didn't do any other filtering in the data. The data is sorted on the timestamp.

enter image description here

My focus is on the event user_engagement. Analyzing the data I noticed several things, and have questions around them:

  1. The user_engagement event is described by Google as 'periodically, while the app is in the foreground', see also https://support.google.com/firebase/answer/6317485?hl=en. From the data, it seems the time interval between the user_engagement events is rather irregular. QUESTION 1: Could this be explained somehow, and what is the exact logic of the moment when a user_engagement event will be fired?
  2. In some cases, the value of pa_engagement_time_msec seems incorrect. See also the yellow marked rows as examples, and the red marked values which seem to be incorrect. For the top yellow marked row, pa_engagement_time_msec should be 3075, not 2823. QUESTION 2: Could this be explained somehow? Or is it a bug by Google?

Does anyone know the answers on the 2 questions above?

Mikhail Berlyant
  • 165,386
  • 8
  • 154
  • 230
Timo Rietveld
  • 451
  • 2
  • 6
  • 20

1 Answers1

1

user_engagement is triggered when a user interacts with the application for a minimum duration (once the user is with the app on first plane for at least 10 seconds). The timeout for a session can be controlled using the setSessionTimeoutDuration() call. The user that opens the app in the foreground of their device on a given day is considered an active/retained for that day. user_engagement event counts unique users so if a user triggers this event twice in a day, it will be considered an active or retained user and only one event will be counted. The active users in the Dashboard are calculated based on the unique instance of the app pulled from the instance ID in a given time period. For example, if a user installs the app, uninstalls it and then re-installs again, the active user count would be two.

I really recommend you to take a look for Firebase Help documentation , Firebase blog and this Stackoverflow thread.

I hope it helps.

aga
  • 3,790
  • 3
  • 11
  • 18
  • Thanks for your feedback. I must admit that the user_engagement logic still seems quite complex to understand to me (also after I read all your suggested articles), and not clearly described by Google in the documentation. I still end up with many questions, e.g. in my example screenshot the 1st user_engagement event is already fired after 3s, which is <10s. Also (as per my QUESTION 2), some values of engagement_time_msec seem incorrect. – Timo Rietveld Apr 08 '20 at 06:49
  • What I also don't really understand: the user_engagement event is meant to measure..well..user engagement time :) But suppose this scenario: After having opened the app, a user puts the app to the background (user_engagement event is fired), and after 100 seconds the user puts the app to the foreground again (again, a user_engagement event is fired). In this 2nd user_engagement event, the engagement_time_msec is then 100000 (msec since last user_engagement event), but imho, this shouldn't be counted as user engagement time, since in the meantime the app wasn't in the foreground, right? – Timo Rietveld Apr 08 '20 at 06:59
  • Since you have found error/misbehaviour, please fill a following form to report a bug: https://firebase.google.com/support/troubleshooter/report/bugs – aga Apr 10 '20 at 09:55