• Welcome to affLIFT!
    We are happy you have decided to check out our awesome affiliate marketing forum. Register your account today to join our amazing community!
  • ClickFlare is the newest, yet most powerful tracking platform ever built for performance-based marketers and affiliates. Try it FREE for 14 days!
    Try ClickFlare Free!

(Need Help) Tracking OneSignal Push Subscriptions

AdsEmpire

Nick

๐Ÿง™๐Ÿปโ€โ™‚๏ธ Wizard ๐Ÿ”ฎ
Staff Member
Community Leader
Joined
May 7, 2018
Messages
4,445
Is anyone using OneSignal that could tell me how to accurately track when someone allows push notifications on a landing page?

Currently, I'm using the following Javascript, and it's tracking most of the subscriptions, but for some reason, it's not tracking all of them:

JavaScript:
OneSignal.on('notificationPermissionChange', function (permissionChange) {
         var  currentPermission = permissionChange.to;
         switch (currentPermission)  {
           case 'granted':
              console.log('โœ…  Permission - ALLOWED');
              break;
            case 'denied':
              console.log('โŒ Permission - DENIED');
              break;
            case 'default':
              console.log('๐Ÿ˜ญ Permission -  CLOSED');
              break;
         }
       });

Is there a better way (i.e. different method) to track this?

Edit: btw, here are the docs
 
To view the premium content in our affiliate marketing forum (including this awesome thread), you must first register and upgrade your account. Register today and become a part of our amazing community!
Top