-
Couldn't load subscription status.
- Fork 141
[DEST-897] added check to unset params and ref on new session #194
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
Conversation
c0251c9 to
e659a01
Compare
|
Can you add DEST-?? ticket to PR subject to see what this is fixing? |
| .option('traitsToSetOnce', []) | ||
| .option('traitsToIncrement', []) | ||
| .option('appendFieldsToEventProps', {}) | ||
| .option('unsetParamsReferrerOnNewSession', false) |
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 sets the default value for the option right?
Technically I think this means there is a change in behavior for existing customers since the value for unsetParamsReferrerOnNewSession was undefined before.
But most likely Amplitude treats all falsey values the same then there is no difference in behavior and this is clearer. So I think this is fine. Just something to watch out for.
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.
Wonder if we have been burned by this before @ccnixon ? Probably not?
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.
Adding on to this.. looks like Amplitude just check for falsy/truthy: https://github.com/amplitude/Amplitude-JavaScript/blob/master/src/amplitude-client.js#L127
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.
Nice find @gpsamson !
|
PR description says:
but I think this does right? |
|
@mericsson this is mobile-only and doesn't apply server-side ninja-edit: I misunderstood, updating. |
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.
LGTM
…tio#194) * added check to unset params and ref on new session * removed ready cb, added option * typo * add unsetParamsReferrerOnNewSession setting
…tio#194) * added check to unset params and ref on new session * removed ready cb, added option * typo * add unsetParamsReferrerOnNewSession setting
What does this PR do?
Adds check for unsetParamsReferrerOnNewSession
Are there breaking changes in this PR?
no
Any background context you want to provide?
Snippet from amplitude docs:
--
Is there parity with the server-side/android/iOS integration components (if applicable)?
no
Does this require a new integration setting? If so, please explain how the new setting works
This PR introduces a new setting
unsetParamsReferrerOnNewSessionwhich tells amplitude to nullify utm/referrer params at the start of each session.Links to helpful docs and other external resources