social media how toYou’ve created a Facebook fan page and people are frequenting your page.  But do you really know how many people visit your page, what areas are popular and what parts of the world your visitors come from?

Facebook Insights shows some demographic information on your page, but is limited to information about interactions with your fans.  The free Google Analytics tool offers more sophisticated and comprehensive data.  Adding Google Analytics to your fan page can be done easily but requires some special steps.

One of the limitations of Facebook fan pages is they can only run limited JavaScript. Google Analytics needs JavaScript code included on a page to correctly track visitors in the traditional way.  And running JavaScript won’t work on your fan page…

However, there is a new solution.  Using free and opensource FBGAT (Facebook Google Analytics Tracker), you can get Google Analytics working on your Facebook fan page. Now you can track visitor statistics, traffic sources, visitor countries, and keyword searches with all the other powerful reporting of Google Analytics.

What follows are the instructions to set up Google Analytics tracker on your Facebook fan page. (Note: Your fan page must use an HTML application like static FBML for you to use this method.) Important Update: Facebook no longer supports FBML. Please refer to the articles on Facebook iFrame.

#1: Create a Google Analytics account

If you already have a Google Analytics account, create a new website profile to separately track visits to your Facebook fan page.

Where it says "Add a Profile...", simply paste your fan page URL or use

After the step above, Google will display your tracking code. The tracking code generally looks like this: UA-3123123-2.  Note: Google will tell you to activate the website.  You do not need to do this.

#2: Get your tracking images

The way to work around the Facebook JavaScript limitation is to generate custom images. FBGAT is a free tool that will generate your custom image code to track visits on each of your Facebook fan pages.

The above screenshot shows what the code generator looks like.

Here’s what to include in the fields shown above:

  • Analytics Code: This is the tracking code that you got in step #1. (It is very important that you enter this correctly.)
  • Domain on Analytics: The domain name you created in step #1 (use if you used it in step #1).
  • Page Link: This is to let you track the page on Google Analytics. What would you like to call your page so that you’ll recognize it in Analytics?
  • Page Title: This is for your reference.

After clicking the “Generate Code” button, you’ll get a code which you’ll need to copy in full. You’ll have to generate a separate code for each fan page you want to track and place it as shown in step #3 below.  Note: If you have multiple pages powered by FBML, you can do this for each page.

#3: Add the code to Facebook

Place the code generated as shown within your Facebook page using an app like Static FBML.  Programs like Static FBML allow you to add HTML to your pages.  By simplify editing your Static FMBL pages and inserting the code from step 2, Google Analytics will track all visits to those pages.

You can place the code anywhere as long as it does not disrupt functionality of your existing page. I prefer the top or the bottom of the page.

That’s all there is to it. The tracking has begun. Google Analytics will now need about 24 hours to show you a report of your visitors.

Tracking Visits to Your Fan Page Wall

Editor’s note added 8/26//2010: Since Facebook removed Boxes, tracking wall traffic is no longer an option

The wall might be your main page. To track this, again you will need to create a page with static FBML. The only difference is that to show this on the wall, you are required to make it a box. Just click on the (add) on the Box, and it will be added to the wall. To change this setting, click on “Application Settings” under the FBML that you would like to create as a box. As with other pages, please note that you have to create a unique tracking code for this page as well.

What do you think? Will you be able to better justify your Facebook marketing with this added insight? Please comment below.

Tags: , , , , , , , , , , , , , , , , , , ,

Get Social Media Examiner’s Future Articles in Your Inbox!

Join 465,000+ of your peers! Get our latest articles delivered to your email inbox and get the FREE Social Media Marketing Industry Report (56 pages, 90 charts)!

