Jump to content

Clean some of the social tracking links when posting news if possible


Recommended Posts

Using social media produces hyperlinks that are way longer than they need to be, because they add tracking parameters to the URL which are Query Strings that get sent to the server, not all of them are 3rd-party or have to do with tracking, but in this case it's all about that, that only helps them financially but also tracks how many people visited that link and from which website, depending on the amount and type of parameters. Probably something this community would agree is good to avoid where practically possible.


With facebook that parameter is usually:



In case of Twitter it's usually like:



While the actual page is just this:


That's it, that's all it takes to link to a specific tweet, nothing more. So as soon as you see another slash after those numbers /?ref_src=... that's all unnecessary (optional from technical point of view).


So when posting links in text, they can be easily cleaned by whoever posts news on the homepage, not only about tracking but long links create formatting issues and weirdness the way different browsers deal with it including the way they parse it, it can break the way page looks visually.


However, unfortunately embedding social media posts with social plugins directly into the news pages automatically creates these tracking links no matter where inside the embeed frame you'd click, and that stuff I think is harder to clean out, it would either require all users with a custom client-side browser script cleaner, if at all possible poking into the social plugin code, I actually didn't look into this yet, I might later.

Or a custom script running on the website that would do this but again I'm not sure if it would be possible as there are coding limitations and unrelated security measures that could prevent this in general. I haven't deepely looked into these things for a number of years, since I don't use that much social media anyway and uBlock deals with most of it automatically, but I guess not this, or I didn't enable the specific optional filters.


Otherwise right now the manual way to avoid tracking links from embedded posts is for all users to do on their own to right-click on a link instead, not left-click, opens up a context menu and from there you "Copy Link Location" and manually paste it into a new tab's URL address without going to it, then delete the tracking parameters, and only then hit Enter to connect. It's slow and tedious and so many won't bother doing this all the time or will forget about it with time, me included.


It takes a bit of experience to figure out generally which params are actually part of the target site and are required for submitting forms and other things, for example the current URL I'm typing this thread into has a &do=add in the end, this is not a 3rd-party tracking parameter, it's a parameter that tells the davidicke.com forums that I want to write a new thread, it won't give me the new thread page if I ommit this key parameter, and so on with other websites.


I'll update this thread if I find a better solution.

Edited by OmegaFreezor
  • Like 2
  • Thanks 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...