click_action attribute for web push notification through FCM
There is some confusion on how to open a page once you click on the notification popup. The documentation asks to use FCMOptions link attribute however it does not correctly open the page but just brings the browser to the foreground with the last tab to focus(). The solution to this is to change the payload to use click_action.
"notification":{
"body":"this is the notification text",
"title":"New Notification",
"click_action":"https://theURLyouwanttoopen.com/"
}
Check more