Thursday, 6 May 2010

Tracking Facebook with Google Analytics

Tracking Facebook with Google Analytics

When I talk about tracking Facebook with Google Analytics, I’m really talking about two key aspects: 1) Tracking how much traffic we receive from Facebook and 2) Understanding the actual traffic visiting a Facebook profile. So, how can we use Google Analytics to address these two important but distinct requirements?

1) Tracking traffic from Facebook
Tracking the traffic you are receiving as a result of your presence on Facebook can, to a certain extent, be accomplished with Google Analytics. Assuming your website is tagged with Google Analytics, by default, log-out users following links to your site on Facebook will show up in the “Referring Sites” report.

As the picture illustrates below, you can filter the Referring Sites report to filter-in on social media sites with a filter such as: “youtube|||facebook|myspace|twitter|stumbleupon|||”

Unfortunately, logged in users following links to your site on Facebook reach Google Analytics as a “Direct” source of traffic. This seems to be as a result of Facebook blocking the referral information.

So, although we might not see the full extent of the traffic coming from Facebook because many users will be logged in and posting their own links, we can, however, get in control of any links that we post.

The best way to do this is to build a campaign tracking URL using the Google Analytics URL builder. Then shorten the URL using something like or some such service. So in effect:

You can see more detailed instructions on this in on

This approach will work really well on Twitter too.

2) So how do you measure what’s happening on your Facebook profile?


This seems to be pretty difficult at the moment. The official way is to use the fb:google-analytics function. However, this code can only be inserted on the Canvas page, leaving other pages such as the fan pages untagged.  A popular hack seems to be using Webdigi’s image tagging solution.  However, this has some downsides which I’m currently investigating and will provide an update on soon.


No comments: