A couple of months ago, I was looking at a client’s Google Analytics reports for the previous month and noticed something strange was appending to the pages listed under Top Content – something that looked like this:
My first reaction was “What the #$&% is that??”
Where fb_xd_fragment Comes From
In a nutshell, what has happened is that you have placed the XFBML version of the Facebook Like button on your site, allowing your visitors to Like and Share your pages galore. This is a wonderful thing. However, in doing so, this handy little button creates a “phantom” page every time someone clicks Like, resulting in Google Analytics recording it as a separate page visited.
So for example you have a page called www.yourdomain.com/buy-my-widgets
If you have placed the Facebook button on this page, Analytics will show it twice like this:
www.yourdomain.com/buy-my-widgets Pageviews: 500,000 – This is the REAL number of pageviews for this page
(if you actually did get 500K pageviews in a month, I’m thoroughly impressed by the way)
www.yourdomain.com/buy-my-widgets?fb_xd_fragment= Pageviews: 100,000 – this is how many times visitors clicked the Facebook Like button while visiting this page.
I See It! What Next?
If you’ve come across this in your own Analytics reports, you’re not alone. The infamous Facebook Like button bug has been discussed and forumed and posted and shared across the Internet for a while now.
Most of these discussions involve confusing coding gobbledygook to fix the problem, but today we’re just going to talk about how to remove this parameter from your Google Analytics reports. If these FB Like pages are being indexed by Google or other search engines, that is very bad for SEO. Contact your web developer or designer immediately so that they may find the coding solution best suited for your site.
So, on to removing this little Facebook nugget from your Analytics. There are two ways to do this.
The Permanent Solution
One is to permanently exclude it so that you never have to see it again:
1. Login to Analytics and then click on the Account name of the website you’re working with.
2. Click on the Edit link which is located all the way to the right of the screen underneath Actions.
3. Click Edit on the first section called Main Website Profile Information. You will see a field called Exclude URL Query Parameters. Enter fb_xd_fragment into this field.
4. Click Save Changes at the bottom.
The Temporary Solution
You may decide that you want to have the option of seeing how many times the Facebook Like button was clicked, but then be able to remove it quickly for other reporting purposes. In that case, you will bypass the permanent exclude mentioned above and filter the fb_xd_fragment pages out manually each time you check your reports.
1. From the Dashboard, click Content > Top Content
2. Scroll down to the bottom of the list of viewed pages to the field called Filter Page.
3. From the pull-down menu select “excluding” and then type in fb_xd_fragment and click Go
This will remove any of the “phantom” FB Like pages from appearing in your Top Content results so that you can get a clearer picture of your real pages’ performance. This filter will remove itself when you leave the page.
Questions about this post or another question about Analytics? Post it here in comments and I’ll be happy to answer.