-
Notifications
You must be signed in to change notification settings - Fork 371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add cookieName configuration #68
Conversation
b087a4f
to
9b81fe4
Compare
It may be usefull if you want to add multiple ouibounce on different type of pages.
@jdeniau, thanks for that cookieName configuration! I'm looking forward to use it. |
up? :) |
I was just about to suggest this feature! Great work! Looking forward to next release. |
Hi everyone, sorry for the delay — been busy / on vacation. Will look and merge soon :) Thanks again for the PR @jdeniau 🍔 |
@@ -103,7 +104,11 @@ function ouibounce(el, config) { | |||
cookieDomain = ';domain=' + options.cookieDomain; | |||
} | |||
|
|||
document.cookie = 'viewedOuibounceModal=true' + cookieExpire + cookieDomain + sitewide; | |||
if (typeof options.cookieName !== 'undefined') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jdeniau shouldn't this be if (typeof options.cookieName === 'undefined') {
use viewedOuibounceModal
. Otherwise use options.cookieName?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are totally right.
It's fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! 🍔
Add cookieName configuration
It may be usefull if you want to add multiple ouibounce on different type of pages.