How to Track your Facebook Fan Page using Google Analytics

2010 March 8
by FavorHosting

If you have ever wondered how you can add Google Analytics (GA) tracking to your Facebook Fan Page. Then this tip is for you. Although you can not add JavaScript to your Fan pages directly, which rules out adding the GA tracking code directly.

For more information on what a Facebook Fan page is and how to get started for your business visit:   Do you need a Facebook Fan Page for your business?

The following proposed solution, relies on your website being able to support a PHP file, which most web hosting vendors support as standard. The source code required to make this work is located on www.webdigi.co.uk and you will need to upload these files to your own website for this to work.

What you need to do is go to your Google Analytics account and create a new domain name / website to track so that you get your profile id to track traffic to your Facebook fan page. Then after doing that you can go to your Facebook fan page and add an FBML page. Once you have created a new FBML page then you can add your new FBML to your Wall, by selecting “Move to Wall”.

The code you will need to add to your Fan page will look something like this (remember to link it to your website address):

<img src='http://[yourdomain name]/fbga.php?googlecode=[google profile id]&
googledomain=facebook.com/[the page you are tracking]&
pagelink=[which url]&pagetitle=[page title]'>

You will need to replace the following paramaters in the URL for the image above.

  • [google profile id] is where you specify your Google Profile ID
  • [the page you are tracking] is the page you are tracking ex. www.facebook.com/favorhosting
  • [which url] is where you specify the “/contact” or URI
  • [page title] is where you specify the Page title for the page being tracked

Because we are using an image to track page views the visitors to your Facebook fan page will be counted within your Google Analytics account. After you all done setting this up, you will need to wait 24 hours or so before your statistics start updating in your Google Analytics account. But now you can sit back and watch your traffic increase knowing you will be able to monitor the popularity of your Facebook fan page.

Possibly Related Posts:


2 Responses leave one →

Leave a Reply

Note: You can use basic XHTML in your comments. Your email address will never be published.

Subscribe to this comment feed via RSS