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 and create a new Website profile specifically for the fan page. Call it something like or 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


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 –

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.
  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


The generated code should look like this:

<img src=’’></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