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. Pingback: Top 3 Free Social Media Tracking and Monitoring Tools For Facebook, Twitter, Linkedin, Youtube, Bit.ly and more...

  2. Kshitij said on :

    Please tell me how to add this code to the fan page.

  3. Neil said on :

    Great stuff! Implementing right now.

  4. Survey Tool said on :

    hi,

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

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

  6. thuongdd said on :

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

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

  8. Patagonia said on :

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

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

  10. Facebook üzleti oldal said on :

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

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

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

  13. Bliss said on :

    thank u very much,I spend time finding this information

  14. Ramesh sirvi said on :

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

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

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

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

  18. lora said on :

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

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

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

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

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

  23. Xizo said on :

    Hi,
    Does your method work with iFrame Facebook Tabs ?

    Thx for your answer 🙂

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

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

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

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

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

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

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

  31. casinos said on :

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

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

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

    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

  34. usb fan said on :

    Interesting, Thanks!!!

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

  36. Pingback: Google Analytics for Facebook Impossible Right?

  37. Kirk said on :

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

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

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

  40. Noclegi said on :

    Thanks for sharing this info 🙂

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

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

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

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

  45. Ervin Kraling said on :

    Good editorial. Sustain up the first rate work.

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

  47. Pingback: 2.2 | Diseño Social

  48. Pingback: facebook | Pearltrees

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

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

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

  51. Pingback: 90:10 Group

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

  53. Pingback: Business Online

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

  55. Pingback: Google Analytics on your Facebook fan page | Masters Allen News

  56. PrimeOBG said on :

    How to connect Google Analytic to Google Plus

  57. murat said on :

    Facebook Fan pages is that you can only run limited

  58. Quiney said on :

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

Comments are closed.