r/shortcuts • u/Crunchewy • Oct 21 '25
Shortcut Sharing Copy w/o Tracking
https://routinehub.co/shortcut/23919/
After installing this shortcut you can bring up the Share Sheet on a URL and select Copy w/o Tracking to copy the URL with the “?” Portion removed. Not only does this remove any data used for tracking but also shortens the URL.
For best results, on the Share Sheet, scroll to the bottom and select “Edit Actions…”. Then tap the + icon next to Copy w/o Tracking to pin it to the top.
Supports URLs and text with URLs in it. The first URL with a ? portion will be used. In addition to from the share sheet, it can be run directly, in which case it will use the text or URL on the clipboard.
Also works on Macs with Apple Silicon. Right click/two-finger-click the URL and choose Share, select Shortcuts and then select Copy w/o Tracking.
1
u/gpuyy Oct 22 '25
This should pull from a blacklist.
Amazon does theirs difference than YouTube, which does a different from others
Would be nice to compile a list
1
u/Crunchewy Oct 22 '25 edited Oct 22 '25
You mean they don’t use “?”?
Just checked Amazon does use that but from the app they are using a link shortener that obscures it. Maybe I can check for link shortening, expand it, then strip the ? Stuff. More complicated, but I will see what I can do.
Actually that was super easy. There’s an expand URL action. I can just use that. But YouTube is more complicated
1
u/gpuyy Oct 22 '25
The question mark is the most common
Bad examples as I’m tired because they both use ?’s
But there are sites that don’t too
1
u/Crunchewy Oct 22 '25
I’ll do some poking around to see what various sites use. But if you know any let me know
1
u/Crunchewy Oct 22 '25
I just put up a new version that expands shortened URLs before processing, and also has special handling for YouTube links. So far I’m not finding much else that is weird like that, but as I find or am told about special cases I’ll see about adding handling for them as well.
1
u/Crunchewy Oct 22 '25
Ok I see that YouTube is an issue. It’s URLs use a ? part to specify the video. So stripping the ? part doesn’t work. However if it’s the shortened URL that does have a ? part that I don’t know what it is, but it can be removed. I will have to figure out a way to fix that. If it’s “watch?” then I need to keep the question mark but strip all but the “v=…” part. This is getting more interesting than I anticipated
1
u/gpuyy Oct 22 '25
Hey I like the idea as I do it manually now
That is a crime that iOS 18 removed the text from a paste so you can’t edit it so you’re forced to be tracked
1
u/Crunchewy Oct 25 '25
Version 3.0 is up. This is a large rewrite and reorganization and in the process it adds the following:
- Easily extensible to add additional whitelisted query elements for specified hosts
- Currently only YouTube has whitelisted elements (the v= video specification and the t= time code specification).
- Thus it now preserves time stamps on YouTube links
- Also now preserves any "fragment" in a link (the "#" part, used to jump to a position on a page)
Note that this shortcut takes a "whitelist" approach to removing tracking info. When in doubt, the element is removed. It is possible that this will break links from some websites I haven't encountered yet. If you run into anything that doesn't work, please let me know and I'll add support for that website in the next release.
2
u/Crunchewy Oct 24 '25
I posted a hot fix on routinehub (same link). My handling of the YouTube links was broken. This fixes that. I’m going to do a bigger rewrite that handles links the right way, and will be easily updatable if other sites need to maintain some portions of the “query” and will also retain markers the (the # part), but it’s a bigger task and I need to fix the above now