Google Analytics for Facebook Fan Pages

Posted by iphp on Feb 22, 2010 in Facebook, PHP, Project |

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

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

Tags: , ,

212 Comments

David
Feb 22, 2010 at 5:34 pm

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


 
Hosea
Feb 22, 2010 at 6:18 pm

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!


 
Matthew Forr
Feb 22, 2010 at 6:50 pm

Well done, I’ll have to give this a try.


 
Oliver
Feb 22, 2010 at 7:17 pm

Awesome, just downloaded and setup on the server and it looks ok so far. Waiting for google analytics to update.


 
Grace
Feb 22, 2010 at 8:07 pm

Sounds great. @Oliver How did you setup on your server? Any particular advantages of hosting it by yourself?


 
Google Analytics for Fan Pages? :: Moko Marketing :: Facebook Marketing Agency
Feb 22, 2010 at 8:57 pm

[...] In this post, Webdigi details a way to add Google Analytics to your Facebook Pages. For anyone that has used Facebook Insights, the default Analytics Engine for Page, any type of additional Analytics is welcome. [...]


 
Christians dagbok – 2010-02-22 | En sur karamell
Feb 22, 2010 at 9:06 pm

[...] Shared Google Analytics for Facebook Pages. [...]


 
» Google Analytics for Facebook Fan Pages – PHP, Web and IT stuff - gltss.org
Feb 22, 2010 at 9:48 pm

[...] » Google Analytics for Facebook Fan Pages – PHP, Web and IT stuff via webdigi.co.uk [...]


 
Usare Google Analytics con le Fan Pages di Facebook | maxzaglio.com
Feb 22, 2010 at 10:16 pm

[...] Google Analytics for Facebook Fan Pages Tags: Facebook, Facebook Insights, Google Analytics Share this post! Twitter Digg Facebook Delicious StumbleUpon Google Bookmarks LinkedIn Technorati Favorites [...]


 
Patrick
Feb 22, 2010 at 10:40 pm

Hi Guys,

Nice work here. A few questions though. On Facebook images called up from within a Fanpage Tab view are cached by Facebook. So without some sort of cache breaker (a time on the image src url will do it) your image is only going to be called the first time. No big problem there.

The real problem is that it’s not technically the end user who is loading your image. So you’re not getting any real data about that user including their browser settings etc. Nor could you do any type of cookie management during the image load.

It doesn’t look like this solves the latter problem. I’ve been through the code and don’t see anything that would seem to take care of it. Am I missing something? Am I making bad assumptions?


 
» Google Analytics for Facebook Fan Pages – PHP, Web and IT stuff
Feb 23, 2010 at 6:58 am

[...] more: » Google Analytics for Facebook Fan Pages – PHP, Web and IT stuff Posted in Web | Tags: analytics, facebook, google, pages-, php, usare, usare-google, [...]


 
iphp - Author
Feb 23, 2010 at 9:16 am

@Grace, @Oliver 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.

@Patrick Also, to clarify, the images generated from the server is loaded by the actual user and not Facebook. Also static FBML cannot be changed for time, etc easily as Javascript onload is blocked

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.


 
Flow » Blog Archive » Daily Digest for February 23rd - The zeitgeist daily
Feb 23, 2010 at 9:47 am

[...] Shared Google Analytics for Facebook Pages. [...]


 
Adido
Feb 23, 2010 at 12:57 pm

Wow! This is excellent stuff! Thanks for sharing!


 
Nikki Rae
Feb 23, 2010 at 2:04 pm

This sounds great. Well done. Got a client or two in mind already!
Thanks
Nikki Rae


 
John
Feb 23, 2010 at 2:23 pm

[...] PHP, Web and IT stuff » Blog Archive » Google Analytics for Facebook Fan Pages [...]


 
Jim
Feb 23, 2010 at 3:14 pm

I bookmarked this blog. Thanks heaps for this!


 
Google Analytics for Facebook Pages
Feb 23, 2010 at 3:34 pm

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


 
Marta
Feb 23, 2010 at 4:30 pm

Very interesting, Thanks for the information!!


 
Car
Feb 23, 2010 at 5:23 pm

Probably an elementary question, but “Add the entire custom image html tag from step 2 to the bottom of each Facebook fan page” — where exactly do I put the html tag? Thank you!


 
Omar
Feb 23, 2010 at 5:29 pm

Great article, but I am not sure I understand where I am supposed to place the code. For example, lets say I want to track the wall on my fan page…where would I place this code? There is no way to access the HTML of your wall on facebook…


 
Phoenix2life
Feb 23, 2010 at 5:48 pm

Awesome post. Thanks for sharing these knowledge bits.

Some newbie questions. I have completed two steps. First created google analytics account for Facebook Fan page and received google analytics code. Second generated Image from the UI you have shared. After that I have added FBML box to my facebook fan page and have copied the image code generated. When I have checked status from Google Analytics, I am getting tracking code is not installed message. Would you please help me on this ?


 
iphp
Feb 23, 2010 at 5:57 pm

@Car, @Omar Please read the our previous article on creating custom Facebook pages. You can then put your codes there.

@Phoenix2life, 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.


 
The Ultimate Facebook Page Resource Page
Feb 23, 2010 at 7:14 pm

[...] Sometimes I just love the Internet a bit to much. I have been trying for quite some time to run Google Analytics on Facebook but I haven’t been able to get my hack fully working and thus no post has been written about it from me. Well, in this case I received an e-mail with a post that Christian Rudolf had found with a solution to my problem. [...]


 
News Alert » Blog Archive » » Google Analytics for Facebook Fan Pages – PHP, Web and IT stuff
Feb 23, 2010 at 7:41 pm

[...] more here: » Google Analytics for Facebook Fan Pages – PHP, Web and IT stuff Tags: analytics, code, custom, every-visitor, facebook-pages, image-instead, method, method-tracks, [...]


 
Láďa Durchánek
Feb 23, 2010 at 7:57 pm

This is awesome, maybe it will work even for profile pages if you use it in some Static FBML box. But another important question – Facebook does not cache this image?


 
Google Analytics per le pagine Fan su Facebook
Feb 23, 2010 at 8:02 pm

[...] Qualcuno ha però pensato di cercare un modo per utilizzare Google Analytics anche per monitorare il traffico della propria pagina fan su Facebook. [...]


 
Bill
Feb 23, 2010 at 11:07 pm

Thanks, articles like this help me remember to work on FB, which I tend to ignore as just an add in. Thanks,


 
Le migliori applicazioni per Facebook Fan Page | My Social Web
Feb 23, 2010 at 11:10 pm

[...] appena appreso dal blog di Tiziano Fogliata possa essere davvero utile. L’idea è arrivata da WebDigi.co e permette di monitorare i numeri della propria Facebook Fan Page con gli strumenti di Google [...]


 
Jim Goldstein
Feb 24, 2010 at 12:12 am

Thanks for this great info. Very helpful!


 
uigher
Feb 24, 2010 at 12:29 am

Does this work on forums (in signatures for specific pages) and other SNS like myspace etc. I tried in in myspace but it didn’t work but maybe I botched something.


 
» Google Analytics for Facebook Fan Pages – PHP, Web and IT stuff | Drakz Free Online Service
Feb 24, 2010 at 12:55 am

[...] this article: » Google Analytics for Facebook Fan Pages – PHP, Web and IT stuff Share and [...]


 
Jay Baer
Feb 24, 2010 at 4:11 am

Thanks so much for putting this out there. Hugely helpful. You made my day. I just tweeted it up big-time.

Cheers,
j


 
2/24/2010 Update « Go Code
Feb 24, 2010 at 6:28 am

[...] Google Analytics for Facebook Fan Pages – PHP, Web and IT stuff [...]


 
Bill Kilner
Feb 24, 2010 at 7:30 am

What an interesting method. Thanks for this, I really appreciate what you have done here. Keep it up, and I will be back for more. Bill Kilner


 
Mary
Feb 24, 2010 at 7:35 am

This is a really valuable info. Keep up the good work. Mary Jo


 
iphp
Feb 24, 2010 at 8:46 am

@Jay Baer, Thanks for sharing!

@Durchánek, Facebook fan pages request end browsers to display the image directly and are not cached by Facebook.

@Uigher, 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.


 
Andy Adido
Feb 24, 2010 at 9:19 am

Had a play with it now. I’ve done everything that you’ve highlighted but am I right in thinking that due to having to use FBML you can only track the pages that you build yourself? How do you view who looks you at your wall/3rd party boxes which are put onto your FB page?

Please let me know if I’ve missed something!


 
Pi Blog» Blog Archive » Facebook Fan Pages Get Google Analytics
Feb 24, 2010 at 11:04 am

[...] users can click here to try a different [...]


 
Analytics sulle fan page di Facebook? no. si. dipende • Google Analytics in 30 secondi
Feb 24, 2010 at 11:11 am

[...] che usiamo normalmente. Senza dilungarmi troppo vi segnalo il post di Tiziano Fogliata e il post originale degli autori, dove è anche possibile scaricare il tutto e ospitarlo sui propri server per avere ulteriori [...]


 
rudi
Feb 24, 2010 at 12:13 pm

@ iphp is it also possible to make a distinction between males & females in the google analytics for Facebook?


 
php-manual
Feb 24, 2010 at 2:24 pm

@rudi, yes this is why you would use facebook insights along with Google analytics. You can have the best of both worlds.


 
Shailendra Dubey
Feb 24, 2010 at 4:26 pm

The post is very interesting, i would like to implement it.


 
Alex Becker
Feb 24, 2010 at 6:24 pm

Excellent post. I was speaking on a panel last night about Google Analytics and a question came up about this exact topic…really great post here. Retweeted @aybecker


 
New Orleans Web Design
Feb 24, 2010 at 6:31 pm

Where, exactly, do you paste the image code? Did the recent Facebook redesign change this procedure?


 
MLO
Feb 24, 2010 at 6:42 pm

Does anyone know where you paste your google analytics code on facebook? Where do you do this? What part of the page can this code be posted to?

Thanks for the help!


 
Mike Plummer
Feb 24, 2010 at 8:09 pm

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


 
How to Use Google Analytics on Your Facebook Fan Page | Search Engine Journal
Feb 24, 2010 at 8:25 pm

[...] the How To Post at Google Analytics for Facebook Fan Pages [...]


 
Manoj
Feb 24, 2010 at 9:04 pm

Can this work with Facebook Groups?


 
chris faron
Feb 24, 2010 at 11:43 pm

Great idea was looking for a way to track non javascript browsers like some smart phones, if I use it on the same domain can i just create a new profile/existing domain?


 
GSEO
Feb 25, 2010 at 1:35 am

It is certainly amazing that this is now possible!


 
¿Cómo poner Google Analytics en tu página de fans en Facebook? | Jorje Rojas
Feb 25, 2010 at 2:13 am

[...] leerlo en Webdigi, espero les interese y comenten como les va. Tags: Facebook, Google, google analytics, Páginas [...]


 
Jake
Feb 25, 2010 at 2:39 am

Excuse my ignorance, but new to this and trying to get set up for my emplyer business page – how do I “Add the entire custom image html tag from step 2 to the bottom of each Facebook fan page that you need to track”?? Thanks


 
Adam Smith
Feb 25, 2010 at 5:14 am

Nice job i have tried it for my blog fan pages, it work really easy.


 
Sandra
Feb 25, 2010 at 6:15 am

Thanks for this great information – will try to install immediately.


 
iphp
Feb 25, 2010 at 9:16 am

@Jake, @MLO
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!


 
Astrid
Feb 25, 2010 at 11:56 am

Genious! I didn’t know what a static FBML page was until now *blush*, but it is so simple! Thanks a bunch guys!


 
Cecelia
Feb 25, 2010 at 2:01 pm

Haven’t worked much with Facebook fan pages (and even less with FBML) but I’ll have to give this a try. Thanks!


 
The Missing Google Analytics Manual
Feb 25, 2010 at 2:04 pm

[...] Tracking Email with Google Analytics Google Analytics for Facebook Fan Pages [...]


 
Paul
Feb 25, 2010 at 2:04 pm

Hey, I’m having problems understand this: “3) Add the entire custom image html tag from step 2 to the bottom of each Facebook fan page that you need to track.”

Where and How do I have to paste the generated code?


 
Andrea
Feb 25, 2010 at 3:23 pm

Any additional help on installing the files on our own server? Tried it and it generates code, however the image is broken?

Thanks!


 
Andrew
Feb 25, 2010 at 4:54 pm

Thanks for this awesome tip! I must admit, I’m stumped as to why it isn’t working for us. I set up a new profile in Google Analytics, created the box and published it on our wall with the img tag from your generator. What could I be missing?

facebook.com/Vmeals


 
Jeff Woodruff
Feb 25, 2010 at 7:32 pm

Great article. I have wanted to add analytics to a few fan pages I administer for some time but didn’t know it was possible. Thanks!


 
Eduardo
Feb 25, 2010 at 7:45 pm

Got it up and running on the wall of a facebook fan page. I assume that since the tracking is done indirectly, the “status” on google.com/analytics/settings/home should show “tracking installed”, correct iphp?


 
Jake
Feb 25, 2010 at 7:54 pm

@iphp cheers, many thanks. great blog


 
Meredith
Feb 25, 2010 at 8:13 pm

Hi there. We are very excited to see this. We added Analytics to our page however after 14 hours we haven’t seen anything show in the Analytics. We think there may be some issue over the page name – for instance, you listed “Contact_Page”, however each of our static FBML pages have a much longer string attached. ie, our Landing Page’s string after the facebook.com is /videosocialmarketing?v=app_4949752878&ref=ts. Is this the string we add to your form? Thanks so much


 
Mehdi
Feb 25, 2010 at 8:17 pm

Thanks for this helpful post.

I’ve integrated the tracking code within 2 tabs and the wall, it’s working fine.

But…the tracking code doesn’t seem to load every time we click on a tab. WASP is confirming this assumption. I’m on the Services tab then I click on the Contact tab but WASP keeps capturing the Services tab as a pageview.

Can you tell me if I’m right?


 
How to Set Up Google Analytics for Facebook Pages | TechPetals
Feb 25, 2010 at 8:20 pm

[...] great trick was discovered by WebDigi. submit_url = [...]


 
Mehdi
Feb 25, 2010 at 8:37 pm

Actually, the tracking code placed on the Wall tab is always loaded, even if we are on the Service tab.


 
Chester Bullock
Feb 25, 2010 at 8:58 pm

I have installed this on my server, followed the steps and added a box via Static FBML to my Wall page. But now I also have a tab on my page for the same as the box. I’d like to remove that.

Actually, what might be most helpful, would be a separate entry outlining how to get this to track your Wall visits. I think i did it right, but the procedure still feels vague (ie, I don’t know what to put into the Page Link variable, and I am not sure that I used the right thing in the Domain on Analytics var – I used facebook.com/chesterbullockphotography, which is what I entered into GA).

Can a few people go to my page so I can see in a few hours if it is working right?

facebook.com/chesterbullockphotography

Thank you.


 
Chester Bullock
Feb 25, 2010 at 8:59 pm

Oh, and I should have said a big Thank You for putting this out there and letting us know it is possible.


 
iphp
Feb 25, 2010 at 9:00 pm

@Meredith, 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.

@Astrid, @Jeff, thanks and you are welcome.

@Eduardo, yes you will have to wait a while before this goes away.

@Andrea, If you want to make sure that the code you generated is correct. Just copy and paste the code within (quotes) ‘ ‘ after src= and put it on your browser. You should be redirected to google analytics and you will get a blank screen (because google image is a 1*1 pixel size. This is correct and not broken. Make sure you enter your Analytics code correctly.

I have appended this article (updates at footer) with an image showing where the code should be placed.


 
Donna Hoffman
Feb 25, 2010 at 9:25 pm

Thank you for the insight, I will check it our further


 
keyur
Feb 25, 2010 at 11:15 pm

hi,

how do you get the proper url for your facebook fanpage.. my fan page’s url is very different…


 
Josh Premuda
Feb 25, 2010 at 11:51 pm

Just tried it. Would love if some of you click this link to see if I get any tracking info tomorrow (I did this on a test page). Thanks!

facebook.com/pages/currentblend/314074708131?v=box_3#!/pages/currentblend/314074708131


 
Christer Hillorn
Feb 25, 2010 at 11:52 pm

Lovely! Thanx for sharing and insightful comments


 
Dmitry
Feb 26, 2010 at 6:04 am

Yes, the information good. Perfectly


 
Creative Ideas
Feb 26, 2010 at 8:00 am

Really useful and fresh info. Thanks!


 
Andreas Sefzig
Feb 26, 2010 at 8:09 am

Great article, thanks! Using iframes (this is possible in Static FBML pages via js-strings, regardless of what the documentation says) one should be able to integrate an elaborate click-tracking as well.


 
Arnold
Feb 26, 2010 at 8:32 am

Hey, great article. Tried it out.. Hopefully I did it right. Here’s my fan page link to to test.

facebook.com/pages/San-Mateo-CA/Beard-Papa-San-Mateo-CA/192542081720#!/pages/San-Mateo-CA/Beard-Papa-San-Mateo-CA/192542081720?v=wall


 
Francois
Feb 26, 2010 at 8:42 am

Excellent


 
Twilight fairy
Feb 26, 2010 at 12:19 pm

seems like a great way to get analytics! will try it out for sure.. FB insight is hardly any use


 
Reiner
Feb 26, 2010 at 4:55 pm

Thank you for this HowTo! It’s delicious!


 
Chris Brashear
Feb 26, 2010 at 5:15 pm

Amazing. Code implemented as directed and capturing data 15 hours later! Great work guys!

@chrisbrashear


 
Sourav Sharma
Feb 26, 2010 at 9:15 pm

Will love to try and see how it goes..


 
Kati
Feb 26, 2010 at 10:36 pm

This is great info, thanks! Do you know if the Analytics click tracker will work, even though javascript is not enabled? google.com/support/googleanalytics/bin/answer.py?hl=en&answer=55527


 
K Cortez
Feb 26, 2010 at 10:45 pm

I placed this on a fairly high traffic FB page. Grace Potter and the Nocturnals (hot band you should definitely check out).

facebook.com/GracePotter

It’s on the wall and the “non yet a fan” landing page


 
kmp.
Feb 27, 2010 at 12:03 am

just installed here. thanks for making this possible!!

facebook.com/pages/Vivo-Girls-Sports/191965328828


 
Tim Ware
Feb 27, 2010 at 12:19 am

Great post, and thanks. I’m not getting GA to see that the tracking is installed. I pasted the code at the very bottom of the Static FBML page.

In GA, I set the “Website URL” to http : / / www . facebook . com

Where I’m confused is how to direct GA to the Static FBML tab page, the URL of which is “http://www.facebook.com/HYPERARTS?v=app_7146470109″

Should the “Default page” setting in GA be the full URL? I’m definitely missing something!


 
PaGo Marketing
Feb 27, 2010 at 1:26 am

Thank you so much for posting this, great idea!


 
coreytess
Feb 27, 2010 at 6:54 am

OMG! Love it! But why is there a slice of lemon in your latte at the top of this page, that would taste so nasty! Anyway, I will add tracking to my FB page tomorrow using this.. how awesome!


 
iphp
Feb 27, 2010 at 7:45 am

Thanks for the positive comments.
@Chris, @Cortez thanks for sharing with us that your tracking is working. It should encourage more folks to wait if they have setup things correctly.
@Keyur, to get a custom URL, you will need about 25 fans or more.
@Andreas, we think Facebook is going to get rid of iFrames in staticFBML at the end of the month. We wouldn’t be able to do what you are thinking of anyway as an iframe will not have access to the rest of the comments.
@Kati, Good thinking but it wouldn’t work as the script is complicated on Google Analytics. We will have to re-write the JS to FBJS.
@Tim Ware, We definitely learned a thing or two from your blog posts on HyperArts. Keep up the great work! I had a look at your fan page. It looks the server is returning the results correctly. Please give Google Analytics some time to show you the latest visits.
@coreytess, Try it :)


 
Andreas Sefzig
Feb 27, 2010 at 11:36 am

@iphp: Of course one cannot grab the users information dynamically, but at least you can track certain clicks this way. Tried it yesterday, works a charm. Why is it you think facebook will get rid of iframes in SF? I come to the same conclusion (which is why I did not sell this to clients yet), still my opinion/fear is not based on facts but the thought that the js-strings-technique is an exploit… Any elaboration of yours on this extremely interesting issue would be great!

Thanks :) P.S. Great blog!


 
Jesse James
Feb 27, 2010 at 12:45 pm

Such a simple yet powerful suggestion. Thank you very much for posting it.


 
Patti Fousek
Feb 27, 2010 at 3:54 pm

Great workaround! It’s a shame Facebook Insights lack so many features that marketers really need to track. I’m going to give your tip a try.


 
Naomi
Feb 27, 2010 at 5:15 pm

Oh wow! This is awesome! Thanks for providing this valuable resource! I’m viewing my Facebook fan page stats now. Lots of peeps on Facebook Friday nites! :)


 
Tim Ware
Feb 27, 2010 at 8:08 pm

@iphp Thanks for the kind words! And, btw, the GA is working now. I had to log off and then back on to see what was *really* happening. Cheers….


 
beyondwords | a blog for professional writers, editors, and designers » Blog Archive » 140+ Tweet Feed: Feb. 20-26
Feb 28, 2010 at 12:21 pm

[...] Google Analytics for Facebook Fan Pages: London-based web development company WebDigi walks through the necessary steps to make Google Analytics work for your Facebook fan page, including tracking wall visits. [...]


 
Bridget
Mar 1, 2010 at 1:55 pm

This is excellent! I have been waiting for something to help me track stats better than the Insights. I am so grateful to you for sharing! Also, I am currently tracking the wall. At first it read “Tracking Unknown” in GA. However, after 48 hours, I am now viewing stats. So for those of you with this message, just be patient!


 
Michael McCloskey
Mar 1, 2010 at 3:07 pm

This is VERY cool! We just did this in Flash a couple weeks ago and it looks like you guys are doing the same thing for FBML. Excellent work guys!


 
Web Analytics Tracking on a Facebook Page | Gilligan on Data by Tim Wilson
Mar 1, 2010 at 3:37 pm

[...] At almost the exact same time that this post went live, an e-mail hit my inbox with a link to a Google Analytics on Facebook post that I failed to turn up during my research (the post is only a week old, and most of my research [...]


 
How to integrate Google Analytics to Facebook Fan Pages | AwardSpace Blog
Mar 1, 2010 at 4:40 pm

[...] Here is  the link with How To Post at Google Analytics for Facebook Fan Pages [...]


 
Hagan
Mar 1, 2010 at 6:31 pm

Hi Guys

thanks for sharing that. Great stuff.


 
Philippe Mochamps
Mar 2, 2010 at 10:49 am

Thanks for the code…and the long and repeated explanations !
Very useful, I was looking for this kind of tool for months


 
Lucy Griffiths
Mar 3, 2010 at 10:50 am

Thanks for sharing this. I will definitely be giving this a go on our Facebook page.


 
Big City News
Mar 3, 2010 at 4:40 pm

So, all implemented and waiting for the Googlers to update the stats. Just need some traffic for that, can you guys help a little please?

facebook.com/pages/Big-City-News/137362123910

Thanks ;-)


 
glenn
Mar 3, 2010 at 7:54 pm

Thanks, this is really cool! Added it to my page. The question then becomes, how (if possible) does one track paths thru the page tabs… engagement if you will?

facebook.com/street.artists


 
Dan C
Mar 3, 2010 at 11:59 pm

So will this track the actual people who visit my facebook profile? For instance, I would be able to see their names and the times they checked my profile? This probably sounds like a horribly obvious question, but I am not the most technically savvy individual! Thanks in advance for your answer :)


 
Gary
Mar 4, 2010 at 8:28 pm

I’m curious if it’s possible to do this in conjunction with the stream.publish API method? We’re writing an application that allows an individual to post a custom swf to a friends wall. We like to be able to use GA to track how many times that swf is played.

Is there a way to accomplish that with this method? As yet, I have been unable to determine how to pass the necessary information through to the stream.publish method.

Thanks,

-Gary


 
e-chasse
Mar 4, 2010 at 10:07 pm

Hello, first of all thank you for this tutorial.

Unfortunately GA is not receiving any data from my fan page (I included the image on my “landing page” as well as on the wall). I waited well over 72h.

Can someone tell me if the code on my page seems to be correct?
facebook.com/chasse.actu

Thanks in advance. :-)


 
iphp
Mar 5, 2010 at 6:34 pm

@e-chasse, I had a look at your facebook fan page. I see that you have hosted the code on your server. It looks like there is some kind of issue causing a script error. Did you alter the code? You are free to use our hosted version if you dont want to debug.
@Gary, Interesting idea, do give it a go and let us know if it works out for you.


 
Rob
Mar 6, 2010 at 2:41 pm

Since I’m no developer, I may have taken the more difficult “Advanced” path, but like the idea of seeing the traffic on my domain GA as well. I copied the code into the following location: my-domain.com/fbga and modified the code to reflect that location, instead of your servers. I then went out to GA and saw visits, but assume they came from your servers before I made the switch. How, other than waiting, can I determine if I did this right?


 
Vishal
Mar 7, 2010 at 5:48 am

Gr8 Post .Very Excited after reading this post .
Still not successful to configure it. Need your help

have completed two steps. First created google analytics account for Facebook Fan page(http://www.facebook.com/panchkula and received google analytics code. Second generated Image from the UI you have shared. After that I have added FBML box to my facebook fan page and have copied the image code generated(have changed the image from yours to mine). When I have checked status from Google Analytics, I am getting tracking code is not installed message. What to do now ? have already waited for 3-4 days.. my facebook fan page is : facebook.com/panchkula


 
e-chasse
Mar 7, 2010 at 7:48 pm

@iphp, Thanks for checking my page. I tried to generate a new code and now it’s working perfectly. The only thing that differs from my previous attempt is that I changed my facebook profile from “facebook.com/chasse.actu” to “www.facebook.com/chasse.actu” (and generated new tags based on that). About one hour after adding the “www.” it was already collecting data.


 
Rovalou
Mar 8, 2010 at 3:24 pm

Can you tell me the difference to this?

wiki.developers.facebook.com/index.php/Fb:google-analytics

Is it for Apps?

thanks


 
iphp
Mar 8, 2010 at 4:12 pm

@Rob, to determine if you have setup things correctly, visit the img location on the code generated by your browser and it should redirect to Google analytics and show you a blank page
@Vishal, It looks like there is no tracking code installed on your fan page. Are you sure you have placed it correctly?
@e-chasse, That is strange but I am glad you got it working.
@Rovalou, Yes, that link is just for apps. If you need to track fan pages this is the only way to get Google Analytics working.


 
ayon
Mar 9, 2010 at 7:04 am

Great info! I have applied this to my band’s facebook page and it works like a charm!

I’m just wondering whether this would work in a similar social networking site such as Myspace? I pasted the custom image tag using your generator but it appears as a broken image on Myspace alone.


 
Sam
Mar 10, 2010 at 3:18 pm

Presently we are tracking our facebook activity through our main google account. We can record visitors coming from there aswell as the ecommerce feature installed so we can see revenue generated from facebook. I’d like to gain a better knowledge of what pages, links etc are clicked on facebook to get to our site, so your method seems like we would acheive this.

However, my concern is that i wont beable to setup the ecommerce piece using your method. Do you know if this will be possible or not, or even have tried it yourself? Thanks. facebook.com/dennis.kirk.fb


 
ricer
Mar 10, 2010 at 6:32 pm

You cannot add FBML to your profile. Only to a page (as the title of this article mentions). On your profile you have use “profile HTML” app – adding the google image to this box results in the image being encoded / changed as facebook caches the image. The info for profile HTML says that “facebook will alter you HTML – images in boxes will be reduced and cached by facebook”.

so no.. I dont think this works on a profile.. But it works on a page.. but if anyone can tell me how to get FBML onto a profile I will be interested to find out – or if you think it does work explain how you did it and your results

thanks
steve


 
4 Ways To Monitor Your Facebook Page Traffic
Mar 11, 2010 at 3:09 pm

[...] has not enabled their FBML tag within Facebook Pages, so a London-based web development company decided to create their own solution. By using images, there is a workaround which enables Page administrators to track everything [...]


 
Social Media SEO
Mar 11, 2010 at 5:53 pm

When adding the analytics to your “Analytics Code” field on the code generation tool you’ve provided, do you just add the portion that is UA-XXXXXXX-XX, or are you suppose to add the entire block of javascript?

I’ve added the code to track both my custom landing tab for non-fans on my Facebook Fan Page, and also to track the wall of my Facebook Fan Page at >> facebook.com/SocialSEO


 
Social Media SEO
Mar 11, 2010 at 7:08 pm

For self hosted Wordpress blogs, you can add this tool to your own server by doing the following:

1) Download and unzip the self hosted server file provided by WebDigi
2) Unzip the file once you’ve downloaded it
3) Upload the entire folder to “public_html” directory for your Wordpress blog
4) You should now be able to find the tool at yourblogname.com/fbga-version1.1

Hope this helps someone!


 
Corey
Mar 11, 2010 at 9:19 pm

I don’t fully understand step 3). Can someone enlighten me?


 
iphp
Mar 12, 2010 at 5:06 pm

@Corey, Please take a look at the screenshot. This is where the code will go http://www.webdigi.co.uk/blog/wp-content/uploads/2009/06/adding-img-tag.png
@ Social Media SEO, thanks for sharing your wordpress idea. I have not tested this but hope it helps someone. Also, yes, just add UA-XXXXXXX-XX to the tool.
@ ricer, This method can only be used to track places that you have access to make source code edits and img tag. Which is all of Facebook custom fan pages, wall, etc at the moment.
@ ayon, I have not tried this on MySpace. Are you sure the UA-XXXXXX-XX was correctly placed?

Thanks for all your comments, I will try to answer them as I get the time.


 
grooby dood
Mar 13, 2010 at 11:14 am

This is an excellent and ingenious Tool! Bravo and thank you very much for sharing!

Another cool facebook tool people might like is Facebook Purity fbpurity.com It basically cleans up your facebook homepage newstreams from all the spammy annoying stuff.


 
Ondra
Mar 15, 2010 at 9:28 am

Hello! Thanks a million. Gives me very good idea of what is going on in my pages.


 
Jennifer
Mar 16, 2010 at 5:12 am

Hi everyone! Thanks so much for this post. I was hoping someone would come up with this solution!
I run the facebook page for a movie starring Cloris Leachman & Tara Reid called The Fields (http://www.facebook.com/thefieldsmovie). I’ve been looking for something like this to test out our marketing on facebook. I just put it on tonight and we’ll see how it goes. Thanks again so much–this is amazing!
-Jennifer


 
Lecie
Mar 16, 2010 at 11:30 am

Thanks so much for the how-to. Google Analytics is still showing the tracking status as not installed – I’m hopeful that it will work though. Would you mind giving it a check? Am I supposed to see an actual image? (http://www.facebook.com/pages/Lecie-Gallery/301608373343)


 
Concrete Floor Coatings
Mar 16, 2010 at 7:55 pm

Very nice article


 
Andrew Coppola
Mar 16, 2010 at 11:53 pm

Thank you for this! Worked great.

This same method also works for tracking Craigslist posts.

I haven’t tried it on MySpace yet but I don’t see any offending characters in the img url that would prevent it from working.


 
social network web development
Mar 18, 2010 at 1:23 pm

This is an excellent and ingenious Bravo and thank you very much for sharing!


 
Fitz
Mar 19, 2010 at 4:04 pm

I’m wondering about tracking goal conversions originating from Facebook but then converting on our primary website. Google explains how to track analytics across different domains here:
google.com/support/analytics/bin/answer.py?hl=en&answer=55503

But this requires adding 2 lines of code to the on-page analytics code on both sites. Using your hosted service does not allow us to do this. Do you think it’s possible, on the backend, for you to add the additional two lines of code?

pageTracker._setDomainName(“none”);
pageTracker._setAllowLinker(true);


 
brian cors
Mar 19, 2010 at 8:08 pm

Greetings, all!

Trying this out for the University of Michigan Museum of Art [UMMA].

Can you please try the following pages?

facebook.com/ummamuseum
facebook.com/ummamuseumstore

Thanks!
[b]


 
iphp
Mar 19, 2010 at 9:23 pm

@Andrew, Thanks for confirming that this technique works on Craigslist! Let us know how it goes on MySpace.

@Fitz, Take a look at our new article which describes how you can track Goals, use filters, segments, etc. You might be able to use this to achieve what you are looking for. http://www.webdigi.co.uk/blog/2010/tracking-user-engagement-on-facebook-fan-pages/


 
BeththeIMVA
Mar 20, 2010 at 4:33 pm

I’m researching this for my own use and for an article about enhancing your Facebook Fan Pages for Small business.

But I have a few issues, non-technical people and perfectionist nancies like me, can’t overlook.

It’s unclear, and Lecie already brought it up, whether the google analytics status will change or not. Please let me know, I set mine up and I see “Tracking NOT Installed”.

Also I’d like to link your website in the article as the source, let me know if this is okay with you.


 
Debbie Hemley
Mar 20, 2010 at 9:30 pm

After several attempts, mine is working!
For some reason it did not like being on boxes tab and shortly after putting on wall, it started pulling in data. Wow, is this ever a great example of social networking and community. Thanks!

facebook.com/webermedia


 
iphp
Mar 21, 2010 at 10:36 am

@BeththeIMVA, Eventually (a couple of days) the status will change to “Receiving Data” and you will see a green tick which should keep people happy! We are happy to have you link to this article.

@Debbie Hemley, You are welcome, Thanks for sharing your experience.


 
Vytautas
Mar 21, 2010 at 12:25 pm

It seems that when using code on my own server it doesn’t work because i tried yours hosted code and it works just fine.

However, here’s generation script working all fine on my server: gosocial.lt/fbga/

Have any ideas what’s the problem?


 
Francesc Gómez
Mar 24, 2010 at 1:48 pm

Great stuff!! It works. Thank you for sharing!


 
Stijn
Mar 24, 2010 at 2:26 pm

Thanks a lot but it doesn’t bring back an data in Google analytics. I reconfigured, let’s hope it works in a couple of hours.

In the meantime, I tried to add this in a text widget on my wordpress.com blog. Any idea if this could work?


 
Anupama
Mar 25, 2010 at 8:35 am

Just checked that you’ve added an update for tracking wall visits -This is Super-Awesome!!!!!!!


 
Custom Applications
Mar 25, 2010 at 10:47 am

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


 
Alexis
Mar 26, 2010 at 12:27 am

Hello,

Thank you for this awesome explanation. I think I got the first steps right (getting the code, then installing staticFBML application, then adding it/ customizing it for the page) – however, I didnt get exactly where and how many times I should CC the codes generated by your appli.

For example, let’s say I would like to track the wall and the discography page.
I then created TWO “FBML” boxes: one named “Discography”, where I CC’d the code generated for the discography page, and one “Wall” where I did the same.

Am I right? Because so far, GA warns me that the code is unknown…

Thanks in advance, and I hope I was clear enough!


 
Anna
Mar 26, 2010 at 9:05 am

Two weeks ago I added this to a Facebook page and everything seemed to be working fine, but after a week I was surprised to see that the number of Absolute Unique Visitors was still 100%. Now after two weeks the number of visits are 19 517 and the number of absolute unique visitors are 19 515. Any idea what I did wrong? I used the solution for advanced users. This is the page: facebook.com/kondomeriet

Thanks for a great post, and for your patience answering all the comments, you’re great :)


 
iphp
Mar 26, 2010 at 10:41 am

@ Anna, I don’t think your self hosted method is correctly keeping track of cookies. Can you please check if cookies are working from your server and it is maintaining this? The hosted solution shows a non 100% for new visits.

@Vytautas, Can you please turn on error reporting? I see you are using the advanced self hosting method. The code is not redirecting correctly.

@Anupama, Francesc, Good work!

@Alexis, you have to generate a new code for each page that you are looking to track


 
Alexis
Mar 26, 2010 at 12:01 pm

Hi,

@iphp – thanks for your answer, but by “page” do you mean “Fan page” (which includes several sub-pages, such as wall, discography, infos, etc.) or each sub-page of a fan page? That’s where it gets confusing.

Thanks!
A.


 
iphp
Mar 26, 2010 at 1:27 pm

@Alexis, by page I mean every tab/staticFBML within your fan page. The contact form should have a different code to the one from the wall and the discography a different one from portfolio, etc.


 
Lithyem
Mar 29, 2010 at 4:57 pm

This is a great find, thank you!


 
Karpacz Noclegi
Apr 4, 2010 at 2:15 pm

Oh I didn;t know about it, thx for all information :)


 
Jean-Louis
Apr 5, 2010 at 12:46 am

Hello Webdigi and thanks a lot for your amazing solution !

Everything seems to work fine except that I get only new visits (100%) and very high bounce rates.. I’m using your server > could you help me to understand what’s wrong? My fanpage is facebook.com/weloveshortfilms

Thank you


 
A Week In The Life of A Redhead
Apr 5, 2010 at 5:15 pm

We have the same Wordpress theme! I am trying to figure out a way to track facebook in Google, and I stumbled on to you – Catherine


 
Daniel
Apr 8, 2010 at 7:33 pm

Is it possible to track user activity on non-FBML tabs such as the Info or Wall tab?

Perhaps there is a workaround?

Thanks, great work!


 
iphp
Apr 9, 2010 at 7:11 pm

@Jean, how many pages are you tracking?

@Daniel, yes you can track the wall tab by using staticFBML and changing application settings to add box and removing tab.


 
Zyelon
Apr 10, 2010 at 9:46 am

Thanks a lot for really nice information sharing…


 
Markus
Apr 11, 2010 at 9:54 am

Thanx, awesome post! Works nice…

Just wondering: I tried to track how many users left the page via external links in my staticFBML code, so I used <a href=”http://www.example.com” rel=”nofollow”> in combination with your code… Thought this should be working but it does not. Any ideas on this?

Cheers, Markus


 
Markus
Apr 11, 2010 at 10:34 pm

Ouch! Your blog swallowed half of my posted code – this is what I used to track links to external sites:

a href=”http://www.example,com” onClick=”javascript: pageTracker._trackPageview (‘/external/example_com’);”

Cheers,
Markus


 
iphp
Apr 12, 2010 at 9:21 pm

@Markus, No facebook will not allow this kind of Javascript to run on facebook page. However, you should take a look at our advanced analytics page for tracking clicks


 
Jean-Louis
Apr 13, 2010 at 9:20 am

Hello iphp

I’m tracking 4 pages :
- the wall/info via “brussels short film festival” box in left column
- “concept” tab (= landing page)
- “festival” tab
- “selection” tab
(-even “notes” tab but it seems not to work)

Thank you very much for your help


 
faiz
Apr 14, 2010 at 7:35 am

Can someone tell me that GA on my page is working? facebook.com/universityofmalaya .Thanks in advance.


 
Jules
Apr 15, 2010 at 10:23 pm

Hello I’m a beginner so am not too savvy with all this. So I’m following the top 3 steps… Once I get to step 3, HOW to do I put the code on my Facebook page? I don’t see anywhere to edit??? Thank you so much, this is such a brilliant idea!


 
Marion
Apr 16, 2010 at 4:54 pm

@iphp, I use Google Chrome and the form kept giving me problems while trying to create the image links. Every time I clicked on a field, it kept putting focus on the `Analytics Code` field.

I re-wrote some of the HTML to fix this problem, and I also switched out the JavaScript to use jQuery (directly from Google). If you’re interested you can download the form code from here:

figmentthinking.com/ft_downloads/fbgat-jquery-index.zip

I did not repackage the full code, only the index.php that I modified.


 
Tom
Apr 18, 2010 at 9:08 am

@iphp, I agree with @Marion, I use Safari and the focus would not stay on a field in the form without clicking-holding whilst I typed in the data. Otherwise it would jump straight back to the ‘Analytics Code’ field.

Great piece of work overall though, got analytics working like a dream – thanks!


 
Pepe
Apr 18, 2010 at 9:15 pm

Hi, amazing technique!


 
Shalaco
Apr 22, 2010 at 7:27 pm

This article has a lot of the FBML steps that was skipped, if you are a beginner, here is some tutorials on the subject: facebookmarketingreview.com/tutorials/advanced-facebook-page-customization-fbml


 
ollie
Apr 26, 2010 at 2:41 pm

anyone able to help me? I posted april 7 with my enquiry.


 
Roacha
Apr 26, 2010 at 2:50 pm

Hey @iphp, first great job. Two quick questions:
1) I setup my wall with a page link of /wall. I have some unique FB apps like Web Appz, when I hit the WebAppz tab the url ends in “v=app_19827163485″ so do I create my new box with a page link of “app_19827163485″?

2) After I add additional FBML boxes and custom GA links they all show up under the Boxes tab. Don’t I need to move these to each of the unique tabs/pages that I want monitored? The only option is to move to the wall or delete, how do I get them to the proper tab/page?


 
Roacha
Apr 27, 2010 at 2:32 am

Also can you check out my configuration on my wall. facebook.com/DudeImGettingMarried

Thanks


 
Gus
May 5, 2010 at 2:40 am

We have developed a couple of Facebook application that we are trying to track their usage with GA. We are using iframe based apps. and have added the GA tracking code to our ‘iframe” pages. The problem with GA and IE is that GA does not track all of the IE hits! Browser distribution by GA is : Firefox, Chrome, safari, IE. We have verified GA is greatly under-reporting hits by IE.
I have read some complains about GA an IE issues but no solutions. Does anybody have experience with GA in a Facebook Iframe application deployment?

Thank you,
Gus


 
Bart De Latte
May 6, 2010 at 1:13 pm

Thx for this really usefull information in a world of social media!


 
Sean Weigold Ferguson
May 8, 2010 at 9:00 pm

Just implemented this to test it out on facebook.com/pages/Sean-Weigold-Ferguson/112141502160971. Would love if you visited it to help me work out the kinks.


 
Andrew
May 9, 2010 at 2:11 am

So how do I paste the code into the bottom of my pages? I there something I am missing in step 3? Can you explain this a bit better?


 
Louise
May 10, 2010 at 5:14 am

This is great, but am I correct in thinking that the code can only be added to the static FBML pages? And if it can’t be loaded on the “wall” and “info” pages, wouldn’t it lose track of the visitor and give incorrect data?


 
Richard
May 12, 2010 at 7:42 am

This really is a fantastic tool and I was excited to add the functionality that self-hosting would allow, but as previously mentioned, the package to self-host seems to have a scripting error in it. This results in the appearance of a broken image link on the facebook page. It gives a T-error on line 23 of Galvanize.php when you enter the link directly into the browser.


 
iphp
May 12, 2010 at 7:10 pm

@Richard, Are you running PHP version greater than 5?
@Louise, to add to the wall you need to create a box which is mentioned on this page within comments.
@Andrew, Just copy the code from the FBGAT generator and put it on the staticFBML as shown on the update image.

I am not able to keep up with most comments. I would love to see you answer questions to other people awaiting answers. Or atleast sharing your positive experience to keep them going.


 
Max
May 18, 2010 at 9:56 am

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.


 
Brent Han
May 19, 2010 at 12:59 pm

Thats a lot of info to take in but very informative,thanks.


 
Cassy
May 19, 2010 at 3:32 pm

Good morning iphp! I downloaded the code and placed it in a “facebook” folder within my website’s directory. from there, i used the generator to generate the code (already set up a facebook.com profile in our GA account) and added the FBML box to the wall with the code within it. The box is titled “TFT Blog”. I saw in one of your comment posts to type in the url and it should redirect you to google analytics. The link isn’t redirecting, only takes me to a blank page but still under our domain and the FBML box on our page show’s a broken image icon. when you have a chance, i’m curious as to what i may be doing incorrectly. facebook.com/topfloortech – thank you much in advance!


 
iphp
May 19, 2010 at 7:41 pm

@Cassy, Please use the hosted version, there is something wrong with the image URL. Are you sure you are running a PHP version greater than 5? Please turn on error reporting there definitely is some kind of error. Ideally you should get redirected to Google (and shown a blank page) when you visit the FBGAT link on your browser.


 
Guy
May 20, 2010 at 12:57 pm

Great tool – also useful for hosted Wordpress blogs


 
How To Add Google Analytics to Your Facebook Business Page
May 25, 2010 at 7:22 am

[...] adding Google Analytics to your Facebook Fan page were inspired by and learned from web posts by WebDigi and Social Media [...]


 
Well, what is a good digital music strategy ? » Article » owni.fr, digital journalism
May 25, 2010 at 6:03 pm

[...] FB Insight is alright, but in comparison to Google Analytics, it won’t get you far since those Stats are only about fans. So, if you are not afraid to get your hands into the dirt, you will use Google Analytics to analyze your FB stats. Yep, it’s possible. Follow the guide. [...]


 
Clacton
May 26, 2010 at 2:04 am

Great, thanks a million for this. Tracking all my visitors perfectly!!


 
Brandon Tran
May 28, 2010 at 7:45 pm

I installed fbga on a custom tab application which facebook caches the image. Will that affect the results? Should I add a datetime variable to the end of the url or will it work as is?

facebook.com/pages/Jake-Night/125934074087372?v=app_123865557631259


 
Paolo
Jun 3, 2010 at 7:18 pm

Well, probably a silly question, but… HOW can I add an image to the bottom of an fb fan page?


 
Paolo
Jun 3, 2010 at 8:23 pm

Ok, I was able with “Static FBML”.
Now, tell me: “/” will refer to the wall page?
Or do I have and use “/wall”?


 
Stanley
Jun 5, 2010 at 1:17 pm

I cant thank enough for this!


 
Collin Condray
Jun 7, 2010 at 3:44 pm

I’ve added a static FBML box to my wall but it looks like all the code has been escaped and the image is loading. I’ve got the image in the “Thanks For Visiting” box in the lower left of facebook.com/pages/Fayetteville-AR/Township-Baptist-Church/89000767842 . Did I skip a step somewhere or is there a box to turn the escape off?

Thanks for the great tip!


 
iphp
Jun 7, 2010 at 4:19 pm

@Clacton, Awesome, glad you got this working, thanks for reporting back!

@Brandon, For applications (canvas applications), I suggest you use Fb:google-analytics. If you search developer documentation or on Google, you will get answers to this. If you prefer to use this, yes you need to add variable

@Paolo, / or /wall should do the trick. I prefer /wall. It looks like you figured out how to add image to the bottom of the page. A screenshot is at the footer of the actual article, before comments.

@Collin, I visited your page and it looks like things are working correctly, you should see logs appear on Google Analytics soon!


 
erik
Jun 10, 2010 at 10:31 am

big thx to you, awesome info!


 
erik
Jun 11, 2010 at 4:26 pm

