ePrivacy and GPDR Cookie Consent by Cookie Consent Skip to main content

System events for Mobile Push

Once you have successfully configured at least one Firebase project and app, system events will automatically populate in the CDP under the Meiro Mobile Push source. This documentation provides a comprehensive overview of these system events along with their structures and examples.


Mobile Push registration token registered

The event 'Mobile Push Registration Token Registered' is triggered when the app developers send it to Meiro events. However, this event should only be sent after the registration token is created and the user has granted consent to receive mobile push notifications.

Event Type: mpn_registration_token_registered
Retention: Not applicable (not changeable)
Autoload: Enabled

Event structure:

Learn more: about the structure of the 'Mobile Push registration token registered' event in this article.

Event example:

{
  "user_id": "2701e207-1f81-45bf-8ca3-1495a54fa74a",
  "event_type": "mpn_registration_token_registered",
  "event_timestamp": "2024-02-20T13:00:00.000Z",
  "version": "1.0.0", 
  "session_id": "",
  "event_data": {},
  "app": {
    "id": "1:353411649331:ios:a33ec2e13a7c9d61fa7846",
    "language": "en",
    "name": "Meiro testing project - iOS",
    "version": "1.0.0"
  },
 "os": {
    "type": "ios",
    "version": "12"
  },
  "device": {
    "manufacturer": "Samsung",
    "model": "Galaxy S21"
  },
  "firebase": {
    "project_id": "firebase_project_id",
    "registration_token": "c0izYhQzpUqIpBCs4q18_y:APA91bFrfkaOx42rNwa2q6tP1oWEHUOZDdGdpuMJ6LtuIujpiU-S2Mry_lHkAFCKY8Hb8vOwaE7LL1MFcObrA1QR9jRLO7eG26yI1KlOmke-Kl9rOoqIWOfJXpZvttldv7QnyxlmIWpD"
  }
}

Mobile Push registration token refreshed

This event automatically refreshes a previously registered token. It is sent periodically, once a month, regardless of the application's running state or launching status. This ensures that the token remains active when sending push notifications. The event includes the FCM refresh timestamp in the request payload.

Event Type: mpn_registration_token_refreshed
Retention: 60 days (not changeable)
Autoload: Enabled

Event structure:

Learn more: about the structure of the 'Mobile Push registration token refreshed' event in this article.

Event example:

{
 "user_id": "0c4846c8-653f-450c-8302-acec4a01ae1c",
"event_type": "fcm_registration_token_refreshed",
  "event_timestamp": "2024-02-20T14:00:00.000Z",
  "version": "1.0.0",
 "event_data": {
    "fcm_registration_token_refresh_timestamp": "2024-02-09T18:45:41.062Z"
  },
"app": {
    "id": "1:353411649331:ios:a33ec2e13a7c9d61fa7846",
    "language": "en",
    "name": "Meiro testing project - iOS",
    "version": "1.0.0"
  },
 "os": {
    "type": "ios",
    "version": "optional string"
  },
"device": {
    "manufacturer": "Apple",
    "model": "iPhone 12"
  },
  "firebase": {
    "project_id": "meiro-testing-project",
    "registration_token": "ezXWHC4cKUhpmiubVZJNSC:APA91bFYSFRR6wHwZ5v_guTCJHJ8kpBJB-OCegDPYRZnjN_ZZZFxrjIqawPQ_wYivgpK4fbHEux6P0XAjMUFP7w4WWPXXj6WQmthKPXkX5o17zfJf17OiW2JKTxxzPfR_nvLwzfiS3ax"
  }
}

Mobile Push registration token unregistered

This event indicates that a previously registered token has been unregistered, typically due to the user opting out of push notifications or other reasons. It includes the error type (such as "unregistered," "invalid registration," "invalid package name") and the project ID associated with the registration token. 

We can compare unregistered tokens to bounced emails, where both refer to unsuccessful delivery of a message due to an error or issue.

Event Type: mpn_registration_token_unregistered
Retention: Not applicable (not changeable)

Event structure:

{
 "project_id": "required_string",
  "registration_token": "required_string"
  "error_type": "unregistered" | "invalid registration" | "invalid package name"
  "event_type": "fcm_registration_token_unregistered", //required
}

Event example:

{
  "error_type": "unregistered",
  "event_type": "fcm_registration_token_unregistered",
  "project_id": "meiro-testing-project",
  "registration_token": "fakepvp-SbuWp3S5zYwXeZ:APA91bEht5olNJ7AHSCIE2dh1FNAxsnD5MxmG9oPoscpbWE915tQQ_GTW6KLpzoUoSNcf-w_xK7c1_26uNJ5P4hRjDScXlQkDqUD9QCmStLJfm2zh15_KobTJ-uwUqPLo-tAUxAcX6QY"
}

Mobile Push Sent

This event signifies that a push notification has been successfully sent to a user's device. It includes information such as the activation ID, message ID, push notification details (title, body, image URL, etc.), and the registration token to which the notification was sent.

Event Type: mpn_sent
Retention: No retention, but customizable

Event structure:

{
    "type": "object",
    "properties": {
        "activation_id": {"type": "number"},
    "app_name": "string",
    "message_id": "string,
        "push_notification": {
"custom_data": {
      		"action": "app/browser/deepling",
      		"message_id": "string",
      		"url": ""
    },


            "type": "object",
            "properties": {
                "id": {"type": "string", "format": "uuid"},
                "name": {"type": "string"},
                "title": {"type": "string"},
                "url": {"type": "string"},
                "image_url": {"type": "string"}
            },
            "required": ["id", "name", "title"]
        },
        "registration_token": {"type": "string"}
    },
    "required": ["activation_id", "push_notification", "registration_token"]
}

Event example:

{
  "activation_id": 4,
  "app_name": "App",
  "message_id": "4a8037e2-76d3-428c-b842-ffb4b0a249df",
  "push_notification": {
    "custom_data": {
      "action": "app",
      "message_id": "4a8037e2-76d3-428c-b842-ffb4b0a249df",
      "url": ""
    },
    "id": "c647e942-2e20-43b7-b054-a2d56c8d02ba",
    "image_url": "https://me.dev.meiro.tech/sdk/images/0awxFqQpquumbE24YqXbLzUt.png",
    "name": "New",
    "title": "Title ",
    "url": ""
  },
  "registration_token": "fRIppvp-SbuWp3S5zYwXeZ:APA91bEht5olNJ7AHSCIE2dh1FNAxsnD5MxmG9oPoscpbWE915tQQ_GTW6KLpzoUoSNcf-w_xK7c1_26uNJ5P4hRjDScXlQkDqUD9QCmStLJfm2zh15_KobTJ-uwUqPLo-tAUxAcX6QY"
}

Custom event implementation

In Firebase, some events are automatically collected unless disabled through settings. These events provide valuable insights into user behavior and app interactions.

Here is a list of some automatically collected events:

  • app_clear_data: is triggered when the user resets or clears the app data, removing all settings and sign-in data. (Android only)
  • app_remove: Occurs when an application package is removed (uninstalled) from an Android device. (Android only)
  • firebase_in_app_message_action: is recorded when a user takes action on a Firebase In-App Message, with parameters including message name, device time, and message ID.
  • firebase_in_app_message_impression: is logged when a user sees a Firebase In-App Message, including message name and device time.
  • first_open: marks the first time a user launches an app after installing or re-installing it, with parameters like previous app ID and engagement time.
  • notification_dismiss: is triggered when a user dismisses a notification sent by Firebase Cloud Messaging (FCM) on Android devices, with message-related parameters.
  • notification_foreground: is captured when a notification sent by FCM is received while the app is in the foreground, providing message-related details.
  • notification_open: is logged when a user opens a notification sent by FCM, including message-related parameters.
  • notification_receive: is recorded when a notification sent by FCM is received by a device while the app is in the background (Android only), with message-related parameters.

Learn more: about the full list of automatically collected events by Firebase

The real-time solution to obtain these events is via Google Cloud Computing Event Triggers, which react to events within your Google Cloud project and correspond to event-driven functions. Learn more in this article.