Track your Facebook Page with Google Analytics

UPDATE: Facebook has since removed the boxes feature so this page is now outdated and this tracking no longer works. If I find a new solution I will post it here

I have been looking for an effective way to track Facebook traffic for a while now as the built in Facebook Stats do not give me the info I need. Let me walk you through an easy tutorial on how to integrate Facebook traffic into your Google analytics account.

Facebook fan pages are limited to tracking capabilities as they use limited Javascript functions necessary for the Google Tracking code. So follow these simple steps as we work our way around this and get Analytics installed on your Facebook fan page.

Step 1: Create a Google Account

If you do not have Google Analytics you will need to create a new account. If you already have Analytics you can create a new profile and track your Facebook visits separate (recommended) or you can use your existing code and proceed to step 2.

Create Analytics Account

You can use facebook.com or facebook.com/[your-page] as the URL and then choose your region and submit. Google will then give you a tracking code with a unique ID, we will use this id for the next step.

Get Unique Analytics Code

Step 2: Use FBGAT to generate a code

FBGAT is is a free tool that can generate a the code necessary to bypass the Javascript limitations on Facebook.

FBGAT code generator
  • Analytics Code: This is the unique ID you got in Step 1
  • Domain on Analytics: You can use facebook.com or the full URL of your facebook fan page.
  • Page Link: This is used to identify your page in Google Analytics so be sure you don’t use a page you already have. The results of your Facebook visits will show under the “Content” section of Google Analytics and will display the page name you input here.
  • Page Title: This is for your own reference.

Once you have clicked generate you will be presented with a code to put on your Facebook page. Proceed to step 3 to see how this is done.

Step 3: Adding the code to Facebook

Static FBML You will need to use an HTML editor like Static FBML to be able to edit your Facebook pages. Simply copy the code generated in Step 2 and place it into the Static FBML page. To get the new tracking page to track your main wall page you will need to convert the FBML page to display as a box and then once it is showing as a box you will need to edit it and send it to your wall.

That’s it, you will need to wait 24hrs to see the effects of your new Facebook tracking and then create whichever filters are necessary to display the results. I like to add an advanced segment with the Facebook page so that I can see all visits vs facebook visits.

Tags: , , ,

  • http://directoryofkansascity.com/blog George

    SEOCowboy, Great tool for my fan page. I plugged it into Only2Clicks and away we go. Thanks a heap. I will be passing on your sage advise to my readers and sending more traffic to you. bit.ly/92hXhR

  • http://directoryofkansascity.com/blog George

    SEOCowboy, Great tool for my fan page. I plugged it into Only2Clicks and away we go. Thanks a heap. I will be passing on your sage advise to my readers and sending more traffic to you. bit.ly/92hXhR

  • http://www.seoconsult.co.uk Steve

    Its important to track traffic via facebook because Facebook hosted pages ranking well in external search engines like Google, Yahoo and Bing. and Content that can be displayed in the search results from Facebook’s internal search engine such as Facebook hosted pages, Facebook Questions and web pages served up through Facebook’s search results partner, Bing.