More info...
  • Thanks for going through the process of setting up google analytics for Facebook Fan Page. This will become a valuable resource for all those Fan Pages out thee.

  • You will be able to further track fan/non-fan based activity, visualise your visits in a funnel, track activity on a page, using the same technique following the steps here

  • Chris Leone

    This is definitely peaking my interest. Looking forward to giving it a shot.

    Thanks for the tip, Mariam 🙂

  • Fantastic article going to try this on my facebook page tonight!

  • Will definitely be giving this a go – it will be nice to see how effective my fan pages actually are.

  • sully

    Will this track data across the whole fan page? Or just in the FBML tab (and/or your wall if you add the FBML box)? Ex. will Photos or the Info tab be tracked?

  • Thanks for the tip, Marian.

    Can you also do this for a LinkedIn group page or for a twitter page ??

    Patrick (@itworks on twitter)

  • Hey Sully – It works on any tabs that are created with FBML and can work on the wall if you move a FBML box to the wall. – Mike

  • Morley

    Note that this’ll only work with tabs created by the Static FBML applications. Tabs generated by applications can’t be tracked this way because all the images would be cached by Facebook, which washes out the tracking.

  • dinalundberg

    Thanks for sharing such valuable insights Mariam!

    It´s essential for businesses running their Facebook fan pages to know what their customers like the most about it and if they actually have adopted it as a useful tool or they have just add themselves to it and don´t really use it. Join some interesting conversations about this topic on

  • webdistortion

    or try the simple Facebook supported option.

  • That option does not work for Facebook pages. Please refer to the notes on the link you sent. “This tag can only be used on canvas pages”.

  • mikel_z

    Good stuff! I really like GA for my site, and now I can really nail down the details for my clients Pages.

  • mikel_z

    One more question, if we add it to the wall can we add an image to the code so that there isn’t a box labeled and blank on the wall page?

  • John W

    So I can add it to the wall to keep track of the main visitors to my page and I can add it to tabs that I create to keep track of visits to that particular tab?

    If this is true, Thank you guys very much for this information.

  • We just had a meeting yesterday about our Facebook traffic and how our current Google Analytics account doesn’t break it down as specifically as we want it to. We look forward to implementing this soon to get better metrics for our team. Thank you!

  • Is their google analytics for LinkedIn pages, aside from the Event page?

  • Yep, thats true 🙂

  • I’ve had this installed on my fan page for a few weeks now and I LOVE IT! Thanks for providing this in depth way to track analytics. I’m off to RT this article!

  • This is quite a timely article. True, Facebook insights does not provide sufficient information. It will be much easier for my clients to gauge facebook activity and to make necessary changes to further promote their brand and services.

    I read above it works with FBML box. Will this also track, wall posts and wall activity?

  • Thanks for the article! I’m definitely going to give this a try on my fan page.

  • CDowns

    This is cool, but I am struggling with the instructions. I generated the code and put a static FBML box on the site. But I can’t seem to paste the code into the box? Or what do I do with the box? I clicked “move to wall” and it seemed to disappear, and I couldn’t find it on the wall. Wow do I sound like a newbie or what? Any help would be appreciated. Thanks

  • We didn’t even know this was possible, Mariam. Thanks for the in-depth explanations!

  • Guest

    Sounds great, but I just have to question how many businesses really need it. Maybe gilding the lily. Insights works for me.

  • Lorri Wyndham

    I had no idea! – thanks for the education an the ‘how to”

  • I think you are doing fine. This is how the static FBML box typically looks like Also, please give us a link to your facebook fan page. On our Facebook page here you will see a box named “Articles” this has the tracking code in it to help track visits.

  • vmiecznikowski

    Very exciting! Thank you for sharing.. I am looking forward to trying it out.

  • Our hosted FBGAT (Facebook Google Analytics Tracker) currently helps track well over 1 million facebook fan page views a day! So brands out there are definitely using this on their fan pages to track visits. Tracking like this can come in handy when you run adverts or ad-campaigns. Best of all it is free, so added visitor information (Visitor location, browsers used, timing of visits, etc) can always help.

  • You might find these further advanced tips useful on your fan page if you already have the basic tracking installed

  • This is one of the most useful articles I’ve seen lately–retweeting now. Thanks!

  • Annie

    I followed all this procedure from another site two weeks ago, it was workin the two first days but after nothing… Why ?

  • Samantha

    Absolutely! I can’t wait to see the referring sites and time spent there. Thank you!

  • Awesome measurement tip! I just went through the process and it took ten minutes or less! Very insightful and worthwhile post.

  • Very good post. This new capabilities will provide marketers and page owners a whole new insight into their FB pages. You laid out the process very well – Well done..

  • Cdowns

    Our fan page is

    I only have a blank FBML tab… no box that I can find.

    Thanks for your help!

  • Cdowns

    I think I responded to the wrong post earlier. Sorry.
    Our facebook fan page is
    I only have a blank FBML tab. No box.
    Thanks for your help!

  • hectormillan

    This was awesome! Great idea!

  • Great guide – very insightful! Any tips how to install Google Analytics on Twitter?

  • Thanks This is really gr8 advice I will get this on my fan pages ASAP!!!!! Thanks for the step-by-step guides…

  • Great one Mariam, saw your tutorial a while ago and still need to sit down and figure out how to do the wall thing. Excellent info, thanks for sharing

  • Great actionable information! Thanks so much for the enlightenment.

  • Thanks for sharing! I’ve added it to my fan page and looking forward to it seeing detailed results.

  • I have one issue! I created a FBML landing page and I tried moving it to the wall, and the landing page image shows up in a box, and is pretty distorted and distracting! Can I add 2 FBML applications to one fan page, how can I set up 2 different codes? One for the landing page, one for the wall…..Thanks!

  • TheBlizzrdGroup

    This is awesome. Now there’s no need to invest with those companies that sell social media analytics. Thanks!

  • Terri

    how do i know if my Facebook page uses FBML. it has an FBML tab across the top but there’s nothing underneath it. is this something i needed to add myself. if so, how do i do that?

  • anuconvo

    Awesome Stuff, Webdigi guys!! Looking forward to your next update!! 😛 😛

  • Custom Applications Simply Amazing! I am sure that adding an image tag is simple and allowed by all sites. So this workaround should help with all similar sites that do not allow javascript too. Not only facebook fan pages!

  • FBML is an application you can add to your fanpage. You must first add it. See link in above article Terri

  • Luke, what is your fanpage URL?

  • Allen

    I can’t get this to work at all. The FB source code shows the code is there, but Google keeps saying that the tracking code is not installed. My code:

    I created a new profile in GAnalytics for this. Any ideas?

  • Allen – You need to wait 24 hours per the article above. – Mike

  • Allen

    that’s for the collection of data to begin. GA will tell you instantly if it thinks the tracking code isn’t installed, which is my problem.

  • I have taken a look at the code and it looks to be working ok. You will need to give Google Analytics about 24 hours for it to start showing you the results (although it has already started capturing visitor information from the point you have inserted the code). Once you start seeing results Google Analytics will not show you the “tracking code is not installed” and will be replaced with a green tick and a message Receiving Data.

    Your page has more than 50000 fans, it might be a good idea to try some of the advanced features with Google Analytics

    So, in short it looks like all you need to do is wait for Google!

  • I have responded above. Again the answer is to wait for Google.

    Google only checks if Google’s official tracking is installed. We are not using Google’s official tracking code as it does not work in Facebook. This is because Facebook does not allow Javascript as complex as Google’s to run on their fan pages.

  • Dee

    Is this application able to generate a specific list of who commented on your page, the date they commented and their posting frequency. We need this data for a contest we’re hosting and I’m trying to avoid doing it manually–thanks.

  • bfrankemusic

    Thanks for getting this out there. My question is a simple one. I generated the code for the FB page and put it in FBML (under “Edit FBML”). Was that the right place to paste it in?

    Also do I need to paste in the code generated by Google Analytics as well? It says my url is inactive. Thanks so much!

    Brian Franke

  • Good post, followed your instructions, I’ll have to wait and see tomorrow if anything is getting tracked in my analytics.

  • Extremely interesting, I will have to give this a try and see what my fan page results are.

  • So this would mean I would be unable to track visits to the Info tab, Photos tab, and other tabs generated by non-FBML generated pages? To track visitors to my wall, I would need to create a FBML box that appears on my left sidebar and insert the code there? But that would mean it would track the Info page since it shows up when I browse to the Info tab.

  • Hi there,

    This is so cool. Can’t wait to get the first readings of usages of my Facebook Page in Google Analytics.

    Thanks alot.

    /Per Lund

  • Tony – That would be correct that the info tab and other related tabs that do not allow customization will not be tracked by Google Analytics.

  • Missy Jensen

    I am currently receiving the new Facebook analytics. What information does the Google Analytics provide once installed on Facebook Fan Page?

  • Jo

    This is awesome! For each new fan page do you need to start again at step 1 or step 2?

  • So, how do you move an FBML box to the wall. I’m getting stuck at this point.

  • Justin

    Does it matter that Google Analytics says that my tracking is not installed?

  • This so cool, thanks so much

  • Thanks for sharing this, set it up and waiting for the results.

  • Justin,

    If you read back through the threads here, you will see that GA will not immediately notify you that it can see the code. It took about 6 hours or so for it to show up for me. Now, I’m waiting for the data to follow.

  • lilainoz

    Hi Mariam,
    Thank you so much for the great article!
    Unfortunately, it doesn’t work for me… I’ve tried to set up my Facebook and GA account according to your instructions and have been waiting over the weekend but I still have the alert icon on the GA account and no numbers have been picked up yet.
    I’ve checked all settings again and my only guess is the FBML page on the Facebook page – I am not sure, if I’ve set it up correctly. Would you mind to have a look at it?

    Thank you so much!

  • Justin – No it does not. Just give it about a day. – Mike

  • Mariam,

    This is really useful information. I think I’ve got it installed correctly on our facebook page now. Quick question, when you’re tracking your wall does the box with the FBML have to be on your wall, or can it be on the boxes tab?


  • Thanks for sharing! Very interested to see how this works and the results that are revealed.

  • This is great stuff. I *just* launched my new FB fan page yesterday (, so will be using your tutorial to add GA to it. Thanks!

  • I just did this so I’m not positive its the solution, but give it a go — go to the boxes tab and click on the box, then an option should appear saying move to wall or something like that. Hope this helps!

  • Michelle Murray

    Thanks for this great article. Just a follow up question about the wall. We already have several FBML pages and I’ve added a couple of them to the wall. So I would just add the code to any of those pages that I add to the wall, and then it will track the wall traffic? Should I only add one box to the wall or doesn’t it make a difference? Thanks.

  • AF

    If the boxes are on the sidebar (to the left of the wall) does that mean they are on the wall? This would mean that if I paste the code in that box’s FBML it would track data across the wall itself? Thanks for the help!

  • Thanks for this info. I hadn’t thought of adding my fan page to google analyitics but this is a huge help. I’m so excited to see all the data in one place. thanks again.

  • My Facebook Fan Page tells me I might like FBML, but won’t let me use it. This may have something to do with having only the fan page and not a personal profile.

  • This is a great suggestion. I am not techy at all, and am getting stuck. I created the code in Google Analytics. Then I created code using your FBGAT tool. If I am going to pick one page to track, I choose the wall. I am getting stuck on the instructions to “make it a box”. Please help.

  • Well, I just did it. I think I did correctly. It showed up on my google analytics page.

  • Its a good description for adding Google Analytics to facebook fan page.This will be useful for me as I did not know that how can I add Google analytical to facebook fan page.I was just searching for this information and I get it here.

  • Great article and a good way to dig deep into your facebook analytics!

  • Hi Miriam,

    This is Very Sneaky.. but *cool*

    …. Ive been trying to get an app that will integrate Google analytics for a while…
    heading straight over to get this done..

    great post and explanation.

    Tasty Blog here.
    Best Regards

    – Jamie D

    PS – the tracking “user engagement” code you provided in the followup is even cooler ! 😉

  • Awesome. Just went through the set-up process and am waiting for GA to show results. Thanks!

  • thnx a ton for this valuable piece of info.
    i was searching for something like this only as Facebook Analytics is very limited…
    And I must say tht execution of Google Analytics has been explained in a very detailed and easy manner for someone like me who is not well verse with programming

  • I can’t get this to work on my page. I followed the directions exactly but Static FBML isn’t letting me put the generated code anywhere. I thought I had it installed last week but Google Analytics kept giving me an error.

  • Zac

    Sorry if this has already been asked, but does it apply to the whole fan page including all the tabs, or is it just one single tab?

  • Hey,
    I’ve installed FBML App, added a Tab, and pasted the code. (not just the google code, but some other code as well). It renders great if you click on the tab and view that page … but how can I actually get this code to show up on all the other pages, and not just in this useless tab? (I keep reading about others saying to “move to wall” but that doesn’t come up for me. When I click the pencil/edit icon on the tab itself, it only says “delete tab” … and the “tab options” is greyed out?

  • Katie

    Great information! Hoping to track data for our fan page wall. I went through the process, but am not sure how to get rid of fans being able to see the labeled “KUEA wall tracking” box on the left-hand sidebar…do I just need to make something up to put there, and leave the img code in to track the rest of the wall? Fan page is:


  • lilahali

    Thank you so much Miriam for posting this! I finally figured out how to apply it to my Non-Profit company page and the data is great!

    Do the amount of visits to my facebook page include how many times the administrator (myself) clicks on our fan page?

    Thank you! :o)

  • This is a load of rubbish, the application just disappeared and is now nowhere to be found.

  • Thanks for the easy step by step explanation. Even though Facebook is getting better at sharing data Google Analytics still tops the Facebook stats.

  • Nathan

    I just follwed the directions, and google analytics says “the tracking isn’t installed” (in the tracking status section)
    Any ideas on what the problem is?

  • masoodsipra

    Masood Sipra
    Sipra Book Company
    Sipra House
    E-34 Block ‘F’ Gulshan-e-Jamal,
    Railway Housing Society, Rashid Minhas Road, Karachi-75350, Pakistan
    Cell: 0300-2144694, E-Mail:

    & SIPRA ALLIANCE OF PAKISTAN — Become a member, send ur details.

  • Haris

    I’m trying to use a modification of this code to track a private website, and get it to emulate a public domain I own. So it would be like

    This is the code I’m using, but it’s not working for some reason. Any ideas?

    var pagePath = document.location.pathname;
    var pageTitle = document.title;

  • Hello,

    Thanks so much for this! I have done mine and hey pesto – 24 hours later it is working! Very valuable.

  • just the one tab

  • go to the edit page area of your facebook page. scroll down until you see fbml. click on application settings. make sure you have a box “added” – if it says available click add.

    now go to your facebook fan page. click on the tab called boxes. (its up next to the wall/info/photos area) (you might have to click on the double arrows to bring down the dropdown menu to find it)

    when u have the boxes tab open click on the pencil edit symbol on your fbml box. click where it says move to wall.

  • yes i would just give it another name and put some filler content in there if you dont have anything else to put.

  • you have to become a fan of fbml before you can add it i think

  • if you add the code to just one of the fbml boxes on your wall it will track all traffic on the wall page

  • Mike I followed all of the directions in this blog and it doesn’t seem to be working for our fan page. Any suggestions?

  • I could be wrong, but if I am using Google analytics to track my web site activity, and I add my Facebook fan page info, won’t this artificially increase my website numbers by increasing the page views, time on site and other metrics?

  • Excellent post. Analytics is crucial to any Internet marketing, and this helps bring all your website satellites like Facebook pages into the mix.

    I’m going to create a ‘new site’ on my analytics so I can get a unique tracking code and keep the traffic separate from my actual website.

  • William

    If you have a static FBML page and a box on the wall, do I need get two seperate google codes? Or can I use the same on on both the static page and the static page that is a wall box?

  • what a useful post!

    I never knew it was possible!

  • Fabulous job!! |Building your island in the ocean of social media. is my site and I am helping local businesses emerge into the realm of social media. This tip was very helpful and will obviously add more value to my services. I appreciate all your effort and plan on doing similar overviews through my site. I look forward to reading more of your posts. Best of success to you. I believe if you help enough people get what they want in life, you can have everything you want in life.

  • hello there,
    we’re trying to add tracking to each tab of our page, but google will not allow us to track a tab. we’re right clicking the tab and then pasting the address that exists for that tab when adding a new profile for a domain. we get a message that says “invalid input.” anyone know a way around this? Thanks!

  • it takes about 24 hours.

  • does anyone know if its possible to add this to other tabs? i’m getting an error in google analytics when i try to add tracking for other tabs. thanks!

  • hey michael – maybe you’ll have some tips for me. we’re trying to track using google analytics on other tabs that DO utilize FBML, but we’re having issues with setting this up in google analytics. when we try to make a new profile for these tabs, we’re getting an error message that says “invalid input.” thanks for any help you might be able to offer!

  • hey dee – there are certain services out there that provide something like this. vitrue has one, and i think spredfast. they both cost money, however.

  • Brian

    It seesm GA has nerfed this method. The __utm.gif now serves broken.

  • Namrata

    Hello, i had a small doubt… for step 1, when i provide the url for my page, do i give the url of justthe main fan page or the exact url of the tab that i would be tracking ?

  • I would be specific, but I am not sure it matters

  • Namrata

    Thanks Michael, but then would i be able to use the same code in different fbml tabs of the same page and get info for all seperately ?

  • could you see your referring sites? i can’t see anything but facebook subdomains. is there a hack to get the real referring sites out from Facebook?

  • Hi, Thanks for sharing good information.I like it very much…

  • CUAdvantage

    When I tried to set one up for the Welcome tab for my page, it said that it was an invalid address. (it is a Static FBML tab). Do I just use the same code from my Wall? If not, how do I enter the url for the specific tab in a format that GA will accept?

  • I thought I read something about Facebook getting rid of boxes soon? Is this going to matter at all to this process?

  • sculley

    HI Miriam,

    Thanks for this article. Very helpful. I’m just wondering…..I’d like to track people who come to my main FB page not just the added FBML pages (I’ve added FBML pages). Would I need to make an FBML page the main landing page to do that or is that what you mean by adding a box (that the box will track the main landing page)?


  • Pleather

    Gosh I hope the “Facebook Privacy Petition” Fan Page doesn’t plan to use google analytics to gather information about their fans who need their privacy. We might all slip into some weird vortex.

  • Gosh I hope the “Facebook Privacy Petition” Fan Page doesn’t plan to use google analytics to gather information about their fans who need their privacy. We might all slip into some weird vortex.

  • Max

    First, thank you, this is a great move and very well written. I successfully put a FBML Box on my Fanpage which includes the tracking code and now I am receiving data.

    However, the data is not very sophisticated. The only page which shows up in my GA-Reporting is “” – I can’t track clicks on the single Tabs or even the links on the page, but these are the details I need to know to rearrange our fanpage.

    Is this simply not possible with this solution or did I do something wrong?


  • Whew! I have spent a lot of time on this and can’t seem to get it right. I read all the posts before mine and still have not been able to figure it out. I can get the fbml to show up in a tab, but when I click on the pencil, the “options” section of the tab is grayed out.

    Now, I’ve read that I need to go into the “Application Settings” area, find where the fbml application is and make certain changes. However, I have scoured the every section of the “Application Settings” area and I don’t see the fbml app anywhere.

    I would appreciate any assistance. The link to my fan page is here:!/pages/California-Sunshine-Jewelry-Gifts/385753084697?ref=ts

    Thanks in advance,

  • how do you set up FBML on your fan page? I am new at this, and I am told to copy codes etc. How can I get these codes on my fan page? I need some help

  • how do you set up FBML on your fan page? I am new at this, and I am told to copy codes etc. How can I get these codes on my fan page? I need some help

  • Jeff

    It’s pretty easy to add Static FBML to your Facebook Page. I created this video to step one through it:

  • Folks – I’m really interested to see how this works on my Facebook Page. I’ve installed your self-hosted version, generated the code and plugged it in. Now I’ll just sit on my hands for a day. Thanks!!!

  • No more sitting on my hands. It, in fact, is tracking hits to my custom Static FBML tab on my Facebook Page. Thanks! Definitely something I can use for my clients and appreciate the share.

  • The video is very clear, but I cannot make it work for my business page. It only works that way when you have a normal Facebook page. It shows that on a business page/fan page that it is possible, but I am less convinced of that more & more.

  • Good stuff! I love it. I will definitely try this one. Thanks for sharing such information anyway.

  • Dana

    how do u move an fbml box to the wall? I only found how to make it a tab

  • dana

    to me it says move to wall tabs, and it creates a tab for it. I don’t think this is good

  • Hi Jeff,

    Google Analytics is not tracking. I have had it install or thought I had it installed about two weeks ago. And it has always worked on my blogs for months. Which says that I do not have it properly installed on my Facebook Fan page.

    I have not established a static FBML tab. Will it capture data about visitors to my wall (tab)?

  • Hi Jeff,

    Google Analytics is not tracking. I have had it install or thought I had it installed about two weeks ago. And it has always worked on my blogs for months. Which says that I do not have it properly installed on my Facebook Fan page.

    I have not established a static FBML tab. Will it capture data about visitors to my wall (tab)?

  • Woody, it will only if you have an FBML box on your wall

  • Swiftsid

    It’s “piquing” not “peaking”.

  • Andrew

    What’s the difference between the Static FBML plugin pages and a “canvas” page?

  • justy

    most of the data has been coming through google analytics from facebook fan page fine (thanks to your instructions) for about 3 weeks but “time on site” is not being recorded for some reason.. it still shows zero! any ideas?

  • does the code seem correct?

    when I set up the google Analytics account, do I have to put as the address or just or the /pagename also?

  • Stephan
  • Thank you, SO MUCH. This is an invaluable tool, and it only makes sense that it should be possible to integrate it with a Facebook page. As FB is no longer the social tool it originally was, but more of a reformed MySpace bombarded by businesses and advertisers (myself included), we need to consider Fan Pages like web pages. FBML and analytics completes this consideration. Thank you!

  • herve leger

    Thank you for going through the process of setting up google analytics for Facebook Fan Page. I found your website perfect for my needs. It contains wonderful and helpful posts. I have read most of them and it was informative for all.

  • Dshimko

    This process no longer works.

    For a while now facebook apps have had images proxied so only the initial proxy click is tracked by GA. About a month ago the static fbml app was also update to proxy images.

    Does anyone have a workaround for the proxy image tracking issue?

  • rt

    No, appears to be the same change that stopped animated gif’s working within Static FBML. Only other avenue is the fb:google-analytics code, but this is primarily for canvas pages, no idea if it will work within a Static FBML page.


    Great Stuff! Thanks

  • Thats really gr8 post. Thanks

  • Sweet – works like a charm! I installed on multiple tabs across 11 different Pages. Thanks so much!

  • Miracle man

    Hello Mariam,

    1st off thanks for sharing your knowledge with the world. I had a few questions for you regarding installing the code:

    For the page link I used the text you suggested (“contact_form”), and in the Page Title slot I typed in a name (“Facebook Fan Page”) in the FBML window. I am no techie, I hope I handled it right.

  • Amir

    hello. first of all thank you for this article. it was very inspiring and i got it to work.

    BUT! I have a big problem and i will appreciate it if you find time to answer me. Here is the question:

    – in google analytics the report is showing that all of the page visits are from direct traffic which i do not think is possible.

    – all of the visits are only from USA, which is also not possible because my page is UK only.

    why is that? any specific reason?

    Thank youuuu 🙂

  • Geoff Shames

    Just a quick question.

    Is it possible to just add a blank box (no other code except for the GA tracking code) to the wall and have it track? I just added a box to our page ( and I can’t actually SEE a box. Does this mean I did something wrong??

    I used the following code, generated by your awesome little generator:

  • Ci06eea

    i couldn’t add the application FBML! how can i do that? every time i press add to my page it says no results

  • Jgoers

    What if my page has multiple Static FBML Boxes on it. Do I have to create unique Google codes (example: UA-17778650) for each box? Or can I just use the same code for all the boxes? I have multiple static FBML boxes on my wall page as well. In order to track the wall page, do I have create a separate new box for that or can I just post the Google code in both static boxes or in just one box? I hope this question is clear.


  • Vasquez Justin

    can i get this to work onmy facebbok PROFILE? not on just a fan page?

  • noypiscripter

    Does it work accurately? Facebook proxies everything including images on Facebook tabs and caches the images.

  • It sure does work

  • This is an incredible site, thanks for this great tip I never thought Google analytics could be used like this.

  • Decard1

    Forgive me if I’m dumb in the “page link” can I put anything there? Or do I need need to put the exact link to the page like “

    What exactly do I need to put in “page link”, sorry but the explanation in the post is insufficient for me. Please Help.

  • Decard1
  • This will be of great use. Hopefully we can start using similar tactics for other social sites

  • Just what I was looking for and nice explanation as well. Thanks for the time it took.

  • What a great idea!

    I am pretty amazed that this is possible and after following your explanation found it very easy to install – many thanks!

  • Grea, I’ve been using this tip for a while now. It’s great to see when (what time during the day) people engage with your page.

  • David

    Very soon (possibly even today) Facebook is getting rid of page boxes. No more boxes tab, no more boxes on the left side of the wall. Can you think of any way to still use Google Analytics for the wall? Obviously the code could still be used in a separate Static FBML Tab, but I don’t see how to get it on my wall tab any longer. Great tutorial btw, has been working well for months!

  • I have the same question as David.. If FB is getting rid of boxes, now what? Thanks!

  • There will be no way to track traffic to the wall w/ Google Analytics

  • There will be no way to track traffic to the wall w/ Google Analytics

  • Jen

    Is this the alternative?

  • Jordan Lane

    This is a good option if you’re tracking the “Likes” on your site to your FB page:

  • Jim

    Hi everyone . . . I think I implemented the Google Analytics code, and the button to distinguish Fans vs. Non-Fans, correctly on my FB Page, but would appreciate others taking a look at it:

    Note that I changed the text in the button to “Please Click” (I’m betting people will, even though it doesn’t tell them why they should). I also changed the text to “Thank you” in the second box that comes up after they click the button, as I don’t want visitors reading all that stuff about tracking. Any reason I should NOT have made those text changes?

  • will this show me how many likes I have had from a certain UTM? I want to track my cost per fan from facebook ads.

  • Vivek07mishra

    If you Could Explain With Screen Shots or with a video on Youtube, It becomes more clear. Anywys Thankx For Your Post.

  • Screencast: How to Add Google Analytics to Your Facebook Fan Page

  • I’m really curious to see how this is going to work. This would be awesome!

  • Karen

    Am I looking at something wrong, or is that video in Spanish? Is it available in English?

  • MrSmith

    lol … of course Stephen, this would have to be rubbish … couldnt be anything you’re doing wrong, now could it ? 😀 Look up some basic tutes on installing static fbml … the app doesnt always show up guy. That’s also assuming you arent trying to add it to a personal fb profile page, among other things. Information here … according to overwhelming response works perfectly. Thanks to the author for sharing it.


  • Terence Richardson

    I’ve had this running for a while now and I’m liking the ability to track facebook traffic better. Great post, thanks!

  • I have installed an application on my page that offers a wisiwyg, its called iwiPageI followed what you suggested but it is not registering keeps saying “Tracking Not Installed (Last checked: Oct 10, 2010 8:23:24 PM )The Google Analytics tracking code has not been detected on your website’s home page. For Analytics to function, you or your web administrator must add the code to each page of your website. ”If you want to check the application I added go to help would be appreciated.thanks

  • dolma

    Hi, i followed the direction and added the img code on the top of my fbml tab page. its been about 2 hours and i am not seeing any result in the google analytic visits. I have went on the tab numerous times however the visit is still 0. Does it really take 24 hrs to get the results?… I need to figure it out for a client so im in a bit of a rush. Any feedback would be great! thank you….

  • excellent! i have done it and it is a valuable asset…definitely!

  • dolma

    ok… so is there any way to track the wall now? since facebook does not allow fbml boxes.?

  • Great article.

  • Has anyone tried using a analytics tool that isn’t Google Analytics? I want to track similiar information for a client but they dislike Google Analytics… any ideas??

  • Great article. Just a question – how does this get around the Facebook caching engine? I thought that when the tracking pixel was rewritten to the “” address it would stop the server from being hit every time a new user visited the page (the idea being that the pixel is saved on after the first request and then served from there)?

  • I use this for my facebook profile till now it’s not working I am waiting for that. Thanks for sharing a good resource for tracking the facebook visitors…

  • I use this for my facebook profile till now it’s not working I am waiting for that. Thanks for sharing a good resource for tracking the facebook visitors…

  • This is a great resource materials and thanks so much for putting it out there.
    Just implemented it on one of the fan pages I manage, looking forward to being able to track this aspect of online marketing I usually deploy for my clients.

    Thanks again. |

  • This is a great resource materials and thanks so much for putting it out there.
    Just implemented it on one of the fan pages I manage, looking forward to being able to track this aspect of online marketing I usually deploy for my clients.

    Thanks again. |

  • Hello Martin,

    I have also tried out
    Its also quite nice and for the business person who isn’t too techy, its alot easier on the eyes in comparison to Google Analytics but I still utilize Google Analytics because it gives me so much data.
    Hope this helped

  • Hello Martin,

    I have also tried out
    Its also quite nice and for the business person who isn’t too techy, its alot easier on the eyes in comparison to Google Analytics but I still utilize Google Analytics because it gives me so much data.
    Hope this helped

  • Balint

    Hi! Thanks for the guide, it seems to work, but I seem to have a problem. I only get 1-2 daily auto-visits from the Facebook server farm in Ashburn, VA; and my actual visitors are not tracked…I followed every step of your guide, so how could I solve the problem?

  • I can’t seem to find a way to do this either. It tracks the other pages like a charm but all of the main traffic is on the WALL POST page. Argh.

  • Anyone figure out a way to track the wall post page now that FB has removed boxes from being added to the wall?

  • Ireno_alcala1971

    I have my Google analytics on HubPages. I’ll just settle on it in the meantime. Thanks!

  • silktide

    I just saw a tutorial on another page ( that says adding google analytics to your page is even easier, and all you have to add is:

    Does this work better or worse than your example using the image?

  • David, thanks for sharing! I’m going to have to try this out.

  • lee

    Hi Amir,

    i have the same problem, all of the visits are only from USA

  • Pingback: 14 free tools to measure your social influence()

  • Pingback: Spice Up Your Fan Page | Certified Freelance()

  • George

    I’ve added the code and everything seems to work but the stats I’m getting in GA just don’t look right. e.g. All my visitors seem to come from the US, all traffic is apparently direct and the browser is facebookplatform? So, if I visit from the UK via my website, this doesn’t appear (or is being mis-interpreted by GA?) No other info is being given, any ideas why? Thanks.

  • is now tracking Google Analytics as part of your social tracking

  • Pingback: 2010, The year of social media? | The Attorney Marketing Blog()

  • Pingback: 5 Facebook Applications to Add Useful Tabs to Your Facebook Fan Page | Search Engine Journal()

  • Wow, this is excellent information. I know that FB already tracks some of the data but Google Analytics is so much more exhaustive with respect to tracking, organizing and understanding visitors. Very valuable information. Thanks for posting.

  • I’ve read that this particular tag only works for canvas pages -wich means, apps. For fan pages, they say it’s useless -and I could not make it work myself. Check the Facebook Developer-‘ description: Did you get any different results?

    My problem with the above solution is still about traffic sources and other demographic metrics, like location. Does anyone have a clue on what could be going on?

  • JWhiteford

    Very cool, thanks!!
    If I were to create an application myself that uses tabs can I add analytics to it?

  • Pingback: How To: Get Your Social Campaign Started « Always Engaged – Social Minds()

  • Pingback: A Guide to Utilizing Facebook for a Freelance Career | Bitmag()

  • Alan Lupatini

    Thsis way of tracking with Google Analytics doesn’t work! Use this way instead:

  • Hi there,

    I installed FBGAT on my server, got the code and put it in my fan page welcome tab. After two days though, Analytics keeps on telling me that tracking is not installed. And my tab has also the classic broken link icon at the bottom (as I put the code at the bottom of the staci FBML tab). So, 2 questions:

    1 – are your tracking codes working? How long did they take to you to begin to track?
    2 – is it possible to give to the img link.. a real image to load? If so, how?



  • Pingback: How to Market Your Business Through Your Facebook Fan Page | Blog()

  • Pingback: 5 Steps To Get the Most of Facebook Ads | she means business()

  • Wow I didn’t know you could even do this! Took me a little while but I got it, thanks so much!

  • LidiaDia

    I set these analytics up for several of the tabs I have on my facebook page. However, there is now way the numbers are correct. Tabs that have ads, have way more traffic and clicks than the google analytics are reporting. The unique visitors is always the same as the total visitors, which I know is not the case from my testing alone. Is anyone else having similar problems or questions?

  • yes I agree this is a very valuable resource…I can’t believe I didn’t find it earlier

  • Hi, I have the same problem. Did you solve it in the mean time? Thanks!!

  • Hi Lidia, I have the same problem as you and George – see one month ago more or less. Have you solved the problem?? Thanks!

  • Pingback: How to Market your Facebook FAN Page ‹ mlwdesign()

  • Tarnya

    How will the introduction of iframes and eventual removal of Static FBML effect the linking of Google Analystics to my facebook page?

  • health care for you

    Beautifully written blog post! Delighted I’m able to discover a webpage with some insight plus a very good way of writing. You keep publishing and I’m going to continue to keep reading.

  • i am struggling with that dilemma too…

  • Pingback: Facebook Fan Page Starter Checklist | Social Media Marketing Tips()

  • Hi Mariam,
    Good way to explain with images how to add Analytics code to FB fan page. Thanks.

  • I would also very much like to learn more about the impact of the latest changes. Is there a set of iframe instructions anywhere, please?

  • Does this still work with the new Facebook Pages layout?

  • Thanks for sharing Mariam. Very informative post.

  • me too. thanks for sharing this guide.

  • Pingback: How to Market Your Business Through Your Facebook Fan Page — Play Games On Facebook()

  • I have never heard of using such a thing in my facebook fan page. To be honest this is really a new thing to me. Surely want to know how many users visit my facebook page. Thanks for sharing.

  • Pingback: Measure the Effectiveness of Your Facebook Campaign | Online Rookes()

  • Pingback: 5 Facebook Insights Metrics to Track – And Why | WebProNews()

  • Pingback: 5 Facebook Insights Metrics to Track – And Why | Popular Events()

  • Hey, nice post. Thanks for sharing such valuable insights. It’s required for business running on face book fan page which part of the page is really liked by your fans or which is not.

  • Pingback: 5 Facebook Insights Metrics to Track – And Why | WebProNews | Facebook News – Social Media News – Facebook Info()

  • This is just what I am looking for!

    Thanks for this info and more power to your site! 🙂

  • Pingback: 5 Facebook Insights metrics to track–and why « Suzanne LaChapelle’s Weblog()

  • Thanks for information ..Nice post

  • mat

    Awesome post! Thank you very much for the useful information.

  • julievong

    I want to track non-fan pages such as my wall, posts, etc., but I haven’t been able to find instructions on how to do this. Facebook removed the “box” option that they used to have. Does anyone know of any alternatives?

  • Tim

    Just curious, but isn’t this against Facebook’s Terms of Service (ToS)?

  • SalmaNehme

    Get 10 fbml on your page work 100% and Static HTML: iframe tabs (All code )–>

  • BalticTechJunkie

    There is a new app called Campalyst out ( ) that integrates Facebook Fan Page and an existing Google Analytics account. That might be useful in some cases where you want to combine the two… 

  • khairil nizam

    yeah..mine also same..need help urgently!

  • Shweeta Shah

    Your Post is amazing. your information really helpful me. keep it up 

  • Pingback: 40 Tips for your Facebook Business Page | Restaurant | Burke()

  • Pingback: 5 Ways to Create Welcome Tab (Custom & Sub-tabs) for Facebook Page | DIGITAL STOP()

  • Pingback: 7 Steps to Increase Facebook Fans |

  • thanks for the info. Scouring the web trying to find a quality facebook analytics solution.

  • Seogroup11

    Jaipur – the capital of Rajasthan is color washed pink
    – the color associated with hospitality in Rajput culture. This
    Pink City of fairy tale palaces, rugged fortresses perched on barren
    hills and broad avenues is picturesque. The first planned city of
    its time, a formidable wall encircles Jaipur. Morning Drive past by
    Hawa Mahal, known popularly as the Palace of Winds, is a facade built
    for the Ladies of the Rajasthan Royal household in the 19th century. The Amber
    Fort, the capital of the erstwhile State of Jaipur until 1728 is
    perched on a hill. It has halls of Public and Private audience, a Sheela Mahal (hall 

  • Seogroup11

    Company Formation is a separate legal entity which is registered under the
    companies act. Every country is having different company registration
    procedure. In India companies are registered under Companies act 1956.
    Company formation is not at all an easy task. Company registration
    in India required certain procedure to be followed. New company
    registration is always advisable as it will legally benefit
    organization. Incorporation of Company is yet another important area of
    concern. We help you in the company registration in India. We
    provide information about Company Registration Services.

  • Sitebase

    Great piece of code! I’m using it also for some other profiles and it’s working like a charm.

  • Pingback: Making a Facebook Fan Web page |()

  • Do you have any idea, is this still working on Facebook after the last changes with iframe and so on? Or is it still working in FBML?

  • Hey! I didn’t know that we can add Google Analytic to Facebook fan page. I would like to try this.

  • Pingback: Using Facebook Metrics for Your Nightlife Venue | Business articles on marketing. Social media marketing, custom graphics and web design services in South Florida. Custom web application development. Flash website design.()

  • Pingback: How to Marketplace Your Company By Your Facebook Fan Web page | dailyTweet()

  • Pingback: Facebook Social Media Design Company | dailyTweet()

  • Mahek Shah

    does this still hold true after numerous changes introduced by Facebook? Is there any alternate way of tracking on facebook for custom tabs?

  • I always reference this article when I setup new accounts!!  Thanks for the great info 

  • Thank you for the update on August 26, 2010, Mariam.  I’ve been trying without any success to add Analytics to my Facebook wall and now I understand exactly why I’ve been struggling.

    Man, I can’t wait until this Facebook fad is over with or something comes along to knock it off its perch.

  • Pingback: Metrics and Facebook « Content Analytics – make your web content work harder()

  • Erik Westesen

    This is essentially the same setup used for email open rate analytics right?  It could be used for facebook or email open rates?

  • Great info. Facebook is definitely a powerful tool for marketing. The funny thing i find is, its really hard to get alot of likes and thus improve quickly, but it also dosent let you fall too far behind. as long as you have at least one thing there that’s useful to people, It will grow no matter what.

  • Pingback: How to Market Your Business Through Your Facebook Fan Page | facebook行銷臉書行銷研究室()

  • Pingback: How to Add Google Analytics to a Facebook Page Tab |

  • Pingback: Customizing facebook page « Designing()

  • Pingback: Ultimate Guide to Facebook Pages()

  • Pingback: Don’t ditch your website for Facebook | iNET Solutions Blog()

  • Thanks for the post Mariam. I am setting up a post for a corporate client’s FB and had no idea how to do integrate GA into it. I never thought to use a tracking url in the image. That’s sheer genius!

  • using GA to track the web traffic & generate the insights from your social network

  • That’s great resource, i did this successfully for one of my client’s page using static fbml 3 months ago, but now when static fbml is ousted and static iframe fbml is in use, that doesn’t seem to be working. I think static iframe fbml doesn’t support this method. What’s your sense about this?

  • Kristen

    Static FBML seems to not be running or is down.  Is there another way?

  • Serenitywellnessspa

    Can not find a static FBML app on Facebook.  Can anyone help.  Would like to put this code on My Business Page Timeline. Sarah

  • Pingback: Facebook Fan Page A-Z Link Directory « Emotional Sobriety: Becoming Friends & Lovers()

  • Chelsey

    FMBL is old news. If you already have tabs/pages you can add the code in. I had to create a static HTML page in pagemodo and just added the code in. Hopefully it works! 

  • Chelsey

    try static HTML

  • Pingback: Can Google Analytics be used to get info from a Facebook Fan Page? - Quora()

  • Thnks! never know i could setup analytics for fb page  as well..

  • Pingback: Can Google Analytics be used to get info from a Facebook Fan Page? - Quora()

  • Pingback: Facebook Ad Management- How to read those reports! | Social Media Coaching Center()

  • Pingback: Making a Facebook Fan Web page | Facebook Marketing Online()

  • Interesting… definitely will give a try…

    However – I landed up here looking to get detailed Facebook Likes and Shares data on per URL basis . . Facebook Insights is only showing popular pages, whereas I want to know for all possible URLs…

    Is there anyway I can get it without implementing the full API set on a website, may be a third-party or similar trick above?

    Thanks 🙂

  • Vinay

    Hiii I have followed  all above steps everything is was done but google analytics still shows that “tracking code is not installed in your page”  Sp how can I know if it is installed correctly or not..Does any one know

  • Pingback: Add Google analytics to your Facebook page : Social Media Help()

  • Eric Martin

    Do these Google Analytics methods still work on Facebook pages?

  • Arief Nurman

    Thank you so much for info. but when I in 3rd step, using ‘static FBML’ the display like normal fan page. so I confuse where I should place the code. Your suggestion please. Thank you

  • Seth

    Are there*

  • Awsome thanks for your work !

  • Thanks for info… I’m trying to track how many times a web link (to a page not operated by myself) is being clicked in the comment section of my posts. Can this be done?

  • Thanks for special this tip.i will make it

  • Xavier

    “Editor’s note added 8/26//2010: Since Facebook removed Boxes, tracking wall traffic is no longer an option” maybe you could make this visible at the beginning of the article ! 🙂 that was a big waste fo time…