carlsednaoui / ouibounce

Increase your landing page conversion rates.
MIT License
2.31k stars 375 forks source link

Manually fired ouibounce modal does not check for cookie #116

Closed jsieber closed 8 years ago

jsieber commented 8 years ago

I'm using the following code to manually fire a ouibounce modal. I'm using the latest version from the CDN. When manually firing the modal, I noticed that it does not honor the aggressive setting and check for the existance of the viewedOuibounceModal cookie. Should I be manually firing the modal differently to respect the cookie that disables the modal?

var _ouibounce = ouibounce(document.getElementById('ouibounce-modal'), {
    aggressive: false,
    timer: 3,
 });

setTimeout(function(){
    _ouibounce.fire()
},4000); //4 seconds
jsieber commented 8 years ago

This works if you download and host the actual ouibounce.js file. The file coming from the CDN shows as version 0.0.11 but is not the latest version.

JiveDig commented 7 years ago

I'm still seeing this behavior with v0.0.12 viewedOuibounceModal is true in my browser, yet... setTimeout(function() { _ouibounce.fire(); }, 4000 ); and the modal fires every time.