frgr
frgr

Reputation: 65

Log FirebaseAnalytics event after a specific time period

What is the best way to Log a FirebaseAnalytics event after a specific time period.

I want to log an event if the user stays for more than a specified time duration, on a particular view of recycler view.

Upvotes: 1

Views: 245

Answers (1)

Steve Ganem
Steve Ganem

Reputation: 10871

A couple of approaches :

  1. The obvious one, which is to just write custom code to log that event when the condition you described is met.
  2. Measure the duration of that view and, when the user transitions away from that view, log an event and specify the duration in the VALUE parameter of the event. Your report for that event will show you the cumulative amount of time that the view is active. You could calculate the average time spent on that view by dividing the cumulative value by the count of events. And you could also optionally create an Audience of users who logged that event with a value > X. You could then do things like analyze this audience or target them with Firebase Notifications or Firebase Remote Config.

Upvotes: 1

Related Questions