Guide How to Delay Push Notification Prompts

MGID

Luke

Admin
Staff Member
Community Leader
Joined
Apr 17, 2018
Messages
20,842
I've been playing around with JavaScript on my landing pages quite a bit lately trying to squeeze every penny out of every click and one thing I've been testing is delaying the push notification prompt.

This has come up a few times on the forum, but I am not sure if anyone has explained how to do it. For example, @leidong mentioned it on my thread here:

if mine, i better set timing to loading propush script (after few seconds loading the main offer), for some country especially 3G connection.... network are slow...and the propush also in background...

I'm not sure if this is exactly what he meant, but I started using a setTimeout to delay the push notification prompt from firing for 3-5 seconds. In theory, this allows the rest of your page to load and gives the user a second or two on your landing page before they see the prompt to receive push notifications.

It's VERY simple. All you need to do is wrap your push notification JavaScript in this tag:

JavaScript:
setTimeout(function(){
    
     // push notification  javascript goes here
     // for example, you would paste  your ProPush code here
     
}, 3000);

setTimeout
 
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