3 posts by 2 authors in: Forums > Off Topic / Other
Last Post: November 8   (RSS)

Hi all,

We noticed that Facebook recently started automatically adding a tracking query param to links shared on their platform. It's "fbclid" followed by a long alphanumeric value.

The problem we noticed was if the query param value ended with a numeric value it would interfere with the function whereRecordNumberInUrl which is used for multi record section detail pages.

We used mod_rewrite to remove this query param so as not to interfere with the above referenced function. We do use the permalinks plugin on our sites and added the following code right before "Pass URL parameter to permalinks dispatcher":

## remove facebook tracking query param fbclid
RewriteCond %{QUERY_STRING} ^(.*)&?fbclid=[^&]+&?(.*)$ [NC]
RewriteRule ^/?(.*)$ /$1?%1%2 [R=301,NE,L]

Feedback on this topic is certainly welcome.

Steve

Thanks Steve, 

Looks like that's a new parameter added by Facebook recently.  I see there's a lot of posts returned by google from the last few days about it.

You can update getLastNumberInUrl() in /lib/viewer_functions.php to ignore that with the following change: 

  • Open /lib/viewer_functions.php
  • Search for: action_ref_map
  • Add the code in red: 'action_ref_map','fbclid', // additional facebook parameters

And that should fix it for whereRecordNumberInUrl() as well.  

Let me know if that works for you and we'll get it in the next release as well.  Thanks!

Dave Edis - Senior Developer
interactivetools.com