Google Analytics for Facebook Apps

Hi - you seem to be new here. If you like what you see, please give back by subscribing to my RSS feed!

You can check me out on Twitter, Facebook, or FriendFeed to see what I'm up to. Thanks for visiting!

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 <fb:google-analytics> tags, like this:


<fb:google-analytics uacct="12345">

<script type="text/javascript">

...

</script>

</fb:google-analytics>

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

Join the Discussion on FriendFeed:

Viewing 7 Comments

Trackbacks

blog comments powered by Disqus