Post Closed
30
Views
2
Comments
[PWA PushWoosh Sample] Specify UserID / Tag for device/user-specific notifications
Question
pwa-pushwoosh-sample
Mobile icon
Forge asset by Ricardo Costa

Hi Ricardo

Have you perhaps implemented a version where you specify the UserId or some tags to enable device/user-specific notifications?

I will be grateful if you can help me out here!

Hanno

2025-09-25 22-50-38
Hanno

Digging a little deeper, I found this page: https://docs.pushwoosh.com/platform-docs/pushwoosh-sdk/web-push-notifications/web-push-sdk-3.0 

It explains how to achieve what I need.

Basically I needed to just call the following to register the UserId:

Pushwoosh.push(function(api) {

    console.log('Registering UserID: ' +  $parameters.UserId);
    
    // Register user ID
    api.registerUser('' + $parameters.UserId + '');
    
});



UserImage.jpg
adom anim

I've been using pushwoosh for a project, and it seems inconsistent and I haven't been able to nail down a pattern to file a bug report. Sometimes it works, sometimes it doesn't, same code, different day. Their logs say it was sent successfully, the phones don't show the notification. Then another day it works just fine. Client is mad at me for spending so much time trying to figure out the inconsistency - I haven't used FCM or Ionic Push but if I was starting fresh I would certainly pick one of those to try over pushwoosh