Facebook tracking

Boyd

Super Moderator
Staff member
Moderator
Jul 31, 2004
6,863
1,172
1,093
Ben's Branch, Stephen Creek
Starting to see quite a lot of traffic coming to my site from Facebook, yesterday was the busiest ever with 7 or 8 times the activity of a typical day. Glad to see that people are using the site, that's what it's for! :)

But I see that Facebook is modifying the site link and inserting a tracking code. This is the first time I've seen this at boydsmaps.com, although I mentioned it in another thread about the National Weather Service a couple days ago. Here's an example. The "clean" link on the top is what you get if you click BOYDS MAPS in the menu bar here at NJPB, and the bottom link is what you get when clicking a link that was posted on Facebook. They have inserted all the stuff that's highlighted in yellow.

fbLink.png


A google search for "fbclid" will tell you more about these modified links, evidently it was implemented by Facebook last winter as a way to track users and get around the privacy features of new browsers. There are a variety of techniques that have been suggested to strip this information out of incoming links and I'll be studying this some more.

When you click BOYDS MAPS here at NJPB the link will be "clean", so I suggest that you use this as your starting point if you're going to share links (unless you want them to contain tracking information). ;)
 
Last edited:

Boyd

Super Moderator
Staff member
Moderator
Jul 31, 2004
6,863
1,172
1,093
Ben's Branch, Stephen Creek
Spent quite awhile writing code to "sanitize" these facebook tracking links and it seemed to work on my test site. But the only way to fully test was making it live on the website. When I did that, some of the facebook links weren't working right, so I went back to the old code. Will have to look into this a little deeper in the coming days. :bang:
 

Boyd

Super Moderator
Staff member
Moderator
Jul 31, 2004
6,863
1,172
1,093
Ben's Branch, Stephen Creek
Spent a lot more time on this just now, and I can identify the "dirty" facebook links and generate a clean version. But for some reason, I can't force the clean version to replace the dirty one. Looks like the browser thinks it's a "popup" and automatically blocks it. Ugh. That's about as much time as I can spend on this for now, so I guess facebook wins the first round with their sneaky tracking data.. :argh:

In the meantime, look at the address in your browser. It should look something like this

Screen Shot 2019-07-21 at 8.53.34 AM.png


Here's an example of the same link that contains facebook tracking info

Screen Shot 2019-07-21 at 8.53.12 AM.png


You can get a "clean" version of the site by clicking the BOYDS MAPS link at the top of the page here on NJPB, or create your own clean bookmark.
 
Last edited: