Skip to content

Conversation

@bcoe
Copy link
Member

@bcoe bcoe commented Dec 12, 2025

We're curious to know what percentage of people visiting the Projects page are coming there from the org dropdown:

Screenshot 2025-12-12 at 5 46 54 PM

This adds custom_referrer tracking 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=foo query parameters (we already litter these all over the place, and people have complained about cruft in URIs).

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Dec 12, 2025
try {
// pull the referrer from local storage.
if (
localStorage.getItem('customReferrer') &&

This comment was marked as resolved.

Copy link
Member

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

Copy link
Member Author

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.

cursor[bot]

This comment was marked as resolved.

cursor[bot]

This comment was marked as resolved.

Copy link
Member

@narsaynorath narsaynorath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 lgtm!

cursor[bot]

This comment was marked as resolved.

@bcoe bcoe merged commit 3532ed8 into master Dec 15, 2025
49 checks passed
@bcoe bcoe deleted the set-referrer-org-menu branch December 15, 2025 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants