Mobile Spec

MetaRouter's mobile spec helps you define key events as your users interact with your mobile app, install/delete your app, receive notifications, and more. The events listed below relate specifically to events generated by the Installing Analytics.js for iOS and Installing Analytics.js for Android SDKs.

Overview of Events

Application Lifecycle Events

EventDescription
application_installedUser installed an app.
application_openedUser opened an app.
application_updatedUser updated an app.
application_backgroundedUser sent an app to their device's background.
application_crashedUser's application crashed.
application_uninstalledUser uninstalled an application.


Campaign Events
Please reach out to the MetaRouter team if you would like to implement the below Campaign Events.

EventDescription
push_notification_receivedUser received a push notification on their device.
push_notification_tappedUser tapped a push notification that was sent to their device.
push_notification_bouncedA notification was not able to be delivered to a user's device, typically due to a user unsubscribing from notifications.

Lifecycle Events

The MetaRouter iOS and Android SDKs can be toggled to track the following lifecycle events automatically:

application_installed

The Application Installed event will be fired upon a user's first open of your app (not necessarily at the time of install). This means that if a user installs your app, but never opens it, this event will not be triggered.

{
  "userId": "gt489t54b0",
  "type": "track",
  "event": "application_installed",
  "properties": {
    "version": "2.2.4", "build": "124"
  }
}
PropertyTypeDescription
versionStringThe version the user has installed
buildStringThe installed app's build number

application_opened

The Application Opened event fires when a user either opens (including after an Application Installed event), or they bring a previously backgrounded app to the foreground.

{
  "userId": "gt489t54b0",
  "type": "track",
  "event": "application_opened",
  "properties": {
    "from_background": false,
    "referring_application": "Outlook",
    "url": "url://location"
  }
}
PropertyTypeDescription
from_backgroundBooleanSet to true if the application transitioned from a Background state to an Inactive state prior to being sent to the foreground.
urlStringValue provided by UIApplicationLaunchOptionsURLKey from launchOptions. Compatible with iOS only.
referring_applicationStringValue provided by UIApplicationLaunchOptionsSourceApplicationKey from launchOptions. Automatically collected by iOS devices only.
versionStringThe version the user has installed
buildStringThe installed app's build number

application_backgrounded

The Application Backgrounded event should be fired when a user backgrounds their app, upon applicationDidEnterBackground.

{
  "userId": "gt489t54b0",
  "type": "track",
  "event": "Application Backgrounded",
  "properties": {}
}

`application_updated

The Application Updated event should be triggered when a user updates their app. The event will fire upon the user's first app open since an update and will replace the Application Opened lifecycle event.

{
  "userId": "gt489t54b0",
  "type": "track",
  "event": "application_updated",
  "properties": {
    "previous_version": "2.2.4",
    "previous_build": "124",
    "version": "2.2.5",
    "build": "201"
  }
}
PropertyTypeDescription
previous_versionStringUser's previous app version.
previous_buildStringUser's previous build number.
versionStringUser's current version number.
buildStringUser's current build number.

application_uninstalled

The Application Uninstalled event should be triggered when a user uninstalls your app.

{
  "userId": "gt489t54b0",
  "type": "track",
  "event": "application_uninstalled",
  "properties": {}
}

application_crashed

The Application Crashed event should be triggered when you receive a notification from your app that is has crashed. This event should not be used for traditional crash reporting; however, it can be helpful to understand who the users are that are experiencing app crashes the most.

{
  "userId": "gt489t54b0",
  "type": "track",
  "event": "application_crashed",
  "properties": {}
}