Table of contents
How to exclude the fbclid parameter from Google Analytics reports?
Vlada Malysheva, Creative Writer @ OWOX
In this article, we describe two ways to disconnect the fbclid parameter from Google Analytics reports — manually or automatically.
Measure CPO and ROAS in GA4
Automatically link your Ad Platforms cost data to Google Analytics 4 conversion data, so you can analyze your marketing KPIs and make fully informed decisions
What is fbclid and how does it interfere with Google Analytics reports?
The Facebook Click Identifier (fbclid) is used for analyzing outgoing traffic and collecting user data. The click identifier from Google Ads (gclid) is analogous. The main difference is that the fbclid parameter creates difficulties when working with standard reports in Google Analytics.
Though in the official help documentation there is no description of this parameter, most experts agree that Facebook uses it to bypass restrictions on collecting users’ personal information. You can find more details about it in articles on the Naked Security blog by Sophos. If you hover your cursor over any external link on Facebook, you’ll be able to see an fbclid in the URL address:
It’s known that this parameter:
- is transferred both with advertising links and with all external links from Facebook
- does not prevent the work of UTM tags
With the appearance of this parameter, standard reports in Google Analytics have deteriorated. Whereas previously there was one line for the page, now there’s also a separate line for the fbclid.
To avoid duplication, it’s necessary to exclude the fbclid parameter in Google Analytics settings (instructions below).
How this parameter looks in a report:
With OWOX BI Pipeline, you can collect complete statistics for your Facebook campaigns automatically. Combine your data from Facebook ad campaigns, Google and Bing ads, and other sources with a free trial.
20 Steps to Successful Marketing AnalyticsDownload now
How to work with data from the previous period
Bad news: It’s impossible to remove a parameter from a previous period in Google Analytics. However, there’s a life hack for working with statistics for previous periods.
To filter all views of one page (with and without an fbclid parameter) from already collected data, we need to use advanced search features.
Let’s look at how to receive a report on the homepage. We’ll choose “Matching RegExp” and enter the following formula in the search field:
After applying this expression, we can work with those reports from the previous period that we’ve applied this filter to. In the table, there will be lines only for the homepage, and it’s possible to have a look at the general statistics in the first line after table headings.
Note: If you use additional parameters that are displayed in the report, regular expressions will need to be finished under these parameters.
How to clean Google Analytics reports of the fbclid parameter in future sessions
In Google Analytics, it’s possible to disconnect the fbclid parameter manually or automatically.
To remove it manually, go to View Settings in the admin panel:
In the Exclude URL Query Parameters field, write “fbclid.” If the field was already filled, then add a comma followed by “fbclid” after the last value and save the changes. Now the fbclid parameter will not appear in future sessions of this view in reports.
If you use several views, you’ll need to repeat the procedure for each one.
Note: Don’t forget that it’s recommended to make a reserve view without filters and exceptions.
For automating this process, you can also use a Python script by Dmitry Osiyuk that you can download from his blog.
The fbclid parameter creates difficulties in working with Google Analytics reports by duplicating lines. However, there’s a solution: you can filter parameters when working with historical data and exclude them from future sessions.
If you still have any questions, ask them in the comments below :)