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

Remove tracking elements from URLs #545

Open
Swrup opened this issue Sep 21, 2021 · 6 comments
Open

Remove tracking elements from URLs #545

Swrup opened this issue Sep 21, 2021 · 6 comments

Comments

@Swrup
Copy link

Swrup commented Sep 21, 2021

Many websites use tracking elements in the URL (UTM parameters).
They are not necessary for a website to be displayed or work correctly and can therefore be removed.

To protect users privacy, I propose to clean URLs from posts.

This can be easily implemented.
The firefox add-on ClearURLs already does that and keep a list of UTM parameters to remove :
https://gitlab.com/KevinRoebert/ClearUrls

See related issue for doing it on mastodon server: mastodon/mastodon#16008

@yvolk
Copy link
Member

yvolk commented Oct 28, 2021

@Swrup Thank you for suggestion.
I agree with the comment: "I support the root request. Sadly, like the CleanURLs plugin... this is a fast moving target that regularly changes and will likely need to be maintained/updated to be effective."

For AndStatus this could be a global option that changes clickable URLs on the fly, so a User could try different options or even turn the feature on/off without losing original content.

The questions are:
Q1. Who will maintain the tracking elements' configuration/parameters?
As we don't have any antitracking service provider, the answer is: the User himself.

Q2. What are that configuration parameters,
what are default values for them (this is what we will need to maintain in the source code!),
what UI do we need to allow a User to maintain them,
how should the app apply that parameters while cleaning an URL?
@Swrup Could you analyze this and create the design / description ready for implementation in AndStatus? With reasonable configurability and not too hard for a User to understand and to have it working? Not just a link to another project that is hard to port to our app.

@yvolk yvolk changed the title [Feature Request] Remove tracking elements from URLs Remove tracking elements from URLs Oct 28, 2021
@Swrup
Copy link
Author

Swrup commented Nov 14, 2021

Hello,

The most simple UI will be a "URL Tracking Protection On/Off" button in the settings with an additional text explaining what it does.

For removing trackers a file containing all the regex rules to apply is needed:
https://gitlab.com/anti-tracking/ClearURLs/rules/-/raw/master/data.min.json

It is not a fast moving target, so it is fine to include it in the app.
Maybe the most recent version can be automatically fetched by gradle when building the app?

Here is a well documented python example on how to use the rule file to clean urls:
https://github.com/walterl/uroute/blob/master/uroute/url.py

This should be applied to every post before they are shown to the user.
Or if possible only to a link when it is clicked, but before the user is redirected to the web page.

I hope this is helpful.

@yvolk
Copy link
Member

yvolk commented Nov 21, 2021

OK, so no configuration except for turning it on/off for the start...
@Swrup Thank you. Applying the removal algorithm on a link click looks like the safest way in terms of influence on the app performance.

@opk12
Copy link

opk12 commented Mar 1, 2024

@yvolk What about calling an external URL cleaner app via API?

@yvolk
Copy link
Member

yvolk commented Mar 18, 2024

@yvolk What about calling an external URL cleaner app via API?

We could use that. The main problem is to find such a service that is free for use and reasonably sustainable. What would be a way to earn money for that service in order to at least pay for its hosting and support?

@opk12
Copy link

opk12 commented Mar 21, 2024

@yvolk Thank you. Léon is an excellent and maintained URL cleaner app, also available in F-droid. I opened a feature request so that

  • andStatus or other app calls Léon via Intent or other IPC
  • Léon cleans the URL (offline, on the phone)
  • Léon returns the cleaned URL to the caller

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

No branches or pull requests

3 participants