Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

EventLogger: Return sourcegraph.com hostname only for internal referrers #22864

Merged
merged 1 commit into from
Jul 19, 2021

Conversation

attfarhan
Copy link
Contributor

Addresses part of https://github.com/sourcegraph/sourcegraph/pull/22747#issuecomment-879764196

@malomarrec wants to distinguish referrers between direct traffic (which have an empty referrer) and navigation from within sourcegraph.com.

For Sourcegraph.com URLs, show the referrer as just sourcegraph.com, and remove all pathnames/query params to avoid leaking private repo/file names and search queries.

@attfarhan attfarhan requested review from eseliger and malomarrec July 15, 2021 07:35
Copy link
Contributor

@malomarrec malomarrec left a comment

Choose a reason for hiding this comment

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

@attfarhan how about returning subdomain.sourcegraph.com, so as to be able to attribute traffic to the docsite, about page, etc?
I think it would be a matter of removing whatever comes after the first / or ?

@attfarhan
Copy link
Contributor Author

@malomarrec the docs site and about page were not affected by this at all (see my comment in Slack and in the original PR). It's only exact when the hostname is EXACTLY sourcegraph.com that we don't return the full URL. See this screenshot for data we're already returning, and you'll see an about.sourcegraph.com domain is already returned in its entirety: https://sourcegraph.slack.com/files/UMJTLCRH9/F028484T57D/screen_shot_2021-07-14_at_6.43.58_pm.png

@attfarhan attfarhan merged commit c167754 into main Jul 19, 2021
@attfarhan attfarhan deleted the fa/internal-referrer branch July 19, 2021 08:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants