firebase-ios-sdk icon indicating copy to clipboard operation
firebase-ios-sdk copied to clipboard

[FR]: Firebase Analytics - Allow the user to define custom sessions via new start and stop session API

Open SwiftNativeDeveloper opened this issue 1 year ago • 1 comments

Description

  1. I'd like the ability to explicitly control sessions. Firebase Analytics is not the only 'session capture' tool that exists. I want to tell all of my systems when I consider a session to have started and stopped.
  2. Firebase Analytics provides the developer no fine control over starting and stopping sessions.
  3. Create or expose an API that allows the developer to enter 'manual-mode' which requires they start and stop a session.

As an example, SceneDelegate might log 'user sessions' to a test file when the app enters foreground and exits to the background. This would not be consistent with what Firebase provides because we can't control the timing or declare the 'event timestamps' of the session.

Another example might be if the app has temporary user login sessions, or a kiosk app, a 'user session' would be the time the user logs in through the time they log out, or the kiosk app is used and then the user exits after they completed their task.

API Proposal

Have an API to set the 'mode' of user session capture. Options, automatic (current behavior), and manual (proposed behavior).

Then have an API that allows the user to start and stop recording a user session. Unclear if the methods would need to have any parameters or not because how it currently works is black box.

Firebase Product(s)

Analytics

SwiftNativeDeveloper avatar Apr 04 '24 15:04 SwiftNativeDeveloper

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

google-oss-bot avatar Apr 04 '24 15:04 google-oss-bot