Understanding the Issue
When a user downloads the app, a random key is generated, which can be used to send messages. However, this approach can lead to issues with contact counts, as noted by another community member.
Solution Overview
To address this issue, you can implement the SDK to reset the SubscriberKey to the SF ID once the user registers or logs in. This will retain the association even when the user is logged out, as it is linked to their MC device ID.
The root cause of the issue is the lack of a unique identifier for anonymous users, which can lead to duplicate contacts and inaccurate reporting.
Implementation Details
To implement this solution, you can follow these steps: first, integrate the SDK and generate a temporary unique ID for anonymous users. Then, when the user registers or logs in, update the SubscriberKey to the SF ID. Finally, implement a cleanup process to remove inactive users and prevent duplicate contacts.
MobilePushConfig.js
var config = {
'appId': 'YOUR_APP_ID',
'accessToken': 'YOUR_ACCESS_TOKEN',
'subscriberKey': 'SF_ID'
};
Best Practices
To get the most out of Mobile Push, follow these best practices: implement a cleanup process to remove inactive users, suppress the creation of a subscriber at the SDK level until the user logs in or registers, and monitor your anonymous download rates to optimize your strategy.
Checklist for Handling Anonymous Users
- Integrate the SDK and generate a temporary unique ID for anonymous users
- Update the SubscriberKey to the SF ID when the user registers or logs in
- Implement a cleanup process to remove inactive users
- Suppress the creation of a subscriber at the SDK level until the user logs in or registers
- Monitor anonymous download rates to optimize your strategy
What happens if I don’t implement a cleanup process?
If you don’t implement a cleanup process, you may end up with duplicate contacts and inaccurate reporting.
Can I use the temporary unique ID to send messages to anonymous users?
Yes, you can use the temporary unique ID to send messages to anonymous users, but you should implement additional configuration to manage these users effectively.
How often should I run the cleanup process?
You should run the cleanup process monthly or quarterly, depending on your anonymous download rates and user activity.
What is the best way to monitor anonymous download rates?
You can monitor anonymous download rates using analytics tools, such as Google Analytics or SFMC reporting.
Need help shipping this in production?
Genetrix builds and untangles Salesforce Marketing Cloud and Agentforce setups for teams that want it done right the first time. If anything in this post sounds familiar, talk to us before it ships.