Overview - Push Permission
Push notifications permission is an app-level permission that your app gets on a user’s device. This permission is required to display push notifications on users’ notification trays. If this permission is turned off, the notifications that you send will not be visible to the user; they will get delivered in the background to your app silently.How Does Push Permission Work?
Permission for Web push depends on the browser and the device’s operating system (OS). There are a few commonalities in the behavior of most of the browsers:- By default, the website cannot send notifications until the user grants permission.
- The user must grant permission to the website by:
- Accepting permission on a dialog box provided by the browser
- Enabling permission from the browser notification settings for the website
- If the user grants permission, the app can send notifications to the user.
- If the user does not grant permission, the app cannot send notifications to the user.
- The behavior of the dialog box differs depending on the browser.
| Browser | Behavior on clicking “Allow” (or equivalent action) | Behavior on clicking “Block” (or equivalent action) | Behavior on Ignoring the Dialog Box |
|---|---|---|---|
| Chrome, Opera | Permission is granted to the website and it can send notifications. | Permission is denied to the website and it cannot send notifications. The website cannot also ask for permission through the dialog box again. | Permission is denied to the website and it cannot send notifications. The website can ask for permission through the dialog box again. |
| Safari, Edge, Firefox | Permission is granted to the website and will be able to send notifications. | Permission is denied to the website and it cannot send notifications. The website cannot also ask for permission through the dialog box again. | Permission is denied to the website and it cannot send notifications. The website cannot also ask for permission through the dialog box again. |
Tracking Push Permissions
From September 9, 2024 onwards, you will be able to track Push permission for a user from the Reachability Push Web attribute.Tracking Push Permission Status at a User Level
This attribute will have the following values:| Value | Description |
|---|---|
| 201 - Reachable and opted in | This applies to all users who have a valid push token and are opted-in from at least one browser. |
| 202 - Not reachable due to opt-out | This applies to all users who have opted out from all browsers where they had a valid push token. |
| 200 - Reachable and opt-in status unknown | This applies to all users who have not yet opened the website after the tracking changes are released and have a valid push token. |
- Unlike Android and iOS, web push notifications generate push tokens only when the user allows the browser to send push notifications.
- A user with the status ‘202—Not reachable due to opt-out’ has a device where they opted in first and then opted out while still having a valid push token.
- A new Web device, by default, has a reachability status of ‘404—Any user who is not reachable due to Push ID not found’.
Tracking Changes in Push Permission
The following are the events for Web Push reachability:| Name | Description | Platform |
|---|---|---|
| Subscribed to Push | Tracked when a user subscribes to Push Notifications. | Web |
| Unsubscribed to Push | Tracked when a user directly unsubscribes from Push Notifications. | Web |
Track Push Permissions Trends Over Time
The Reachability Dashboard at MoEngage shows you the reachability trends of all users who opted in to receive your Push notifications and those who have not. You can access the Reachability Dashboard by navigating to Dashboards > Reachability.