firebase / firebase-android-sdk

Firebase Android SDK
https://firebase.google.com
Apache License 2.0
2.26k stars 573 forks source link

Hi there, how can I get ga_session_id and ga_session_number #3071

Open andrewcmc opened 2 years ago

andrewcmc commented 2 years ago

What feature would you like to see?

I want to get ga_session_id and ga_session_number for each event in Android/iOS client. How can I get these values?

How would you use it?

We are trying to align the number of user sessions between Segment and Google Analytics. Google Analytics is calculating session using ga_session_id and ga_session_number parameter having these parameters helps DE align the number of user sessions it should be retrievable from firebase SDK.

So we will add ga_session_id and ga_session_number we track any event, and send it both to analytics, segment... After that, we can easily analyze.

google-oss-bot commented 2 years ago

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

andrewcmc commented 2 years ago

Hi @aguatno , do you have any idea regards this feature?

argzdev commented 2 years ago

Hi @andrewcmc, thanks for reporting. Since this is a feature request, we'll just leave this ticket open until sometime this is worked on. I can't provide any specific timeline as to when this will be prioritized, but you may keep an eye out on our release notes and official blog from time to time to check out the latest features.

giovaniortolani commented 2 years ago

It would be an extremely useful resource for us to use Measurement Protocol V2 (https://developers.google.com/analytics/devguides/collection/protocol/ga4) in its full capabilities.

Missing session_id and session_number makes using Measurement Protocol V2 useless for apps.

Exposing the session_id and session_number would be a way to tie in and maintain session continuity.

Another use case is apps that navigate to the web version in the browser. Currently we are unable to tie the user session (app -> web).

If there was the possibility of recovering session_id and session_number, it would be possible to perform this binding.

Please give this a special attention.

marcoscgfilho commented 2 years ago

It would be an extremely useful resource for us to use Measurement Protocol V2 (https://developers.google.com/analytics/devguides/collection/protocol/ga4) in its full capabilities.

Missing session_id makes using Measurement Protocol V2 useless for apps.

Exposing the session_id would be a way to tie in and maintain session continuity.

Please give this a special attention.

+1

Well put. This is absolutely crucial!

lcrespilho commented 2 years ago

+1

Please, don't forget ga_session_number.

argzdev commented 2 years ago

Hi all, instead of commenting a "+1", kindly leave a thumbs up emoji on the main post. This will allow our engineers to prioritize adding this to the roadmap based on popularity and demand. Thanks!

giovaniortolani commented 2 years ago

Hi all, instead of commenting a "+1", kindly leave a thumbs up emoji on the main post. This will allow our engineers to prioritize adding this to the roadmap based on popularity and demand. Thanks!

@lcrespilho @marcoscgfilho @BiancaSeolin

BiancaSeolin commented 2 years ago

+1

Please, don't forget ga_session_number.

giovaniortolani commented 1 year ago

Hello folks.

I was checking the Firebase documentation and saw that ga_session_id getter was implemented sometime in mid-October.

ga_session_number getter is still missing.

See: https://firebase.google.com/docs/reference/android/com/google/firebase/analytics/FirebaseAnalytics#getSessionId()