Professional Community for Car Dealers, Marketing, Advertising and Sales Leaders
How to setup Google Analytics on your Facebook fan pages
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.
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
If you use the advanced option of hosting the code by yourself, you will be able to track visits from your website to your fan page and back. Also preserving the original referrer to your website, etc. It might also be better than relying on our servers.
On our Google Analytics we are able to see which device was used (Iphone, Android, Firefox, etc). We are able to see the location, track usage with cookies, time on pages, track visits after some time, etc. This complements Facebook Insights well. Also note that the page created using StaticFBML is static and the URL cannot be changed all the time. Let me know if you have any ideas and please do share code improvements that you make. [...] server, you can download the PHP source and host it yourself (PHP 4.3 required). Please refer to Webdigi for more information.Just like Facebook Insights, Google Analytics doesn’t provide real-time [...]
Please read the our previous article on creating custom Facebook pages. You can then put your codes there.
Thanks! All you need is patience now. It sounds like you have done everything correctly. Google Analytics is not real time as mentioned in the post. If you come back tomorrow you should see your graphs work and you will also see “not installed” message disappear.
For those who want to test out Google Analytics, please put a link to your fanpage here you might get more visits to show up on Analytics. But please note, you have to wait for Google in any case.
Facebook fan pages request end browsers to display the image directly and are not cached by Facebook.
Theoretically, you should be able to use this anywhere. Facebook, myspace, etc if they allow you to place img tag and if the actual user browser is loading the image.
As the article points out, make sure you select create a new profile for a new website / domain in Google Analytics. If you don’t create a new profile code or exclude this data with filters from your existing profiles, the facebook GA data will come along with all your visitor / session / traffic sources data in your existing profiles… technical reason is cookies won’t align.
You can definitely track visits on your Facebook page Wall as well. You will have to create a new static FBML box and place the img tag html code in it. To see this in action, Go to our fan page wall, you will see a box on the lower left called Articles which has a Google Analytics tracking code.
After you create your new StaticFBML, go back to edit your fan page. Under Application Settings for the entry you created, you can remove tab and add a box. Once a box is added it will be displayed under the Boxes section. All you have to do is to click on the little edit icon and select “Move to Wall”.
Doing the above will place your tracking code into the wall page and you will be able to track users on your fan page wall! Its easier than I made it look. Give it a go!
Don’t worry about the longer string. The strings generated for google analytics are just to help you track which pages are being visited. Give google analytics some more time also try this trick if you have not already.
For those who can’t wait for 24 hours but have waited for more than 10 hours, you might see new stats pour in. On the dashboard you can change the date range by clicking on the down arrow.