-
Notifications
You must be signed in to change notification settings - Fork 42
Release 1.3.0 #20
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
base: master
Are you sure you want to change the base?
Release 1.3.0 #20
Conversation
• Fixed option naming, now it's Waiting for a confirmation about docs. |
To clarify, how about these requirements for this PR?
|
Done. Let me know if everything is ok for you. |
return c.substring(nameEQ.length, c.length) | ||
value = c.substring(nameEQ.length, c.length) | ||
if value != 'null' | ||
return value |
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.
Rather than storing and managing 'null' string in cookies, we can choose not to store any null values.
If we update writeCookie
method as follow, no null or empty string will be written.
writeCookie: (name, value) ->
if !!value
@createCookie name, value, @_cookieExpiryDays, null, @_domain, @_secure
return
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.
In this way the initial parameters and the new feature reset_params_at_session_end
will not work, breaking also the release 1.2.0.
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.
Can you please elaborate why won't those work? Also, in what ways does it break 1.2.0 release? I'm sorry, I'm a bit confused here.
I am hesitant to store 'null' strings in cookie and then ignore them while reading. It creates more cruft that need to be kept track of.
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.
The initial_utm_params
and additional_initial_params_map
are based on the writeCookieOnce
method that checks for cookie existence before writing it.
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.
Yes, if nothing is written, nothing will be read.
To be honest, I'm having a hard time following these changes which is a bad sign for something that's supposed to be simple. Perhaps I'm not thinking straight and need to revisit these when I have more spare time. Since you have your own fork, this doesn't block you from using these changes for your own use.
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.
This is super simple. As i said some methods are based on the writeCookieOnce
one. This method will try to read the cookie before writing it. So if we don't write anything in the cookie it will always write the cookie. So we must store null
, 0
or something in the cookie to keep the blank values, like in initial_utm_params
.
If you don't want to store null values in the cookies then another way could be to use the visits counter and the current section cookie to "know" when the writeCookieOnce
method should and should not write the cookie.
Let me know what you prefer. As i said, i have some spare time to do the job, no problem.
No description provided.