8

we are planning to move from the GA SDK to the Firebase SDK. Within the GA SDK there were options to retrieve the google analytics client ID (https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#cid). This was fundamental since we transferred this value to the WebView (within the app), so that the customers tracking across native/webview was possible.

Does anybody know how to retrieve this client ID within firebase analytics SDK (iOS & Android)?

Thanks!

Fahim
  • 1,431
  • 1
  • 15
  • 28

1 Answers1

1

The short answer is no - the client ID equivalent (app instance ID) is not currently accessible through an SDK API.

The longer answer :

Firebase Analytics currently only supports logging events from native code. And so, the js code in your webview would call native code to log events and you don't need access to the app instance ID.

Steve Ganem
  • 10,591
  • 2
  • 39
  • 32
  • Thanks steve, but I can't believe that. If I try to create a new Google Analytics App Peropty it recommends to use a firebase project. How should this fit if firebase doesn't support any screen tracking? – Fahim Aug 24 '16 at 15:22
  • Screen tracking is something we're currently giving a lot of thought. So, I wouldn't assume that the current absence of a GA feature is necessarily indicative of the roadmap for Firebase Analytics. – Steve Ganem Aug 24 '16 at 17:01
  • That would work only one way. We have a lot of webview traffic within our app which also needs to be tracked. That's why we need an approach to have a cross devices tracking. – Fahim Sep 08 '16 at 18:35
  • 3
    Do you maybe have an update about this? We still have the target to track native screens and webview traffic within one session (by using one CID). Until now it wasn't possible to set the CID manually in the firebase sdk – Fahim May 08 '18 at 08:20
  • Does anyone know if clientID can be used with Firebase now? I still cannot find any documentation or methods about it – Nikolay Spassov Dec 17 '19 at 09:52
  • Google has a new Beta for hybrid apps that shares session ids across native and webviews – FlavorScape Sep 29 '20 at 19:24
  • 1
    Any news on setting the clientID into Firebase SDK without using Firebase Dynamic Link? – Thomas Ramé May 18 '22 at 20:55