Tracking uninstalls
Learn how to set up uninstall tracking through the Braze SDK. For general information, see User Guide: Unistall tracking.
Setting up uninstall tracking
Step 1: Set up FCM
The Android Braze SDK uses Firebase Cloud Messaging (FCM) to send silent push notifications, which are used to collect uninstall tracking analytics. If you haven’t already, set up or migrate to the Firebase Cloud Messaging API for push notifications.
Step 2: Manually detect uninstall tracking (optional)
By default, the Android Braze SDK will automatically detect and ignore silent push notifications related to uninstall tracking. However, you choose to manually detect uninstall tracking using the isUninstallTrackingPush()
method.
Because silent notifications for uninstall tracking are not forwarded to any Braze push callbacks, you can only use this method before you pass a push notification to Braze.
Step 3: Remove automatic server pings
A silent push notification will wake your app and instantiate the Application
component if it app isn’t already running. So, if you have a custom Application
subclass, remove any logic that automatically pings your servers during your Application.onCreate()
lifecycle method.
Step 4: Enable uninstall tracking
Finally, enable uninstall tracking in Braze. For a full walkthrough, see Enable uninstall tracking.
Tracking uninstalls can be imprecise. The metrics you see on Braze may be delayed or inaccurate.
Setting up uninstall tracking
Step 1: Enable background push
In your Xcode project, go to Capabilities and ensure you have Background Modes enabled. For more information, see silent push notification.
Step 2: Ignore internal push notifications
The Swift Braze SDK uses background push notifications to collect uninstall tracking analytics. To ensure your app doesn’t make unwanted actions when these are sent, you’ll need to ensure that internal push notifications are ignored.
Step 3: Send a test push (optional)
Next, send yourself a test push notification from the Braze dashboard (don’t worry—it won’t update your user profile).
- Go to Messaging > Campaigns and create a push notification campaign using the relevant platform.
- Go to Settings > App Settings and add the
appboy_uninstall_tracking
key with relevanttrue
value, then check Add Content-Available Flag. - Use the Preview page to send yourself a test uninstall tracking push.
- Check that your app does not make any unwanted automatic actions when it receives a push notification.
A badge number will be sent along with the test push notification—however a real uninstall tracking push won’t send any badge numbers.
Step 3: Enable uninstall tracking
Finally, enable uninstall tracking in Braze. For a full walkthrough, see Enable uninstall tracking.
Tracking uninstalls can be imprecise. The metrics you see on Braze may be delayed or inaccurate.