Open carlsednaoui opened 10 years ago
I feel like this opens up opportunities to turn this into crappy spam. Nobody wants to get a popup when they are in the middle of scrolling down a page, it's just annoying and makes for a poor experience.
It also is not in line with the purpose of this plugin, which is to trigger an event when someone is about to leave a page -- that turns it into trigger an event at a couple of arbitrary times that you might want to trigger popups. If we accept that as a feature, what justification would we have to say "no" to someone who asked for an option to trigger a popup when the user mouses over a specific element? Or after a specific amount of time on the page?
Well roar'd, @jenius. I agree.
@jenius I don't think you fully understand what the proposed feature is. This is a pixel-like implementation of the timer
.
This would essentially prevent ouibounce from firing if a user has not engaged with your page (by scrolling at least Xpx).
Ohh yeah I totally did not. In that case I agree haha sorry!
But the caveat here is that you have to bind to window.scroll
which is kind of a slow thing to do so be careful, that can really choke the javascript up. Might want to add a warning about it in the docs that it could slow down your page, and definitely remove the listener after the scroll point was hit.
Could also listen for mouse movement on the page.
Good call re: jamming the page.
Maybe time to have 2 scripts? One with, one without?
I think it's fine as an option in this script, as long as it's off by default!
Hi, I had a similar feature request with the time spent on the page. It just seemed strange to me that the "pop-up" would open if I stayed two seconds and went to open an other tab. Scrolling seems fine too, but some people can scroll pretty fast I guess (I have no idea !)
Suggestion from Ryan: