Strip unwanted Facebook tracking code from links

Annoyed with posting links that add Facebook tracking codes?
To strip the code, I found a short Javascript URL redirect.
https://1-DOT.com/to/?example.com/?tag=OK&fbclid=REMOVE
Facebook example ( "Text added" ) -- https://facebook.com/groups/summerlin.outdoors/posts/1815748399369263
---
https://1-DOT.com/poplinks

justaprogressive
(3,975 posts)Useful and discreet.
barbtries
(30,456 posts)thanks
If you have a link that you want to post to Facebook
Example: https://www.democraticunderground.com/12165900
When you post the link to Facebook, this is what Facebook adds:
https://www.democraticunderground.com/12165900?fbclid=IwY2xjawKdSgBleHRuA2FlbQIxMQBicmlkETFPMWhqMEtZdDJNY25vbTBHAR5eKdIgrFysQR3z1Hgx5pL0yBApK_O5bBq08zb8vfngCO-vd17jm9b5fdEZpw_aem_fMho0GY0F4L2WbuVZE5_wA
If instead, you post to Facebook using this redirection link:
https://1-DOT.com/to/?www.democraticunderground.com/12165900
The "stripped" link is redirected to your intended webpage (without the Facebook tracking code)
https://www.democraticunderground.com/12165900

?fbclid= ... is the start of Facebook's long tracking code
Las Vegas Mixx
(317 posts)The redirect link works great except that Facebook does not add a thumbnail image to the post.
This may not be important but if it is, I have a fix (Facebook hack) that restores the post thumbnail.
Note that post #1 has no thumbnail image but post #3 has the image with the same redirect link.
The trick is to post the original link (#2). Then edit your post to erase the original link replacing it with the redirect link. Facebook will keep the old thumbnail image even though the link URL has changed.
LVZ
(969 posts)LVZ
(969 posts)For your own website, add this near top of .htaccess file to strip Facebook tracking.
RewriteEngine On
RewriteCond %{QUERY_STRING} ^(.*?)(&?fbclid=[a-zA-Z0-9_-]+)$
RewriteRule ^(.*)$ /$1?%1 [L,NE,R=301]
< /IfModule >
NOTE: remove space after/before ... < and > characters ...
in use example: https://1-DOT.com/poplinks/?x&fbclid=REMOVE