linkding icon indicating copy to clipboard operation
linkding copied to clipboard

Feature request: Remove tracking url params (to canonicalize url for Web Archive)

Open tkafka opened this issue 8 months ago • 2 comments

Links saved from many sources (like Reddit, Youtube, Facebook, or websites) have tracking parameters. This causes the web archive to unnecessarily cache already cached files, and the Web Archive link leads to an empty page (as the archive doesn't have a page with these tracking parameters saved).

I believe this (and whole other set of problems) would be solved by an option to strip known tracking links.

Some of them should be universal (like UTM tracking parameters), and some are service specific (like Reddit's share_id or rdt).

The easiest implementation would be to add an option (checkbox) to strip tracking parameters, and below it, there would be a list of comma separated parameters to strip (with a default covering the most used services).

What do you think?

tkafka avatar Mar 09 '25 21:03 tkafka

Makes sense. This could also help with avoiding duplicate bookmarks, if the scope would be expanded a bit more to strip the params from the URL saved in the bookmark and make the existing bookmark check do the same. This may be an option to enable by default so that it would be opt-out. It would be also be helpful to have some insights how other bookmarking tools deal with this.

There's already https://github.com/sissbruecker/linkding/issues/958, but I think I'll close that in favor of this issue and just leave it linked here.

sissbruecker avatar Mar 09 '25 22:03 sissbruecker

Thanks! Yes, for me, I would definitely prefer to have the tracking parameters stripped before saving.

tkafka avatar Mar 10 '25 09:03 tkafka

This is great, although I already use https://github.com/ClearURLs/Addon on my Liberwolf and Firefox's builtin Copy Clean Link feature—I still would appreciate this option being added to Linkding.

Maybe the implementation can be same as those two mentioned above, however I've found ClearURLs being superior to Firefox's builtin version.

Can an option be added in settings regarding striping URL from any unnecessary parameters by default when it's on and not touching URL when it's off globally as also mentioned by @tkafka .

AuthorShin avatar Oct 07 '25 19:10 AuthorShin