[Bug]: Tags not appearing in OneSignal dashboard after being added.
What happened?
After adding tags to a user via OneSignal.User.addTags(), I can fetch the tags successfully using OneSignal.User.getTags() and see them logged in my application. However, these tags do not appear on the OneSignal dashboard.
- React Native version: 0.74.3
Additional Information: I have confirmed that the tags are being added successfully, and there are no visible network errors in the logs. This issue occurs even after refreshing the dashboard multiple times.
Steps to reproduce?
1. Use `OneSignal.User.addTags()` to add tags to the user.
2. Use `OneSignal.User.getTags()` to confirm that the tags are added and fetched correctly.
3. Check the OneSignal dashboard, and the tags do not appear there.
Code
useEffect(() => {
if (patientProfile) {
OneSignal.User.getTags()
.then(tags => {
console.log('Current tags for the user:', tags);
})
.catch(error => {
console.error('Error fetching tags:', error);
});
OneSignal.User.pushSubscription.getIdAsync().then(id => {
console.log('Push subscription ID:', id);
});
OneSignal.User.pushSubscription.getTokenAsync().then(token => {
console.log('Push subscription token:', token);
});
console.log('Adding tags to OneSignal User');
OneSignal.User.addTags({
role: 'patient',
email: String(patientProfile.user.email || ''),
phone: String(patientProfile.user.phoneNumber || ''),
donor: String(patientProfile.bloodDonor ? 'yes' : 'no'),
});
}
}, [patientProfile]);
What did you expect to happen?
The tags should appear on the OneSignal dashboard after being added.
React Native OneSignal SDK version
5.2.2
Which platform(s) are affected?
- [X] iOS
- [X] Android
Relevant log output
- Current tags for the user: `{"donor": "yes", "email": "[email protected]", "phone": "+218123123123", "role": "patient"}`
- Push subscription ID: `ed124ccb-a2b0-4b9c-a4ba-a8c81ed89796`
- Push subscription token: `94f7ca889631e9fc124477e4f2929cdcf0d74dcbeff8aa41711d8270d6c69189`
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
As can be seen in the following screenshot the user is being registered but the user tags are not there.
Hello @hamzaali98 thanks for your patience. This may have just been a momentary lag in our dashboard logging. If you are still seeing this problem please let us know and we can investigate further!
any updates here ? I've exact same issue
Same issue. Very poor documentation.