@kropot wait, is it with or without the question mark?
@StroomAfwaarts @kropot
The question mark is necessary if there's anything after it. In this case the 2nd example has 't=69' so the question mark stays. (t for where in the video to start)

But in general, you can remove the question mark and anything after it and you get the original video without fuss.

@StroomAfwaarts @trinsec @kropot In general, links with parameters work like this:

link/to/file/on/the/internet
?
parameter1=value1
&
parameter2=value2
&
parameter3=value3

So, you delete the parameter=value bit and the separator before it (? or &) if you want to get rid of it.

Youtube links can also look like this:
youtube.com/watch?v=videoid&si=trackingid&t=69

In this case you delete &si=trackingid

@StroomAfwaarts @kropot The question mark separates the URL from the parameters. Ampersand separates the parameters from each other.

In the first URL, the tracking junk was the only parameter, so everything can be removed. In the second, it's leaving behind the time code parameter.

On links to youtube.com (as opposed to youtu.be) the video ID is itself a parameter /watch?v=etc, so you'd always be leaving the question mark.

@kropot
THANK YOU. I've reached an age/busyness level where technology is running away from me, and I would not have known about this without your post.
@kropot

Or don't use Youtu.be, use yewtu.be

Spotify does this too if I recall.

Firefox has a plugin called ClearURLs that cleans URLs across the entire web, not just YouTube. Might be available on Chrome too.

@Flaky @krusynth believe latest iOS and MacOS will scrub these automatically as well.
@[email protected] you can also do this with ublock origin by adding actually legitimate url shortener as a custom filter
@kit @Flaky this sounds fancy, beside the basic filtering I never used any advanced features, will try that out! Thanks!
@Flaky @kropot
And Facebook. But maybe that doesn't need saying?
@Flaky @kropot Spotify also uses it for the lyrics preview, like if you select the lyrics and share them. As far as I'm aware there's not another way to do this (but you can just get the lyrics from like genius or some place)
@Flaky @kropot Spotify is especially creepy. In the Android app at least it knows when you take a screenshot of the app. I have no idea why but I'm sure it can't be good.
@kdj8 @Flaky @kropot either its crawling your screenshots folder (ew), or its using the android 14 screenshot detection api (also ew)
@kropot i knew it, i've been removing that for ages because it looked sus
@kropot Wowza. I love this new change! /j I knew it was something like this.

@kropot By the way, the & at the end is part of the time tag, not the source identifier, right?  

