Skip to content

Tracking and Analytics

Sean Barbeau edited this page Dec 1, 2016 · 14 revisions

OneBusAway iOS currently uses Google Analytics for iOS, v3 and OneBusAway Android uses Google Analytics for Android, v4 for production for production and beta testing in-app tracking statistics. All data is collected in aggregate, and without identifying information. The following is a summary of the interactions we track:

  • Sessions: Google Analytics automatically tracks user sessions, or a single period of user interaction. The tracker is initialized upon loading the app and dispatches every 120 seconds on iOS and Android devices without Google Play Services installed (the suggested GA default to balance battery life/timely dispatch), or as determined by Google Play Services on Android devices with that installed. Currently GA groups hits that take place within a 30 minute period into the same session. We also use the current GA default timeout interval of 30 seconds (i.e. the tracker will stop dispatching after the app has been in the background for over 30 seconds). Lastly we send the current region and other settings status upon load as events, even though it is not a user action.
Event Category Event Action Event Label When? Platform
app_settings configured_region API Region: region name App start & resume iOS
app_settings general Set Region Automatically: YES or NO App start & resume iOS
app_settings general Show Experimental Regions: YES or NO App start & resume iOS
app_settings startup Startup View: view loaded at startup App start iOS
app_settings configured_region_auto Set Region Automatically: new region; Old Region: old region Auto region config iOS
  • Views: We track each time a unique view within the app is loaded. The tracking code executes within the viewDidAppear() or viewDidLoad() methods on iOS, or onStart() method on Android. The tracking code sends the name of the view along with the hit.

  • Events: We track certain events and button presses within the app.

    • Button Presses:
      • When the information button or 'About this Stop' tab is tapped in the stop details view, along with the region that is set when the button is pressed (e.g., "Loaded StopInfo from set_region_name")
      • When the user taps "Feature Requests" from the Info tab ("Clicked Feature Request Link")
      • When the user turns on the 'Experimental Regions' option ("Turned on Experimental Regions")
      • When the user turns off the 'Experimental Regions' option ("Turned off Experimental Regions")
      • When the user clicks Facebook/Twitter/Email link under "Contact Us" ("Clicked Facebook/Twitter/Email Link")
    • Accessibility (iOS only):
      • When the user is running VoiceOver, Apple's native screen-reader, on the Stop Details view ("VoiceOver running")
      • When information button is pressed while running VoiceOver ("StopInfo accessed with VoiceOver")
      • When user turns on "Increase Contrast" setting
    • Actions:
      • When the user sets a new region (including upon first installation, as well as custom API URLs) along with the region name ("Set Region: region_name")
      • When the user submits a problem report ("Reported Problem")
      • When the user edits a bookmark ("Edited Bookmark")
      • When the user sets a bookmark group ("Edited Bookmark Group")
    • Stop Search (Android only):
      • When the user taps the stop from the HomeActivity
      • Tracking parameters:
        • Region

        • Stop Id

        • Stop distance -> We track the distance between users' current location and the selected stop:

          | User Distance: | | :-------------: | |00000-00050m| |00050-00100m| |00100-00200m| |00200-00400m| |00400-00800m| |00800-01600m| |01600-03200m| |03200-INFINITY| We **do not** store or collect any private location (e.g., exact latitude/longitude) information.

  • Device/Version Information (collected by GA by default):

    • Device information such as model and current software version (no unique device identifiers are stored)
    • Network name
    • Current app version (e.g., "OBA iOS v2.2", "OBA Android v21.1")

Google Analytics stores location information to the level of what city the user is in. It does not store exact latitude/longitude. No demographic information such as age or gender is tracked.

###Difference between iOS and Android

iOS Android
- stop_metrics
app_settings -> startup -
accessibility -> increase_contrast -
accessibility -> voice_over accessibility -> touch_exploration_on
ui_action -> button_press -> Out of region alert -
ui_action -> app_switch -> facebook -
ui_action -> button_press -> Cancel search button clicked -
- ui_action -> button_press -> Clicked MapStopIcon
- submit -> report_problem -> Reported Trip Problem
- submit -> report_problem -> Reported Stop Problem