Your friends at Viget present Advance, a Strategy & Marketing Blog

What is fb_xd_fragment and how can I make it go away from Google Analytics?

Recently I was troubleshooting why ?fb_xd_fragment= was getting appended to the end of a bunch of URLs in Google Analytics. With a little bit of googling, the source of the problem wasn’t tough to find--it happens when a visitor using Internet Explorer clicks a Facebook ‘Like’ button on your page.

Surprisingly, though, all of the highly ranking results in Google give a GA solution that’s flat-out wrong. Here’s why:

In a test we ran, clicking a Like button on /pageA showed two line items in Analytics:

  • /pageA : 1 pageview (1 unique)
  • /pageA?fb_xd_fragment= : 4 pageviews (1 unique)

PageA is a single page, so we want it to show up on a single line in GA. We also didn’t view the page 5 total times -- so a fix needs to be made.

Other folks suggest that you exclude the fb_xd_fragment query parameter in your profile settings. The problem with this method: it doesn’t exclude the entire page. Instead, it just strips off the parameter from the end of the URL and condenses the two URLs to a single line item. In doing this, it also sums their pageviews, which will give you wrong ‘pageview’ and ‘average-pages-per-visit’ data.

Since the page with the query parameter isn’t a real view, don’t just strip it -- exclude that page (and its corresponding metrics) entirely. This correct solution is equally as quick -- just go to Settings > Filters > New Filter and add the following Exclude filter (hover for a larger view):

Now you’ll only see that single page and pageview, get more accurate data, and avoid getting duped!

 


Get More From Viget

Subscribe to get our monthly newsletter and occasional special announcements.