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

Update YouTube rules for tracking URL parameters #173791

Closed
wants to merge 6 commits into from

Conversation

Tiagoquix
Copy link
Contributor

Prerequisites

  • This is not an ad/bug report;
  • My code follows the guidelines and syntax of this project;
  • I have performed a self-review of my own changes;
  • My changes do not break web sites, apps and files structure.

What problem does the pull request fix?

If the problem does not fall under any category that is listed here, please write a comment below in corresponding section

  • Missed ads or ad leftovers;
  • Website or app doesn't work properly;
  • AdGuard gets detected on a website;
  • Missed analytics or tracker;
  • Social media buttons — share, like, tweet, etc;
  • Annoyances — pop-ups, cookie warnings, etc;
  • Filters maintenance.

What issue is being fixed?

Enter the issue address

Example: https://www.youtube.com/watch?v=T4rQcT_SOV8&embeds_widget_referrer=leagueclient&embeds_referring_euri=https://127.0.0.1/index.html&source_ve_path=XXXXXXX&feature=emb_title

Add your comment and screenshots

  1. Your comment

This pull requests adds more filters for the YouTube site.
Specifically, the goal is to remove tracking parameters from URLs.
I've also extended the current filters to include the other YouTube sites.

embeds_widget_referrer is an extension to the current one (embeds_referring_euri).
feature and si are used when sharing YouTube links to track which person sent it. They're also used for other tracking purposes (such as the one in the example URL of this pull request).

I don't know if source_ve_path could be considered as tracking. But, given that it is not necessary for the video to play in the user's browser, it might be worth adding too.

  1. Screenshots

Not needed.

Terms

  • By submitting this issue, I agree that pull request does not contain private info and all conditions are met

@Yuki2718
Copy link
Collaborator

Yuki2718 commented Mar 1, 2024

Removing si broke SuperChat and thus disabled.

@Tiagoquix
Copy link
Contributor Author

Hello there. I have removed si and added bp and source_ve_path.

bp is used on the YouTube logo button according to which event they're promoting on the moment. Right now, when you click on the logo button to go to the home page, it goes to https://www.youtube.com/?bp=wgUCEAE%3D.

source_ve_path does not seem necessary for the video to play. I have got this parameter from the client of the game League of Legends.

I have also adjust the website order after ,domain=.

@Alex-302
Copy link
Member

Alex-302 commented Mar 7, 2024

Hi. What the source of links with these parameters?
Please provide examples for the listed domains.

@Tiagoquix
Copy link
Contributor Author

Hello. I provided examples in my original post.

I just extended the parameters to other links since they are from the same company and, therefore, other links may also be affected.

@Yuki2718
Copy link
Collaborator

Yuki2718 commented Mar 8, 2024

No example of removeparam=pp. We certainly do not want to repeat the breakage by si. Also note we only remove tracking parameter and not all parameter.

@Tiagoquix
Copy link
Contributor Author

pp is already removed: https://github.com/AdguardTeam/AdguardFilters/blob/master/TrackParamFilter/sections/specific.txt#L287

For me, all of what I included can by considered as tracking parameters since they aren't needed for the video to function in the user's browser.

@Yuki2718
Copy link
Collaborator

Yuki2718 commented Mar 9, 2024

We do not remove parameter just because doing so does not break the site. embeds_widget_referrer and embeds_referring_euri look to be trackparam, but I'm not sure about source_ve_path and bp.

@Tiagoquix
Copy link
Contributor Author

Tiagoquix commented Mar 9, 2024

bp, in my opinion, is a tracking parameter because it only exists when clicking on the website logo, and this is not essential for the website to function.

About source_ve_path, I found this topic on the internet that contains another example with the same parameter, and it is not necessary to play the video (if you access the link just using watch?v=VIDEOID the video still plays normally). My example was from the client of the game League of Legends, and your browser also does not need this parameter to play the video (if you click in the video to play externally in your browser).

To clarify, let's remember that ad-blockers extensions (such as the AdGuard one) only works in non-embedded browsers (it would not work in Chromium Embedded Framework, for example), and in browsers the YouTube web site functionality remains normal even with the removal of the parameter (from my own experience).

@Alex-302
Copy link
Member

How we can reproduce URL with that parameters?

@Tiagoquix
Copy link
Contributor Author

Here's how:

bp: clicking on the YouTube logo at the top-left corner. This is not always available, as it seems to be specific to YouTube "events". As of 11 March 2024, there's no event going on, so this parameter is not available to test.

embeds_referring_euri, embeds_widget_referrer and source_ve_path: it seems to be related to the Chromium Embedded Framework (CEF). You can only reproduce this by copying YouTube video links inside application or game clients. For my example, I got it from the League of Legends game client.

feature: YouTube mobile, when sharing videos. Typically the parameter is ?feature=shared.

pp: copying video links from YouTube search results page (any search arguments). Right-click on any video and copy its link from the search results page.

@piquark6046 piquark6046 mentioned this pull request Mar 12, 2024
@D4niloMR
Copy link
Contributor

I can see the embeds_referring_euri, embeds_referring_origin (not included on this PR), feature and source_ve_path parameters here:

https://www.portugues.com.br/gramatica/adjetivo-adverbio-tracos-que-os-distinguem.html

Scroll down to youtube embed and click on it, click on the share icon, then click on "..." or on the link.

https://www.youtube.com/watch?embeds_referring_euri=https%3A%2F%2Fwww.portugues.com.br%2F&source_ve_path=Mjg2NjQsMTY0NTA2&feature=emb_share&v=ZXSrLCTkqOs

In the last embed I see embeds_referring_origin

https://www.youtube.com/watch?embeds_referring_euri=https%3A%2F%2Fwww.portugues.com.br%2F&embeds_referring_origin=null&source_ve_path=Mjg2NjQsMTY0NTAz&feature=emb_share&v=2Od3I7-DofA

@Tiagoquix
Copy link
Contributor Author

Olá, Danilo! 🇧🇷

Thank you for letting us know about embeds_referring_origin.
I have added it to this PR too.

Copy link
Member

@Alex-302 Alex-302 left a comment

Choose a reason for hiding this comment

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

Add instructions to get links with these parameters for all domains listed in the rules.

$removeparam=embeds_referring_euri,domain=youtubekids.com|youtube-nocookie.com|youtube.com
||youtube.com^$removeparam=pp
! YouTube
$removeparam=bp,domain=youtube.com|youtu.be|youtube-nocookie.com|youtubekids.com
Copy link
Member

Choose a reason for hiding this comment

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

Still cannot reproduce link with this parameter

Suggested change
$removeparam=bp,domain=youtube.com|youtu.be|youtube-nocookie.com|youtubekids.com

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi there. As I said earlier, this parameter is temporary and isn't always reproducible. You'll have to wait for an opportunity to test it.

I saw it yesterday, but I don't see it today.

Copy link
Contributor

Choose a reason for hiding this comment

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

Still cannot reproduce link with this parameter

On the "Explore" section of the youtube homepage.

Screenshot

image

@github-actions github-actions bot added the Stale The issue is considered as obsolete label May 18, 2024
@github-actions github-actions bot closed this May 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stale The issue is considered as obsolete
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants