Google Analytics for Facebook Apps - Stay N Alive

Google Analytics for Facebook Apps

Today, Facebook announced they were releasing a new FBML tag for developers that would allow developers of Facebook Apps to track their applications via Google Analytics. Before this, because the code you put on your page is javascript, there was no way to track your apps. I tried to install this, but ran into issues, in that Google tries to look at your main facebook app page for the javascript (which isn’t parsed by Facebook), while Facebook gives an error if you put the raw Javascript on the page. I came up with the below solution, which works like a beauty – you put your javascript between your tags, like this:

...

Since Google reads the plain callback url it won’t interpret the fb:google-analytics, and Facebook ignores everything between the tags. Works like a charm on mine.


Discover more from Stay N Alive

Subscribe to get the latest posts sent to your email.

Leave a Reply

Your email address will not be published. Required fields are marked *

Discover more from Stay N Alive

Subscribe now to keep reading and get access to the full archive.

Continue reading