-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
feat: set custom_referrer if projects visited from org menu #104902
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
| try { | ||
| // pull the referrer from local storage. | ||
| if ( | ||
| localStorage.getItem('customReferrer') && |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
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.
Also, my gut is telling me that maybe we should move this below the query param block because it seems like we should treat the query param with priority since it's more explicit (i.e. visible to the user in the URL)
It's possible it could be confusing if somehow both of these were provided, and the more visible parameter was being ignored
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.
Pulled this into a const, also switched precedence.
1e2f075 to
5b9b63c
Compare
narsaynorath
left a comment
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!
We're curious to know what percentage of people visiting the Projects page are coming there from the org dropdown:
This adds
custom_referrertracking specifically to opening the project page, for the benefit of Amplitude.I added the ability to do so using
localStorage, so that we don't muck up the URL with the?referrer=fooquery parameters (we already litter these all over the place, and people have complained about cruft in URIs).