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

Event

Description

Application Installed

User installed an app.

Application Opened

User opened an app.

Application Updated

User updated an app.

Application Backgrounded

User sent an app to their device's background.

Application Crashed

User's application crashed.

Application Uninstalled

User uninstalled an application.


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

Event

Description

Push Notification Received

User received a push notification on their device.

Push Notification Tapped

User tapped a push notification that was sent to their device.

Push Notification Bounced

A 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"
  }
}

Property

Type

Description

version

String

The version the user has installed

build

String

The 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"
  }
}

Property

Type

Description

from_background

Boolean

Set to true if the application transitioned from a Background state to an Inactive state prior to being sent to the foreground.

url

String

Value provided by UIApplicationLaunchOptionsURLKey from launchOptions. Compatible with iOS only.

referring_application

String

Value provided by UIApplicationLaunchOptionsSourceApplicationKey from launchOptions. Automatically collected by iOS devices only.

version

String

The version the user has installed

build

String

The 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"
  }
}

Property

Type

Description

previous_version

String

User's previous app version.

previous_build

String

User's previous build number.

version

String

User's current version number.

build

String

User'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": {}
}