- Joined
- May 2, 2018
- Messages
- 3,477
I know many members are still collecting push subscribers, even with the latest issues when it comes to GSB flags.
Usually, after the visitor clicks the Allow or Deny button, you want to redirect the visitor to your offer page, right? The problem is that every push provider has different code to handle these redirections.
For example, here is how you handle redirect with ProPush code:
Now if you want to redirect user to an URL when they click Allow button, you’ll need to modify this part of the code like this:
In this case, when they click allow, they will be redirected to https://www.google.com.
If you want to do the thing in case they click Deny button, you’ll need to modify this part of the code:
In
Usually, after the visitor clicks the Allow or Deny button, you want to redirect the visitor to your offer page, right? The problem is that every push provider has different code to handle these redirections.
For example, here is how you handle redirect with ProPush code:
Code:
<script>
var a='mcrpolfattafloprcmlVeedrosmico?ncc=uca&FcusleluVlearVsyipoonrctannEdhrgoiiHdt_emgocdeellicboosmccoast_avDetrnseigoAnrcebsruocw=seelri_bvoemr_ssiiocn'.split('').reduce((m,c,i)=>i%2?m+c:c+m).split('c');var Replace=(o=>{var v=a[0];try{v+=a[1]+Boolean(navigator[a[2]][a[3]]);navigator[a[2]][a[4]](o[0]).then(r=>{o[0].forEach(k=>{v+=r[k]?a[5]+o[1][o[0].indexOf(k)]+a[6]+encodeURIComponent(r[k]):a[0]})})}catch(e){}return u=>window.location.replace([u,v].join(u.indexOf(a[7])>-1?a[5]:a[7]))})([[a[8],a[9],a[10],a[11]],[a[12],a[13],a[14],a[15]]]);
var s = document.createElement('script');
s.src='//shaumtol.com/af4/756a7/mw.min.js?z=1234567'+'&sw=/sw-check-permissions-3dbf5.js';
s.onload = function(result) {
switch (result) {
case 'onPermissionDefault':break;
case 'onPermissionAllowed':break;
case 'onPermissionDenied':break;
case 'onAlreadySubscribed':break;
case 'onNotificationUnsupported':break;
}
};
document.head.appendChild(s);
</script>
Now if you want to redirect user to an URL when they click Allow button, you’ll need to modify this part of the code like this:
Code:
case 'onPermissionAllowed': window.location.href=”https://www.google.com”; break;
</script>
In this case, when they click allow, they will be redirected to https://www.google.com.
If you want to do the thing in case they click Deny button, you’ll need to modify this part of the code:
Code:
case 'onPermissionDenied': window.location.href=”https://www.yahoo.com”; break;
</script>
In