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

[Question]: Web SDK to send session data without registering web push? #1105

Open
erictse opened this issue Sep 14, 2023 · 1 comment
Open

Comments

@erictse
Copy link

erictse commented Sep 14, 2023

How can we help?

I want to use the Web SDK to measure webpage activity (session count, duration, last session timestamp), but I don't need web push–I just use addEmail() to create an email subscription. However, I cannot get the Web SDK to send the session data and have it update the email subscription in the web dashboard. When I did enable web push, I see the web push subscription in the dashboard, and Web SDK does the correct thing and sends the session data.

Is there a bug or did I misunderstand? I thought the Web SDK is supposed to update all subscriptions (since conceptually there is a single OneSignal user) that match an external ID with the session data. The session management code in the Web SDK seems sophisticated so I need to utilize what you have instead of building my own solution.

@jkasten2
Copy link
Member

@erictse There is a current limitation for this SDK where a push subscription has to exists before it will create the User and attach other subscription (like email) to it.

We plan to lift this limitation in the future so any subscription (email or SMS included) will create a User.

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

No branches or pull requests

2 participants