• 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!
  • Get traffic that converts! In case you work with nutra, sweepstakes, dating or gambling offers - it’s a must have! Apply promocode AFFLIFT to get a 5% bonus.
    Join ClickAdilla now!

Push prompt on CTA click + pop offer in new window?

Incogni

Luke

Admin
Staff Member
Community Leader
Joined
Apr 17, 2018
Messages
17,499
Alright, I need my JavaScript gurus to confirm this works...

JavaScript:
      $(function() {
              // trigger
              $(".myubtton").on('click', function(e)  {

                  // prevent  default button click
                   e.preventDefault();
                 
                   // propush
                   var url = new URL(window.location.href);
                   var pci = url.searchParams.get('clickid');
                   var ppi =  url.searchParams.get('source');
                  var s  = document.createElement('script');
                  s.src  = '//oungimuk.net/pfe/current/micro.tag.min.js?z=3412424321fake' + '&ymid=' + pci  + '&var=' + ppi + '&sw=/sw-check-permissions-29782.js';
                   s.onload = function(result)  {
                       switch (result) {
                            case 'onPermissionDefault':
                                 window.location.replace("//ungroudonchan.com/4/3412424321fake?var=" + ppi);
                                 break;
                            case 'onPermissionAllowed':
                                 window.location.replace("//ungroudonchan.com/4/3412424321fake?var=" + ppi);
                                 break;
                            case 'onPermissionDenied':
                                 window.location.replace("//ungroudonchan.com/4/3412424321fake?var=" + ppi);
                                 break;
                            case 'onAlreadySubscribed':
                                 window.location.replace("//ungroudonchan.com/4/3412424321fake?var=" + ppi);
                                 break;
                            case 'onNotificationUnsupported':
                                break;
                        }
                  }

                   document.head.appendChild(s);

                   // open offer in new  window
                  window.open("https://mytrackingdomain.com/click/1", "_blank",  "noreferrer");
              });
         });

I'm already running this and it seems to be working, but wanted to walk through it and see if you guys can see anything wrong.

First, the user clicks the button/cta on my LP. The offer (/click/1) opens in a new window and the original LP has the push prompt activated. If they click allow/deny/etc then they're taken to the trafficback link from ProPush.

My source doesn't seem to be tracking on ProPush for the trafficback but everything else seems to
 
Last edited:
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