(oh, I just realised it doesn't have alt-text. Would you be up for adding some?)

@OctaviaConAmore @kropot The questionmark tells the server that whatever comes after this is an argument. The first letters are the key, then an equalsign then the value. When you add more arguments, you separate them with an ampersand. This is why you want to remove the ampersand but not the questionmark in this case as it's only a single argument
@kropot image description: instructions on how to remove source identifiers from YouTube links. Remove the part including si= and before any & or ? sign.
@kropot yikes, that's what i figured was going on when i started seeing this garbage

someone should make a tool that automatically removes junk like this from copied URLS, i'm sure there's some way to make extensions do that, even if it has to be a separate option from "copy link" (though i think it'd be easier to outright change the URLs on the page)

@kropot I've been removing tracking garbage from links for so long now that it's just habit for me, but thanks for sharing.

I'd also like to share these extensions with everyone:
• ClearURLs - Removes tracking elements from URLs
https://github.com/ClearURLs/Addon#readme
• FastForward (successor to Universal Bypass) - Automatically skips annoying link shorteners
https://github.com/FastForwardTeam/FastForward#readme

GitHub - ClearURLs/Addon: ClearURLs is an add-on based on the new WebExtensions technology and will automatically remove tracking elements from URLs to help protect your privacy.

ClearURLs is an add-on based on the new WebExtensions technology and will automatically remove tracking elements from URLs to help protect your privacy. - ClearURLs/Addon

GitHub
@kropot huh, so I wasn't alone to get the extra junk in the links
@kropot
Also change "youtu.be/" to "redirect.invidious.io/watch?v="
You're already having to do a lot of work to remove the source identifier, so go full fuck'em and link to an alternate frontend instead.
@kropot There is an android app called URLCheck that lets you intercept and rewrite URLs in various ways. I haven't tested this specific thing, but one of the modules allows for regex rewrite rules.
@kropot you might also use this format
https: //www.youtube.com/ watch?v=dQw4w9WgXcQ
with watch?v= (no spaces) still dropping the part you indicated
@kropot I always just snipped that off as a character count saving measure even before I understood it was a tracking thing.
Wonder what happens if you put junk data there.
@kropot Here's a userscript that removes it automatically: https://github.com/Xenorio/YTShareAntiTrack
GitHub - Xenorio/YTShareAntiTrack: YouTube userscript to remove tracking parameters from share URLs

YouTube userscript to remove tracking parameters from share URLs - GitHub - Xenorio/YTShareAntiTrack: YouTube userscript to remove tracking parameters from share URLs

GitHub
been removing everything after the & for a good fuckin while, they especially do that on anything you search
@kropot For extra protection, use your favorite Invidious instance when sharing links! Invidious will provide a link to the original anyway if your friend needs it anyway ;)
@kropot uhh ignore the extra "anyway" by the way
@kropot I've noticed this query param on links from twitter and spotify as well.
@kropot is that the link to never gonna give you up
@kropot Wonder if there's a WebExtension yet to scrub these off.
@kropot i just delete because blatantly obvious tracking data in my links is really ugly. if i wanted a longer link, i'd use the youtube URL already in my address bar!!
@kropot There's a great addon on Firefox for this (also works for the other URL trackers from facebook, amazon...): ClearURLs.
It changed my life!
https://addons.mozilla.org/en-US/firefox/addon/clearurls
ClearURLs – Get this Extension for 🦊 Firefox (en-US)

Download ClearURLs for Firefox. Removes tracking elements from URLs

@merling @kropot Just installed it. I'd been doing this by hand for years when posting e.g. #AcademicJobs
@kropot
The next level is to use a different front end all together
https://github.com/SimonBrazell/privacy-redirect
GitHub - SimonBrazell/privacy-redirect: A simple web extension that redirects Twitter, YouTube, Instagram & Google Maps requests to privacy friendly alternatives.

A simple web extension that redirects Twitter, YouTube, Instagram & Google Maps requests to privacy friendly alternatives. - SimonBrazell/privacy-redirect

GitHub

@jonossaseuraava @kropot like 80% of the invidious instances are not working though /shrug

which is still youtube’s fault, but nowadays i suppose i’d just throw the youtube link and download it with yt-dlp

@kropot you can use extensions or apps to do that for you! I use URLCheck on Android and it's really convenient
@kropot Or maybe adjust the Source Identifier a bit to disrupt the tracking system?
@kropot I have no social media account and feel myself good
@kropot Is that story really true ? I haven't seen any Youtube video's link with such a thing, even by checking at the instant.

@VioB @kropot i just copied a link from the YouTube app and this is what I got:

https://youtu.be/snj<redacted>f8?si=S<redacted>Y

- YouTube

Auf YouTube findest du die angesagtesten Videos und Tracks. Außerdem kannst du eigene Inhalte hochladen und mit Freunden oder gleich der ganzen Welt teilen.

@julien @kropot Hum, strange, that doesn't do this on my browser (but I'm on a PC with Mozilla, so may be that's the reason).
@VioB @kropot maybe your browser automatically trims it
@VioB but the source identifier is only added if you use YouTube’s share button. It is not in the URL field when you view the video
@julien Oh, that must be the explanation then, since I only copy directly the URLs.
@kropot do this for pretty much every link. The ? And everything after for almost any link is not needed. At least I've yet to run into one that broke after removing all the extra bs

@kropot
For Android users, an open-source app called Léon - The URL Cleaner can remove tracking components from many different sites before they're shared (or opened, in many cases). https://play.google.com/store/apps/details?id=com.svenjacobs.app.leon (Play Store) or https://www.f-droid.org/packages/com.svenjacobs.app.leon/ (F-Droid)

@skyglowberlin

Léon – The URL Cleaner - Apps on Google Play

Removes tracking & other redundant parameters from web links for sharing

@kropot I don’t think it works exactly like this, so if my link went viral and 100k accounts posted it, so what, they are all mine?

it just helps to pin point who exactly started to share this, that’s all. all it helps is building social graph and pretty sure google gonna use that not for my benefits, so yeah, deleting si= makes sense

@kropot

Please sanitize your YouTube links! Recently YouTube's links got 2 times longer. They added Source Identifier in them for the sole purpose of collecting data. You can delete it, and link will still work just fine.

In the simple link, actual link to video is before question mark, question mark and everything after that is source identifier

In the other case, there is also time code after identifier, so you can remove source identifier, everything after question mark but before and symbol, excluding question mark but including and symbol.

Why you should delete that?
1. You post that link on social media, Google crawler finds it, checks the data base and now it knows this account on other social media belongs to you.
2. I click on your link and now Google knows our accounts are connected.
@untsuki
I'm not quite sure why this is under a Content Warning. It should be showed from the rooftops!
@kropot
@juliewebgirl @kropot Content warnings usually take less space than full posts, so I usually do them when making an image description comments
@untsuki
Oh I see now. I only saw your toot, didn't know it was a comment on another toot so didn't see the original.
@kropot
@kropot Thanks, I'd been trimming that just because it was *something* obviously unimportant to me, but hadn't bothered to research what. Also, everyone remember to actually check out the link in the screenshot for a cool bonus.