-
Notifications
You must be signed in to change notification settings - Fork 308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Firebase Analytics #501
Comments
cc @cagryInside |
This looks like a good initial starting place for setting up Firebase in an Android project: |
Firebase impl on iOS is in OneBusAway/onebusaway-iphone#1366 |
I did a quick analysis on our @aaronbrethorst Could you do a quick count on iOS? If I'm interpretting the Firebase Analytics docs right, and our Google Analytics labels, it looks like we should be far below the 500 distinct free events threshold for Firebase Analytics free tier. |
Just talked to @aaronbrethorst, and good news - OBA iOS has already been converted to Firebase Analytics as part of some recent work. This also gives us a template to start with on Android. @aaronbrethorst is also open to changing some iOS events if it makes it easier to align on events across platforms. iOS details as of Oct 8th 2018 are below. Main Firebase Events (here in code) are:
Each of these events have key/value pairs attached to them for the data related to that event. For example:
If you want to see detailed iOS code, here is an example of a
Here is the search for all occurences of FIRAnalytics in OBA iOS: |
Also, to clarify - OBA iOS has Google Analytics and Firebase Analytics running in parallel right now. I plan to do the same with Android so we have the two running in parallel. After the December 3rd deadline for Google Analytics we can switch to sampling so GA continues to log events. |
@aaronbrethorst Are you currently capturing the region of the user in iOS Firebase analytics? I know agencies have always obviously wanted this attribute. I'm wondering if region should be logged as a "user property": Also, from some quick Googling it doesn't appear that Firebase Analytics has any "geo" properties. We could log lat/long as key value pairs for events where it makes sense, but from a glance it doesn't appear that the console has any special geo features to take advantage of that. |
Yes, I'm capturing the user's region (by name) as a user property: https://github.com/OneBusAway/onebusaway-iphone/blob/develop/OneBusAway/utilities/OBAAnalytics.m#L72 |
As part of this migration, we need to update |
Events defined by Firebase in the Android SDK are here: |
Here's the new versioning scheme for Google Play Services libraries on Android: As of version 15 of Play Services and Firebase, we can (and need to) get rid of our lock-step versioning - each library will be versioned independently. |
I'm getting this stack trace when trying to remove all the force-updating of dependencies in libraries and just using the most recent Firebase and Play Services dependencies:
Looks like it's a dependency conflict with ES SDK, in Google Play Services cloud messaging, in that the class that's needed by the ES SDK is missing. |
If I downgrade
|
* Revert to old Google Play Services for now, as we're having issues mixing ES SDK version and Play Services 15 and 16 (see #501 (comment)) * Remove requirement to force compileSdkVersion, as that's no longer needed
Google announced the expansion of the Firebase platform yesterday:
https://firebase.googleblog.com/2016/05/firebase-expands-to-become-unified-app-platform.html
We should take a close look at analytics:
https://firebase.google.com/docs/analytics/
This could potentially help us with our major Google Analytics problem, which is the limit on reported events - we've been around 10x over the limit for some time, and I'm not sure if/how that is affecting our data.
Looks like you can implement Google Analytics and Firebase Analytics side-by-side:
https://support.google.com/analytics/answer/2587086#firebase-ga
We'll probably want to do this and confirm that Firebase seems to work before changing anything with Google Analytics.
We'll also need to make sure there is a way to use Firebase on devices that don't support Google Play Services, such as the Amazon Fire Phone. Currently, with Google Analytics, it uses a Google Play Services-based implementation if Google Play Services is available on the device, and if not it uses a bundled Google Analytics JAR library.
The text was updated successfully, but these errors were encountered: