OneSignal-Website-SDK
OneSignal-Website-SDK copied to clipboard
[Question]: Web SDK to send session data without registering web push?
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.