infobip / mobile-messaging-react-native-plugin

Mobile Messaging SDK plugin for React Native projects
24 stars 4 forks source link

Uninstall events are not being recorded #65

Closed jorgerojas26 closed 1 month ago

jorgerojas26 commented 6 months ago

Hello, as the title says, uninstall events are not being recorded by the sdk.

Package version:

"infobip-mobile-messaging-react-native-plugin": "8.4"

SDK Initialization on index.js:

mobileMessaging.supportedEvents.forEach(event => {
    mobileMessaging.subscribe(event, handleMobileMessagingEvent);
});

mobileMessaging.init(
    {
        applicationCode: app_settings.infobip.appCode,
        ios: { notificationTypes: ['alert', 'badge', 'sound'] },
    },
    () => {},
    error => {
        console.log('MobileMessaging error: ', error?.description);
    }
);
...
AppRegistry.registerRunnable(appName, props => {
    AppRegistry.registerComponent(appName, () => App);
    TrackPlayer.registerPlaybackService(() => Player);
    AppRegistry.runApplication(appName, props);
});

After user login:

mobileMessaging.personalize(
            {
                userIdentity: {
                    emails: [email],
                    externalUserId: id
                },
                userAttributes: {
                    firstName: first_name,
                    lastName: last_name,
                    customAttributes,
                },
                forceDepersonalize: true,
            },
            user => console.log('infobip user personalized', { user }),
            error => console.error('infobip user personalized error', { error })
);

I followed carefully all the required setup steps for Android and IOS, including the addition of the Notification Service Extension on IOS.

Expected behavior:

Users who did uninstall our App must send an "Uninstall" event to the Infobip servers.

Actual behavior:

The sdk is not sending the "Uninstall" event to the infobip servers, so, the installation on th ePerson profile in the Infobip portal stays as qualified to receive push notifications and are not being filtered when making broadcasts, resulting in terrible push notifications campaign results.

Metrics on Infobip portal of user uninstalls since our last release

image

Uninstall metrics from Firebase for the same date range

image

alboldy-ib commented 6 months ago

Hello @jorgerojas26 ,

We are tracking uninstalls only after confirming that app had been uninstalled by sending push notification to the installation - as described in this article , it will be removed from People service in up to 48 hours.

We will check your second request more thoroughly: new app version should not cause new registrations to be created in the first place.

jorgerojas26 commented 6 months ago

Hello @alboldy-ib, thanks for your response.

The thing is, as you can see in the image i posted with the infobip metrics, uninstall events are basically 0 while in Firebase and Google Play Console, for the same time frame, uninstalls events are around 1k.

Yesterday i sent a silent push notification to around 23k users to check how many installations could receive it, here are the metrics from /push/1/statistics API.

image

As you can see, almost 15k installations throws registration error, which in fact is the 8001 error (see https://www.infobip.com/docs/essentials/response-status-and-error-codes).

How can we resolve this issue? We definitely need to clean up our user base because infobip is not cleaning it.

alboldy-ib commented 6 months ago

Hello @jorgerojas26 , After receiving error on either trying to deliver push or performing dry-run, installation is marked as to be deleted. Such installation will be removed in up to 48 hours, the logic is not to remove them immediately.

riskpp commented 1 month ago

Closing the issue because no additional questions or comments added for a long time.