Firebase Analytics in iOS extensions

1,197 views
Skip to first unread message

Maciej Kujalowicz

unread,
Jun 2, 2016, 2:03:20 PM6/2/16
to Firebase Google Group
Hello,

What is the best practice of using Firebase Analytics in iOS applications that provide extensions (share extensions, etc) ? Each extension has its own bundle id, which ultimately means that it will be tracked as a different application on Firebase. I'm not sure if this is something everyone wants. I think it would be great to have combined analytics reports from the whole iOS app, no matter if it is the main executable or embedded extension. At least to have such an option. I believe it was possible in Google Analytics. Is it feasible in Firebase ? 

Thank you,
Maciej

Steve Ganem

unread,
Jun 2, 2016, 4:25:23 PM6/2/16
to Firebase Google Group
Hi Maciej,

Unlike Google Analytics, Firebase Analytics offers one Global "tracker" that is explicitly defined in your configuration file (GoogleService-Info.plist).   There are currently no plans to change this model.

That said, you might want to consider using a User Property to identify the source of traffic.  For example, if you register a User Property named "bundle_id" and, in the app, you set a User Property named "bundle_id" to the value of the BundleID of the extension, you could then filter all of your reports by that user property to effectively measure each extensions separately.

Maciej Kujalowicz

unread,
Jun 6, 2016, 1:33:08 PM6/6/16
to Firebase Google Group
Hi Steve,

Thank you for the answer. Your suggestion is very interesting, but one thing is still not perfectly clear to me. Are you saying that I can see all traffic from the main app and the extension in one Firebase application ? How can I do it ? When I'm adding an iOS application in the Firebase Web UI, it asks me to specify the bundle ID (e.g. com.yourapp.ios). Then I can download GoogleService-Info.plist and use it in my app. What about the extension ? I cannot use the same GoogleService-Info.plist there. Firebase will warn me that the bundle ID from GoogleService-Info.plist is inconsistent with the actual bundle ID (e.g. com.yourapp.ios.share). I don't want to create another app in the Firebase web UI for com.yourapp.ios.share. Can I just update BUNDLE_ID in GoogleService-Info.plist and track all traffic in one Firebase application ?

Thanks,
Maciej

Steve Ganem

unread,
Jun 6, 2016, 2:21:32 PM6/6/16
to Firebase Google Group
Hi Maciej,

Implied by my suggestion was the idea of manually logging all extension events through the main iOS app.  You'll have to decide if this meets your needs and is worth the manual effort to do so.

-Steve
Reply all
Reply to author
Forward
0 new messages