OneSignal / OneSignal-Website-SDK

OneSignal is a push notification service for web and mobile apps. This SDK makes it easy to integrate your website with OneSignal Push Notifications. https://onesignal.com
Other
383 stars 115 forks source link

[Question]: How to customize click behaviour on React or Python SDK #1160

Closed adrienthiery closed 4 months ago

adrienthiery commented 4 months ago

How can we help?

Hi there, I saw in the documentation that OneSignal offers customization on the "Click behaviour" (https://documentation.onesignal.com/docs/web-push-options#click-behavior) but I can't find any mention anywhere in the platform specific documentation.

Namely:

there are several possible ways the browser can behave that you can configure:

  • Exact Navigate (default) - If the notification's exact URL (e.g. example.com/product) matches a tab that the browser already has open, the browser will navigate to the notification's URL in that tab.
  • Origin Navigate - If the notification's origin (e.g. example.com) matches a tab that the browser already has open, the browser will navigate to the notification's URL in that tab.
  • Exact Focus - If the notification's exact URL (e.g. example.com/product) matches a tab that the browser already has open, the browser will focus on that tab, but not refresh the page.
  • Origin Focus - If the notification's origin (e.g. example.com) matches a tab that the browser already has open, the browser will focus on that tab, but not refresh the page.

I checked:

Any idea where I can find that info? Thanks a lot!

adrienthiery commented 4 months ago

I think I finally found something that relates in the JS docs : https://documentation.onesignal.com/docs/web-sdk#initializing-the-sdk

image