In late 2018, Facebook began appending "fbclid" query strings to the ends of all outbound URLs originating from Facebook's site. These URLs take the format &fbclid=IwAR0Ylspg9Zo1-4JLuy5L3N7RhNTHg5BETDMlsQkUST8QC1JCo3iC6-54_PQ, and are appended to all outbound content, both FB ads as well as organic posts. This post will show you how to remove this parameter from your Google Analytics reports.
This fbclid parameter is similar to GA's UTM strings, which are used for campaign attribution. However, while UTM strings are generally used at an aggregate level, the fbclid is a click ID with a unique value for each user. Facebook uses it to connect user actions on a website with the Facebook ad or content that they engaged with.
In Google Analytics, this new parameter has the undesireable side effect of cluttering the All Pages report with unique URLs. Normally these URLs would be rolled up together into a single line, but the unique fbclid causes each link to show up as a distinct value.
Fortunately there's an easy fix: simply navigate to Admin > View Settings and enter 'fbclid' into the Exclude URL Query Parameters box.
This will strip out the fbclid parameter from the URL, and enable these URLs to display as a single line again, as before. It won't affect your GA or FB reporting, as this setting only affects how the URL displays in GA. Note that this setting isn't retro-active, and will only change data going forward.
Does this contribute to index bloat?
No, FB is just adding query strings, not creating new pages on your site.
Thanks Man! Quick fix. Got a question: Will there be a way to avoid this across account level or any GTM method that we can setup for the GA tag not to take up this sort of FBCLID. so we can keep that as a default setup and keep duplicate that container for future projects? Just curious
There should be a way to do this in GTM with a Javascript variable that strips out the query string before sending it to GA. However, this would mean delaying the page view tag slightly until the script completes, and seems quite error-prone, like you might inadvertently strip out the wrong parameters at some point. So I'd stick to the GA query string exclusion method, inconvenient as it is.
Thanks for the clarification mate!
Hi All,
There is another way of removing the “fbclid” from the URL if you have the backend access. Just put these two lines in the .htaccess files:
RewriteCond %{QUERY_STRING} (^|&)fbclid=.*($|&)
RewriteRule . https://www.edukolkata.com%{REQUEST_URI}? [R=301,L]
The good thing is that it will keep the URL clean. I have used this at my site and it works like a charm:
https://www.edukolkata.com/course/list?fbclid=xxxxxxx_xxxxx-xxxxx
Thanks
Prasenjit
Nice solution, thanks for sharing! I And your method should work for any analytics or logging system, not just GA, and will prevent users from loading non-cached versions of the page. Should also improve user privacy slightly (though on the flip side, could harm attribution tracking if you're running Facebook ads).