SEO Blog:

Track Facebook Visitors by Adding Google Analytics to Your Fan Page

26th July 2010

Whilst Facebook can provide some analytical data on how many visits you get to your Fan Page and they send emails every week (which mostly end up in my spam), the data we receive is not really sophisticated enough. So now a way has been created to track your visitors via Google Analytics.

First of all, this is not my creation, I am merely blogging about it. It was created by www.webdigi.co.uk.

The best way of explaining how it works is to explain how to create it, so I will go straight into it.

Create a New Google Analytics Profile

First thing you need to do is to create a new profile on Analytics, although you must create a profile for a new domain. This will give you a new tracking code which you must note down.

Creating the Facebook Code

Before we continue onto the next part, a little background.

As most people who use it know, Google Analytics needs JavaScript to work. Unfortunately Facebook only allows limited JavaScript so the two are not compatible. Many people have tried to add their Analytics code to their page (including myself) and many people have failed (including myself). So what to do. Well, the clever people at Web Digi have created a free and open source way to convert the Analytics code into an HTML IMG; you can find it at http://ga.webdigi.co.uk/

Simply place the code and Facebook details in the appropriate categories. You will see four categories:

  1. Analytics Code: - This is where you put the UA number from your analytics code
  2. Domain on Analytics: – The domain you used for the analytics profile
  3. Page Link: – Used to let you track the page on Analytics – call it something you will recognise
  4. Page Title: – For your own reference on Analytics

Once you have placed all of the information in, click generate code, which will give you the IMG code you need to put into Facebook.

faceb

Placing the Code in Facebook

Whilst this is possible to do, it can be a bit fiddly (well for me anyway, i’m sure a lot more of you use the Fan Page on Facebook than I do).

The pages that can be tracked are the static boxes that are created created with static FBML. Create as many of these boxes as you like and for each one, add a new IMG file from above. Remember to create a new code for everyone you have.

You cannot add the code to the wall as it is, so create a FBML box just for the wall. Click on Application setting and click [add] to place the box on the wall. This will then track it.

There you have it. 24 hours later you will be able to track your Facebook Fan Page using Google Analytics.

Let us know how you got on or if you ran into any problems.

If you would like to speak to us about our Website Analytics Consulting Services, please contact us.

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Facebook
  • LinkedIn
  • Digg
  • del.icio.us
  • StumbleUpon
  • Google Bookmarks
  • Slashdot
  • Squidoo
  • Technorati
  • Reddit
  • Sphinn
  • NewsVine

Other posts you might like...

TAGS:  ,
POSTED IN:  Analytics, Facebook, Google Analytics, Social Media
POSTED BY: Colin

3 Responses to “Track Facebook Visitors by Adding Google Analytics to Your Fan Page”

Leave a Reply