Skip to content
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

Allow referrer for external websites for better analytics #198

Open
yathomasi opened this issue Apr 21, 2023 · 4 comments
Open

Allow referrer for external websites for better analytics #198

yathomasi opened this issue Apr 21, 2023 · 4 comments

Comments

@yathomasi
Copy link
Contributor

As per Slack Discussion Thread,

Thanks, @mvshmakov for the deep dive:

Plausible identifies sources in 2 ways:

  1. HTTP Referrer header.
  2. UTM tags.

dvc.org has nofollow noopener noreferrer on all links and does not use manual UTM tags on any of them (proof attached). So, Plausible, in the case of dvc.org/docs/studio -> studio.iterative.ai/* requests, does not have a way to infer the source, so tags the request with “other”.

Screenshot

image

We cannot do anything with it on the Studio side because of the browser privacy features and the way Plausible works. Suggested solutions:

  1. Allow referrer header in the links on dvc.org (and on all the rest of our websites that we want to track Studio links). I’m in favor of this option.
  2. Manually UTM-tag all links that direct users to the Studio.
@yathomasi
Copy link
Contributor Author

I would also prefer option 1 mentioned as mentioned by @mvshmakov. Also, as of 2023, it's already been years that major browsers have shipped with the fix.

  1. It's not a recommendation but we might consider removing (as it will quick and straight forward solution) the noopener noreferrer from the rel attribute as I see almost every roughly almost more than 90% of traffic comes from the latest version of browsers.
  2. Here is the source logic behind the external links. Here, we can create a domain whitelist and allow referrers.
  3. This doesn't directly affect users or websites SEOs so I would say it's nice to have feature.

cc: @tapadipti @iterative/studio-frontend

@tapadipti
Copy link
Contributor

@yathomasi @mvshmakov A clarification: The issue is not only with redirects to Studio, it's also with redirects to our other sites (eg, iterative.ai). Option 1 will address issues with all these redirects, right?

@mvshmakov
Copy link

mvshmakov commented Apr 21, 2023

The issue is not only with redirects to Studio, it's also with redirects to our other sites (eg, iterative.ai). Option 1 will address issues with all these redirects, right?

It depends on the analytics implementation on the respected websites. If analytics is using document.referrer to identify the referrer, then it'd work. Plausible on all websites will work.

Note that the fix in this repo would only work in one side. E.g., we still have the same noopener noreferrer thing on links on the Studio side, so dvc.org -> studio.iterative.ai would be tracked, but studio.iterative.ai -> dvc.org would not. This requires a separate fix on the Studio and other websites side.

@yathomasi I've dropped the support of noopener noreferrer in the Studio: https://github.com/iterative/studio/pull/5746. You can consider adding the list of trusted domains if you want to support older browsers.

@mvshmakov
Copy link

Update: we've decided to go with rel="noopener", despite it is being implied on all modern browsers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants