Hey all you cool Mixpanelers and… mittens!
Joke aside, Cat here from Mixpanel Support! I am here to share some information about the new push notification tracking events that were released in February 2020 (Android v5.7.0, Obj-C v3.6.0, Swift v2.7.0).
The Mixpanel Messages team decided to add new events for push notification tracking to improve the engagement metrics of your messages. The existing events
$campaign_delivery (Message Sent) and
$campaign_received (Message Received), did not capture the full picture of how users are engaging with messages, so the new push tracking events are intended to help you learn more about your users. That being said, in order to preserve continuity for customer’s existing reports, the team decided to keep the existing push tracking events.
For transparency, here are a few reasons the Mixpanel Messages team wanted to improve the existing push tracking metrics:
$app_open(App Opened from Push) tracks only when Mixpanel re-initializes after tapping on the push notification. The issue is that it's not obvious when an app has actually gone into the background or not (and thus re-initializes Mixpanel). So a user could lock their phone, receive a push, tap it to open the app, and
$app_openmay still not fire.
$campaign_received(Message Received) tracks when the user receives the push only while the app is open, and does not measure if the user taps on or engages with the push notification.
To improve this experience, the team created new push tracking events:
$push_notification_received(Push Notification Received) tracks when the user's device receives a push notification from Mixpanel while the the app is foreground or background. Scenarios in which this event would not be tracked is if 1) the user's device is turned off, 2) the user changes to a new device (and has a new device token), 3) the user uninstalled the app, 4) the
NotificationServiceExtensionwas not installed, etc.
$push_notification_tap(Push Notification Tapped) tracks when the user taps on the push notification or action buttons within a push notification sent from Mixpanel. This event can overlap with
$app_openif the user taps on the push notification, the app opens, and Mixpanel re-initializes.
$push_notification_dismissed(Push Notification Dismissed) tracks when the user dismisses a push notification sent from Mixpanel. However this event does not track when notifications are dismissed (cleared) in a batch all at once.
Mixpanel will also track the
$campaign_delivery (Message Sent) event from Mixpanel's server (as opposed to from the mobile SDK) when the message is sent. Please do not confuse
$push_notification_received as a replacement for
$campaign_delivery. Not every
$campaign_delivery event will have a corresponding
$push_notification_received event due to the reasons mentioned above.
TLDR: If you are using the most recent version of Mixpanel Obj-C and Swift SDKs, install
NotificationServiceExtension. Although the old push tracking events will still be tracked, we recommend using
$push_notification_tap as the push "message opened" metric event going forward. It better tracks when your users engage with a push notification.