Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: one user, multiple subscriptions, different tags (160001) #1094

Closed
lmeurs opened this issue Aug 18, 2023 · 5 comments
Closed

[Bug]: one user, multiple subscriptions, different tags (160001) #1094

lmeurs opened this issue Aug 18, 2023 · 5 comments

Comments

@lmeurs
Copy link

lmeurs commented Aug 18, 2023

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.

image

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

@jkasten2
Copy link
Member

@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?

  1. All those devices are using the User Model SDK v16 SDK?
  2. Any OneSignal Server side SDKs are also using User Model versions.
  3. All onesignal.com/players calls have been update to onesignal.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?

@lmeurs
Copy link
Author

lmeurs commented Aug 18, 2023

Hi @jkasten2, thank you for the quick reply!

We are building a web push proof of concept (POC) based on the user model:

  1. We are not migrating from a previous version, so building the POC from the ground up
  2. Client side we use javascript SDK v16
  3. Server side we manually send API calls to https://onesignal.com/api/v1/...
  4. 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:

  1. One form with toggles to (un)subscribe to certain subjects
  2. One form to change prefered language

Client side

  1. We let users opt-in by clicking a custom button
  2. We log users in with a JWT as external ID
  3. After a user is logged in we call an API to initialize the user:
  4. we try looking up the user by a custom alias. If found, the user already exists, so we can exit
  5. 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
  6. 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

  1. The page with the forms is generated
  2. Form submissions are processed by sending PATCH requests to https://onesignal.com/api/v1/users/by/custom_alias/123456 to:
  3. Update tags OR
  4. Update language

In case of any interest, we can share our POC with you. Please contact me at [email protected].

@lmeurs
Copy link
Author

lmeurs commented Aug 20, 2023

Hi @jkasten2, thank you for contacting us through mail, glad to have shared some insights!

@lmeurs
Copy link
Author

lmeurs commented Aug 29, 2023

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!

@jkasten2
Copy link
Member

This issue was due to a backend issue with OneSignal, it has been fixed so any tag updates will no longer have this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants