Skip to main content

Add Google Analytics to Facebook Fan Pages

by Neil Goddard | 16.06.2010

So you’ve created a facebook fan page and you’ve got a few fans, but to really know how many people are viewing your page and where they are coming from you need to see the facts and figures. This tutorial will show you how to add Google Analytics tracking to your Facebook Fan Page.

Step 1.  Google Analytics setup

First of all, if you haven’t already create yourself a Google analytics account at www.google.com/analytics/ and create a new Website profile specifically for the fan page. Call it something like facebook.com or facebook.com/page_name and click finish.  You will be given a unique analytics tracking code, all we need from this code is the UA number e.g. UA-1456736-8

analyticsnew

Step 2.  Make your tracking code Facebook friendly

Now there’s a handy tool from webdigi that will turn your analytics code into an image that you can add to facebook – http://ga.webdigi.co.uk/

Fill out the form with the following:

  1. 1. Your unique analytics code “UA-1456736-8”
  2. 2. The Domain name that you entered into Google analytics e.g. facebook.com
  3. Page link is to identify the fan page when you see it analytics e.g. home_page
  4. This is a short description of the page e.g. Home Page

Then click on generate code

image-generator

The generated code should look like this:

<img src=’http://ga.webdigi.co.uk/fbga.php?googlecode=UA-1456736-8&googledomain=facebook.com&pagelink=home_page&pagetitle=Home%20Page’></img>

Now keep the code safe for step 3

Step 3. Add the code to your Facebook fan page

Go to your Fan page and Click “edit page”

Scroll down to “more applications” and click to add the application called “static FBML” also know as: Static Facebook Markup language

Then click add to my page

Go back to your fan page and click on “boxes” and then Click the icon to edit the FBML and click move to wall which will move the static FBML box to a tab on your fan home page

Go back to your Fan page and again click onto “edit page” and scroll down to the FBML section and click “edit”.  Now this is where you paste the image code created in step 2 and click save changes.

Voila! Now all you have to do is wait about 24hours and Google will start tracking traffic to your page