[Bug]: one user, multiple subscriptions, different tags (160001)
lmeurs opened this issue · 5 comments
What happened?
We started testing on multiple devices in Chrome: a Windows laptop and through BrowserStack a Google Pixel 7 and Samsung S22 phone. On all devices we logged in to our test website using one single user. All subscriptions got registered correctly with the same OneSignal and external ID's, but tags seem not (fully) synchronized.
What browsers are you seeing the problem on?
Chrome (Chromium)
What operating system are you running?
W11, Android 13
Steps to reproduce?
See description
What did you expect to happen?
Tags to be the exact same for all subscriptions
Relevant log output
No response
@lmeurs Thanks for reporting!
In order for tags to match you must ensure all tag updates are done with the new OneSignal User Model SDKs and APIs. Can you confirm the following?
- All those devices are using the User Model SDK v16 SDK?
- Any OneSignal Server side SDKs are also using User Model versions.
- All
onesignal.com/players
calls have been update toonesignal.com/users
If all of the above is updated, can you share more details on how you are setting the tags so we can attempt to reproduce the issue?
Hi @jkasten2, thank you for the quick reply!
We are building a web push proof of concept (POC) based on the user model:
- We are not migrating from a previous version, so building the POC from the ground up
- Client side we use javascript SDK v16
- Server side we manually send API calls to https://onesignal.com/api/v1/...
- Our OneSignal account (app ID: 800f295a-a6b2-49c9-9fb1-2555e1e8df91) is not used in production, only contains test users, which are removed during testing all the time
This POC mainly exists out of two very basic forms:
- One form with toggles to (un)subscribe to certain subjects
- One form to change prefered language
Client side
- We let users opt-in by clicking a custom button
- We log users in with a JWT as external ID
- After a user is logged in we call an API to initialize the user:
- we try looking up the user by a custom alias. If found, the user already exists, so we can exit
- we try looking up the user by external ID. If found:
1. we set the custom alias (for internal usage only, which cannot be altered client side)
2. we set the user language
3. we set a default tag - We listen to permission and subscription change events to show/hide help messages, depending on whether web push is supported or web push permissions (default/denied/granted)
Server side
- The page with the forms is generated
- Form submissions are processed by sending PATCH requests to https://onesignal.com/api/v1/users/by/custom_alias/123456 to:
- Update tags OR
- Update language
In case of any interest, we can share our POC with you. Please contact me at lmeurs@gmail.com.
Hi @jkasten2, thank you for contacting us through mail, glad to have shared some insights!
Hi @jkasten2, do you have an update for us on the issue with multiple subscriptions with different tags? I hope the POC helped you in anyway. Please let us know if we can be of any further assistance!
This issue was due to a backend issue with OneSignal, it has been fixed so any tag updates will no longer have this issue.