Firefox OS/Metrics/App Usage

From MozillaWiki
< Firefox OS‎ | Metrics
Revision as of 22:33, 18 September 2014 by Marshall law (talk | contribs) (Created page with "=Requirements= For all system and 3rd party apps, track: # Total time that each app (by URL) has been actively been used (in the foreground while the screen is on) # Counts fo...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Requirements

For all system and 3rd party apps, track:

  1. Total time that each app (by URL) has been actively been used (in the foreground while the screen is on)
  2. Counts for the number of times an app has been opened, closed, or crashed
  3. A list of apps that have been uninstalled since the last successful report

These metrics should be collected and submitted to our telemetry server periodically.

Example JSON payload

{
      start: timestamp of batch start time (in millisecond format),
      stop: timestamp of batch end time,
      deviceID: "0i9n4ffh" // a unique id used to link batches together,
      locale: "en_US" // the user's language from navigator.language,
      screen: {
        width: the screen width in css pixels,
        height: the screen height in css pixels,
        devicePixelRatio: device pixels per css pixel
      },
      deviceinfo: {
        'deviceinfo.update_channel': update channel,
        'deviceinfo.platform_version': gecko version number (I think)
        'deviceinfo.platform_build_id': more version details,
        'developer.menu.enabled': if true user probably has abnormal app usage patterns!
      },
      apps: {
         // the properties of this object are application origins and the values of those properties are
         // the usage data for those applications.  For example:
         'homescreen.gaiamobile.org': {
           usageTime: total app usage time during this reporting period, in seconds
           invocations: number of times the app has been opened in this period
           installs: number of times this app has been installed in this period
           uninstalls: number of times this app has been uninstalled in this period
           activities: { // the activity handlers this app has invoked, and how many times
             'gallery.gaiamobile.org': 1,    // gallery handled an activity once
             'wallpaper.gaiamobile.org': 4   // wallpaper app handled activity 4 times
           }
         },
         // more app data here
      }
}