Services Plugins FAQs

Web push notifications Plugin Questions

Hi there,

I have started using this plugin and got it working for my chrome browser on macbook, which is pretty exciting. I have a few questions to understand how this works, so I can use it properly, hopefully this is the right place to ask.

I have created a Push Notifications thing in my platform (similar to the great instructions video) and have a user field and the notification item in there. Is the notification item specific to the single browser and single machine I am working on when it is created? Like, is this an address for this browser on my macbook or is something stored on my browser, like a cookie?

Closely related to the above, if I open chrome (logged into chrome as myself) on another macbook, are the notifications still sent to the original macbook?

Third Q - if I want to get a ping on my desktop browser and also on my phone and maybe another desktop when something happens, is this possible? I read on another post here that I need to do this via loop in bubble, which is cool, but is there a clever way to do this for multiple devices, run by a single user? I’m thinking run it on a loop for each Push Notification thing associated with this user, but that could get silly if the user has refreshed the permissions on multiple devices.

I hope these Qs make sense, happy to clarify any points.

Thank you!
Steve.

Hi @stevoster ,

Thank you for reaching out and apologies for delayed response over the weekend! :pray:

Great to hear that you got the Web Push Notifications plugin working on your MacBook! I’d be happy to clarify how it works and how you can manage notifications across multiple devices.

:one: Is the Push Notification item tied to a single browser/device?
Yes, when a Push Notification item is created, it is specific to the browser instance on that particular device. It functions similarly to a unique subscription key for that browser and is stored in the browser’s Service Worker, not as a cookie.

If the user clears their browser data or reinstalls Chrome, the stored subscription may be removed, requiring them to re-enable notifications.

:two: What happens if I open Chrome on another MacBook?
Even if you are logged into the same Google account, notifications will not automatically be sent to the new MacBook unless you explicitly subscribe on that browser as well.

Each browser instance on a different device has its own unique push subscription ID, so each must be registered separately to receive notifications.

:three: Can a user receive notifications on multiple devices at the same time?
Yes. To achieve this, you’ll need to:

  • Store multiple Push Notification items, one for each registered browser or device.
  • When sending a notification, loop through all stored Push Notification subscriptions tied to that user and send the message to each.

Optimizing for efficiency:

  • Add a “Last Active” timestamp to each stored subscription.
  • Periodically remove outdated or inactive subscriptions.
  • Only send push notifications to the most recent subscriptions associated with the user.

Looking forward to your reply. :sparkles:

Best Regards,
Support Team
Browse all Zeroqode Plugins for Bubble
Banner_Last3

Hey! Thanks for the response - that makes things a lot clearer, I really appreciate it. I have two follow up questions if that’s ok:

  1. Could you tell me how to capture the ‘last active’ date? Is this stored / returned somewhere when a notification is triggered and it is visible on the browser?
  2. Is there a way to delete a subscription from a browser? E.g. I want to test this by setting up a subscription a few times on my browser but I think I need to delete the old one before it lets me create a new one.

Thanks again,
Steve.

Hi @stevoster,

Glad to hear that helped! Absolutely, happy to answer your follow-up questions. :blush:

:clock3: Capturing the ‘Last Active’ Date

The Web Push Notifications plugin itself doesn’t automatically store a “last active” timestamp, but you can implement this yourself by updating a timestamp field in your database every time a notification is successfully sent.

Here’s a simple approach:

  • When sending a push notification, store the current date/time in a field (e.g., Last Active) tied to the user’s subscription.
  • If you want to track engagement, you could also log when a user clicks on the notification, updating Last Active at that point. This can be done by redirecting the user to a page and saving the timestamp when they visit.

This way, you’ll have a record of when each device/browser last received a notification.

:wastebasket: Deleting a Subscription from a Browser

Yes! There are a couple of ways to handle this:

:one: Clearing Browser Storage: If you’re testing and want to reset everything, you can try:

  • Open Chrome DevTools (F12 or Cmd + Option + I on Mac).
  • Go to Application > Storage > Clear site data.
  • Refresh the page and re-subscribe.

:two: Database Cleanup: If you need to programmatically clean up unused subscriptions, you could set a rule to remove subscriptions that haven’t been updated (e.g., Last Active > 30 days ago).

Also, just a quick note that we provide general support related to plugin issues and bug fixes, so for more advanced implementations, feel free to check out the Bubble forums for additional insights.

Let me know if you have any other questions! :rocket:

Best regards,
Support Team
Browse all Zeroqode Plugins for Bubble
Banner_Last3

Great info & advice - thanks again!

This works nicely for chrome & safari on my macbok. However, I’m having an issue getting this working on iOS Safari for iphone. I don’t get asked if I want to allow notifications. I checked the bubble log and the “Subscribe PushSubscriber A” step doesn’t get fired, (no mention of it in the log, the step is ignored) - so no triggering of the related event to create a subscription ‘thing’ either.

I have saved a shortcut thing to my iphone home screen. Is there something else I need to do? In my iphone settings, under Notifications I don’t see my app there. (Note this app is not wrapped, I don’t think this is an issue but just in case).

Thanks!
Steve.

Hey @stevoster ,

Thank you for your message! :sparkles:

Great to hear it’s working on Chrome and Safari on Mac! Regarding iOS Safari, web push notifications work differently:

  • iOS Requirements – Push notifications only work on iOS 16.4+ and require the app to be added to the home screen as a Progressive Web App (PWA).
  • User Interaction Needed – Unlike desktop browsers, iOS often requires a user action (like tapping a button) before prompting for notifications.
  • Subscription Not Triggering – If the “Subscribe PushSubscriber A” step isn’t running, check Bubble’s debugger/logs and ensure notifications are allowed in Settings > Safari > Notifications.
  • App Not Appearing in iOS Notification Settings – This usually means iOS hasn’t registered the app for notifications yet, which can happen if the subscription request wasn’t triggered correctly.

Since we provide general support for the plugin itself, we recommend checking Bubble forum for more advanced iOS-specific implementation details.

Looking forward to your reply! :pray:

Regards,
Support Team
Browse all Zeroqode Plugins for Bubble
Banner_Last3

Hey @stevoster,

Just wanted to follow up on my previous message to see if you were able to make any progress with the iOS Safari push notifications. I know it can be a bit tricky with iOS-specific requirements, so if you have any questions or need further assistance, feel free to reach out.

Looking forward to hearing from you! :slightly_smiling_face:

Best regards,
Support Team
Browse all Zeroqode Plugins for Bubble
Banner_Last3