Skip to content
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

Match OBA Android Firebase Analytics events and user properties #457

Closed
barbeau opened this issue May 19, 2016 · 2 comments
Closed

Match OBA Android Firebase Analytics events and user properties #457

barbeau opened this issue May 19, 2016 · 2 comments

Comments

@barbeau
Copy link
Member

barbeau commented May 19, 2016

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/

Firebase Analytics provides unlimited reporting on up to 500 distinct events.

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're going to look at this on Android as well - OneBusAway/onebusaway-android#501. We will keep everyone posted when we make progress there.

@barbeau barbeau changed the title Implement Firebase Analytics? Match OBA Android Firebase Analytics profile Mar 25, 2019
@barbeau barbeau changed the title Match OBA Android Firebase Analytics profile Match OBA Android Firebase Analytics events and user properties Mar 25, 2019
@barbeau
Copy link
Member Author

barbeau commented Mar 25, 2019

I just finished and merged the OBA Android Firebase Analytics implementation:
OneBusAway/onebusaway-android#936

(plus one tweak in OneBusAway/onebusaway-android@bd3ad14)

We'd like to align iOS and Android because they share a Firebase account and it will make reporting across both apps simpler.

I've implemented support for the following events in OBA Android using the pre-defined Firebase EVENT and PARAM constants (which allows us to analyze these events within the Firebase console without having to dump data out to BigQuery, which can cost extra):

  • SELECT_CONTENT for generic UI events
  • LOGIN for Embedded Social logins
  • SEARCH for search events
  • VIEW_ITEM for viewing bus stop with distance from stop included in metadata

I've implemented support for the following custom user properties in OBA Android:

  • RegionName - This is already implemented in iOS, and I used the same string value for Android
  • accessibility - If YES the user has opted to turn on their device accessibility settings (e.g., TalkBack on Android), if NO they have not turned it on
  • left_handed - If YES the user has enabled the "left-handed" mode, if NO they are using the default mode that favors right-handed people
  • send_anonymous_data - If YES the user has the setting enabled to allow anonymous usage data collection, if NO the user has disabled anonymous usage data collection
  • show_departed_vehicles - If YES the user has opted to show negative prediction times (i.e., vehicle just departed) (default), or if NO the user has opted to hide them

The easiest way to view the implementation, including the strings logged for each parameter, is to look at the ObaAnalytics class in Android Studio and look at usages of each method there:
https://github.com/OneBusAway/onebusaway-android/blob/master/onebusaway-android/src/main/java/org/onebusaway/android/io/ObaAnalytics.java

In many cases I've kept the same strings for the parameters that we used in Google Analytics to facilitate tracking the events across both datasets. In other cases I've changed the text when the original wasn't clear.

@aaronbrethorst Please let me know if you have any questions about the above!

@aaronbrethorst aaronbrethorst transferred this issue from OneBusAway/onebusaway-iphone Aug 6, 2021
@aaronbrethorst
Copy link
Member

this is finally done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants