- Joined
- Apr 17, 2018
- Messages
- 17,921
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:
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:
setTimeout
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