Google Analytics for Facebook Fan Pages

We launched our Facebook fan page earlier this month and as with all Facebook pages only Facebook Insights program is available to page administrators. Facebook Insights shows demographic details and interactions on your pages BUT limited to show information of fans only. It is far less sophisticated and comprehensive when compared to the free Google Analytics. One of the limitations of Facebook Fan pages is that you can only run limited Javascript on it and Google Analytics needs Javascript code included to correctly track visitors. We have successfully managed to get ALL functions of Google Analytics working on our Facebook fan page (including visitor statistics, traffic sources, visitor country, keyword searches with all other powerful reporting & maps overlays etc).

Google Analytics Example

How to setup Google Analytics on your Facebook fan pages

The workaround we use in our code is to include Google Analytics as an image instead of setting the standard Javascript. This method tracks every visitor to the custom facebook pages on Google Analytics. It required a combination of server side cookie management and an additional <img> tag to the bottom of the facebook fan page. Here are the steps to get Google Analytics working on your facebook fan page.

1) Setup Google Analytics account. If you already have one, create a new website profile. You can name it facebook.com or facebook.com/your_page_name. You will finally get your tracking code which looks like this UA-3123123-2
2) Create your custom img tag for each of your pages you like to track. EG: contact form, services, products etc. You can use our tool to create the Google Analytics link generator for Facebook pages.
3) Add the entire custom image html tag from step 2 to the bottom of each Facebook fan page that you need to track.

That is all there is to it! Google Analytics is not real-time, so you will need to give it some time. Approximately a day before you see the fruits of your “hard” work.

For advanced users

Use this method, if you don’t want to use our hosted link redirection as mentioned in the method above. You can download the entire source code which is just about three files to get this setup working on your own server (running PHP4.3 or above). The code is written in PHP and essentially creates the Google image tracking URL with the referrer, page information, ID, etc. The additional advantage of hosting this on your own server and domain is that visits from your website to your facebook fan page gets tracked, etc. You will also be able to customise further if you wish. Please do share any useful updates you apply to the tracking link code.

Facebook – Google Analytics Tracker v1.1 (Updated 21st Feb, 2010).  For advanced method – Download this code to use on your server.

If you don’t have a Facebook fan page yet, visit our tutorial for code and help on creating customised Facebook fan pages.

PS: We could not find any other source / blog that described how to get Google Analytics on Facebook fan pages! There is support for canvas pages and applications but nothing for StaticFBML fan pages. Hope this helps and please leave your comments below.

UPDATE:
1) A lot of users have asked how to track visits to the wall. Yes, this can be done. Please see the comments by iphp below.
2) Here is a screenshot to a staticFBML where the code should be placed
3) We have managed to set up funnels, goals and segments to separate fan and non fan activity.
4) Video: Here is a link to the Webdigi youtube channel check our favourites to get step by step walkthrough!
5) This blog and comments cover all aspects of setting up Google Analytics. If you still want help, we are available to offer paid support and installation of Analytics for your page. Please contact us here.

Also read...

Comments

  1. Neil said on :

    Great stuff! Implementing right now.

  2. Survey Tool said on :

    hi,

    I read Complete article, this article very antic and interesting.
    i like it..
    thank for sharing experience.

  3. Pingback: iFrames for Facebook Part 2: How to Track

  4. thuongdd said on :

    How to add code google analytics to Facebook fanpage user tab Iframe. Not user static FBML

  5. Pingback: Kerry Rego Consulting | Must Know Facebook Tips

  6. Patagonia said on :

    Good article, Im not a code ninja but I get de meaning of your post, is simple.

  7. Pingback: Facebook dépasse Google. So what? Devriez-vous arrêter le référencement sur Google? | Orénoque Interactif

  8. Facebook üzleti oldal said on :

    Thanks, I have been looking for a good tracking method, like Google analytics!

  9. Pingback: Google Analytics al teu Facebook | Lludriga blog

  10. Pingback: MediaEngage Blog » National Center for Media Engagement » Community Engagement & Social Media for Public Media

  11. Bliss said on :

    thank u very much,I spend time finding this information

  12. Ramesh sirvi said on :

    am amazing!didn”t know we can use google analytics fan page! Now I will try to use it !

  13. Pingback: Google Analytics for Facebook Pages | Scott Bratcher

  14. Ha Mai said on :

    Many thanks for the interesting and useful article. I like it much.

    One of my concern is that how to track wall page now because Facebook doesn’t support box and Static FBML anymore?

    Thanks again.

  15. Pingback: Facebook Fan Page Showcases and learning Resources - Wordpress Arena

  16. lora said on :

    I pasted the code in to my facebook page. But I still get a notice saying “Tracking Not Installed”. Please help.

  17. Pingback: Designing A Facebook Fan Page: Showcases, Tutorials, Resources | Tips4Designer

  18. kamera sistemleri said on :

    If Im not mistaken there are more than 700 000 people on this great ball we are living on. There is always a reason why the rest dont have a FB Profile. Many because they dont have access to an internet connection.

    I believe that Google’s users will come from this source, a new generation as well as some who find Google+ to be more suitable for their needs.

    I’ll stay with FB for now and be a happy tester for Google+.

    Let’s see…

  19. Adam said on :

    Hey,

    First off great job! Very sick tool….I’ve already successfully used it on an FBML page…however, I thought I’d I’d play around with it on a reveal tab. Everything is set up as it should be (img file is embedded on the nonfan.php to display for users who visit the page and haven’t yet liked it). However, google is locating it? Any suggestions?

  20. baidu said on :

    Wow, Great feedback and comments which are much appreciated on my part. I hope you continue to enjoy my future posts and let me know it you want to engage in an interactive online blog?

  21. Xizo said on :

    Hi,
    Does your method work with iFrame Facebook Tabs ?

    Thx for your answer :)

  22. Pingback: How To Get Google To Track Your Facebook Pages Useage | Success On The Fly Marketing.com

  23. Pingback: Should my business set up a Facebook page? | FB XTab

  24. junk removal lancaster said on :

    Whats up! I just wish to give a huge thumbs up for the great information you have here on this post. I might be coming again to your blog soon.

  25. Joaquina Violet said on :

    Heya i am for the primary time here. I came across this board and I in finding It truly helpful & it helped me out much. I’m hoping to give something again and aid others such as you helped me.

  26. Pingback: SEO and Social Media News 2nd May 2010 | The Latest in SEO and Social Media News | HelpfulGuy.com

  27. Adam said on :

    So how do you add it to the Facebook Wall? You can’t add it under About or General Information, so where would it go?

  28. web design doncaster said on :

    Magnificent site. A lot of useful info here. I’m sending it to some friends ans also sharing in delicious. And obviously, thanks for your sweat!

  29. casinos said on :

    I will recommend this article to my friends. This is a must read!

  30. fitz said on :

    hi.. i’ve followed the steps
    1. generate google analytics image code
    2. paste the img code to below my static fbml page
    3. went back to google analytics next day.. it is showing clicks

    This is the page where i installed the code facebook.com/pages/FitzforLife/168769133152483?v=app_4949752878

    Tnx.

  31. Steve said on :

    Hi, for those of you wondering how to add the FBML static page – use this link below as the FBML application is no longer listed in apps that can be added within facebook. Using the link allows you to add the FMBL Static page :-D

    facebook.com/add.php?api_key=fdfd01c9df7d644a68a4e989ae861e44&pages=1&page=102938863123295

    Also, my attempt to get this to work has failed. I’ve tried a few variations, but none seem to work, could this be due to the new facebook layout?
    I’d appreciate an answer to this, so I stop wasting my time if this tracking no longer works.

    Thanks

  32. usb fan said on :

    Interesting, Thanks!!!

  33. Pingback: Fb Maxed Facebook Fan Page That Will Get Your Business Noticed

  34. Pingback: Google Analytics for Facebook Impossible Right?

  35. Kirk said on :

    FBML will not support after Jan 1, 2012, so what’s the new way to track Facebook with Google Analytics?

  36. facebook secret said on :

    We are a gaggle of volunteers and opening a brand new scheme in our community. Your site offered us with helpful information to paintings on. You have done an impressive task and our whole community can be grateful to you.

  37. Amelia Atkin said on :

    I feel this is one of the most vital info for me. And i’m happy reading your article. But want to commentary on some common issues, The site taste is wonderful, the articles is actually nice : D. Just right activity, cheers

  38. Noclegi said on :

    Thanks for sharing this info :)

  39. Different Ways to Tie a Tie said on :

    It’s the best time to make some plans for the future and it’s time to be happy. I’ve read this post and if I could I want to suggest you few interesting things or tips. Perhaps you could write next articles referring to this article. I desire to read more things about it!

  40. Pingback: Fanpage Customization Secrets – Custom tabs and Applications | Social Media, SEO & Web Analytics Updates

  41. Alexia Huckabee said on :

    An fascinating dialogue is worth comment. I believe that it’s best to write more on this topic, it might not be a taboo subject but typically individuals are not sufficient to talk on such topics. To the next. Cheers

  42. Pingback: Facebook Fan Pages para se inspirar | IFDBlog

  43. Ervin Kraling said on :

    Good editorial. Sustain up the first rate work.

  44. Marc said on :

    Hi, Just Creating myself a page… everything here looks simple enough and I’m just waiting for the Tracking Status to update (tomorrow now I guess). However what kind of stats will I be expecting to see? I’m figuring Just actual hard figures?

    And certainly not Actual Users Names, or IP’s…. Hope not anyhow.??? Anyone???

  45. Pingback: 2.2 | Diseño Social

  46. Pingback: facebook | Pearltrees

  47. Växter på nätet said on :

    Excellent!! Thank you so much for this elegant solution for tracking pages on Facebook!

  48. seo said on :

    I am really loving the theme/design of your weblog. Do you ever run into any internet browser compatibility issues? A number of my blog visitors have complained about my blog not operating correctly in Explorer but looks great in Chrome. Do you have any recommendations to help fix this problem?

  49. Pingback: 90:10 Group

  50. Pingback: AboutFace Media | Facebook Pages: Seeing Beyond The Numbers

  51. Pingback: Business Online

  52. Danielle said on :

    For you all this must be peace of cake. But for me as a newbie step 2 and 3 doesn’t make sence.
    2) Create your custom img tag for each of your pages you like to track. EG: contact form, services, products etc. You can use our tool to create the Google Analytics link generator for Facebook pages.

    How does this img tag has to look like? What does it consist of (well of course the tracking code, but this one I have)

    3) Add the entire custom image html tag from step 2 to the bottom of each Facebook fan page that you need to track.

    Add it to the bottom of each fan page?? How do I do that? With fmbl, but isn’t there a walk through anyone can give me?

    Really need some extra screenshots to know exactly what to do and where.

  53. PrimeOBG said on :

    How to connect Google Analytic to Google Plus

  54. murat said on :

    Facebook Fan pages is that you can only run limited

  55. Quiney said on :

    Thanks for sharing. I have been waiting for a proper replacement to Facebook insights for ages.

Comments are closed.