hey there, i got it working perfectly, but i tried it on a page with seo-friendly urls first. now i wanna integrate it into a page with smaller amount of fans and crappy urls. how deep should i define the url path? is like
/BlaBla ok?
or do i need /pages/BlaBla ?
or even /pages/BlaBla/101963159841418
or (! one more, sorry^^!) /pages/BlaBla/101963159841418?v=app_4949752878 (in case there is an app)

still big thanks, for seo frndly urls working perfect.


 
Awesomeness
Jun 11, 2010 at 4:46 pm

Thanks for the post, it works great!

@erik, Anything is file /BlaBla should work correctly. Please remember to create a new Google Analytics profile and code, if this is your second it will look something like this UA-9292929-2, A 2 in the end.


 
erik
Jun 11, 2010 at 5:00 pm

hey @awesomeness : thx, thats probably why its not working


 
John
Jun 13, 2010 at 3:34 pm

Got this working great. Thanks for the cool tip! I can even see visits to my wall that isn’t an application. Anyone got ideas about how to continue tracking wall visits after Facebook removes boxes from it?


 
Collin Condray
Jun 14, 2010 at 1:02 pm

I was using an old tracking code related to the fan page and the tracking information wasn’t showing up. When I created a new profile in Google Analytics and used that instead, it started working again. I’m still not sure how to get a different code on the Wall and Info page though.

Thanks!


 
Ryan
Jun 16, 2010 at 5:57 pm

This is cool. One question I have is enabling FBML on standard tabs like Discussions, Photos, Video, etc. I want to track analytics on such tabs but not sure how/where to insert the code unless I’m overthinking things!


 
Giulia
Jun 22, 2010 at 3:11 pm

Hi all,
I need your help.
Im customizing a fan page with 2 new tabs (newsletter, shops)- Each tab is made with a img that links to the website. Does UTM parametres (source,content..) works in the fbml code?
Plus, I have some questions for the generator code

Analytics Code: is the one of my website (already existing) or the one of the new analytics profile facebook.com/myfanpage)

Domains on analytics: is it mywebsite.com or facebook.com?

page link: is it the link (ie /newsletter.php) linked to the img in the tab?

Thank you


 
Muther
Jun 22, 2010 at 10:09 pm

First I wanted to tell you that you made a grate product
Second I have several facebook pages of US brads in Argentina, the thing is in some of them I am receiving a lot of visits for the US, even more that form Argentina, to me this seems strange because the pages are in Spanish and targeted to the argentine audience.
I been looking in the data and found that most of the visits from US come from facebook inc as a service provider. Can it be a that facebook has cached my page? Or are there really facebook employees?


 
Jarl
Jun 24, 2010 at 12:39 am

Wonderful! You guys are the bee’s knees.


 
Fort Henry
Jun 24, 2010 at 2:04 pm

Does this work for just a regular Facebook page? rather then just a fan page? and where in the bottom do you insert the code?


 
Raphael
Jun 27, 2010 at 7:46 pm

I´ve installed the tracking code in my client page and it works perfectly!
My doubt is in GA the information about “time on site” is 00:00:00 and you said that this info is working.
Any issues with that?
facebook/animalebrasil

TKS!


 
Johann de Boer
Jun 29, 2010 at 2:27 am

Does the advanced method (i.e. installing on our own web server) allow tracking of referral paths other than just referrals from our own website? I.e. can this method be used to track what other websites referred visitors to our Facebook page?


 
Tracking Hosted Wordpress Blogs With Google Analytics « Si Quando Dubium, Illic Est Scilicet
Jul 5, 2010 at 8:42 pm

[...] found this site a few weeks ago, while looking into some Facebook reporting issues – a rather simple app [...]


 
Designing A Facebook Fan Page: Showcases, Tutorials, Resources - Smashing Magazine
Jul 7, 2010 at 11:34 am

[...] [...]


 
Designing A Facebook Fan Page: Showcases, Tutorials, Resources | Web Design Cool
Jul 7, 2010 at 1:16 pm

[...] Google Analytics for Facebook Fan Pages Another great post by Webdigi.co.uk, in which they show you how to get around Facebook’s limitations. Even though Facebook supports only restricted JavaScript, which is usually not enough for Google to correctly track visitors, the guys from Webdigi.co.uk successfully managed to get all functions of Google Analytics working on their fan page. You can learn how they did it by reading this tutorial. [...]


 
joanne Delbalso
Jul 7, 2010 at 9:45 pm

Great Blog post!! I just did this and it was easy as pie!! thanks for the info.. I will pass this on !!

Joanne DelBalso
@nofussacctng


 
Hubert
Jul 12, 2010 at 1:02 pm

Hi, great job!
Can I use fgba for tracking email marketing campaign?
It’s seam that’s possible… it’s like the classic gif insert method

Domain on Analytics: mydomain
Page Link: alternate-webpage-url-of-email-HTML/newsletter-date.html
Page Title: newsletter-date

[don't need GA-code in the alternate page, keep the img gif code]

Thanks you very much, very usefull

Regards
@dmsr


 
Stuart G. Hall
Jul 13, 2010 at 8:58 am

Thanks for sharing!

Cheers,

Stuart


 
Chris
Jul 15, 2010 at 4:52 am

Thanks a lot for this I followed your directions and I am getting the “Tracking Not Installed” error code, I will give it some time and see if it starts working. Once again great blog post and thanks

Chris
@lifterCatcher


 
Chris
Jul 15, 2010 at 4:53 am

Here is the link to my fan page to hope to get some clicks to see if this is working.

facebook.com/pages/Our-Fitness-Journey/158321227279?v


 
Nate
Jul 17, 2010 at 5:57 am

Update: after a couple more hours, the GA registered the feed. I’m anticipating my first daily report in an hour!

Thanks again!


 
Cat C.
Jul 22, 2010 at 7:20 pm

Hi,
I have tried this over and over and I guess I’m doing it wrong because I still can’t get the reports to start. Here is what I have been putting into the FBGAT code generator:
Analytics Code: Check, I have that.
Domain: facebook.com/wsuspokane
Page Title: This is where it’s confusing. I don’t know whether to put “WSUSpokane” (the fan page name) or “Cougs” (the name of the box the code is in).
Page Title: This is confusing as well, page or box?
Any help would be appreciated, but it doesn’t look like you are answering comments anymore. :(
Cat


 
iphp
Jul 26, 2010 at 7:00 pm

@Chris, @Stuart, @Nate, @Joanne, @Hubert.
THANKS! Thank you for your comments. I hope this encourages people who are nearly there with integrating Facebook to

@Cat C.
Sorry for the delay in replying. We have been really busy. I hope you have already figured out the issue. Can you please post the link to your facebook page? Page Title does not matter, it is just to help you identify the page when you see the reports.


 

Reply

Copyright © 2010 PHP, Web and IT stuff All rights reserved. PHP Web development in London.