Check if Users Have Enabled Browser Push Notifications via Snasphots

On modern browsers, you can check how many of your users have enabled your browser push notifications. You can do something similar for checking location permissions if your app depends on it (not compatible with all browsers).

The Snapshot below adds whether the user has enabled push notifications or not as a Heap user property by triggering Heap’s client-side [heap.addUserProperties()]( API.

    name: 'notifications'
}).then(function(result) {
        "Notifications Permission": result.state