views:

950

answers:

4

I'm having some trouble getting Google Analytics to work with Facebook, has anyone here gotten this to work? Facebook provides the tag in FBML, but it doesn't seem to do anything. I've added it at the bottom of my document, and the status never changes from Tracking Not Installed in Google Analytics.

I'm using this in a Django-based web app. Here's the relevant portion of the template I'm using.

<fb:header icon="false">
    {% block title %}
    {% endblock %}
</fb:header>

{% block main %}
{% endblock %}

<fb:google-analytics uacct="UA-XXXXXXX" />
+2  A: 

Have you checked out their dev page for this? Fb:google-analytics

What type of page are you using this on? I'm not uber-elite with Facebook, but it mentions that this tag can only be used on a canvas page.

Gunny
Yes, I've seen the dev page. That's where I found out about the fbml call...
Dan Lorenc
+2  A: 

Could you post the FBML you're using? I've been using Google Analytics on Facebook for a while, and I never ran into any trouble. Possibly there's a subtle problem with the markup.

enkrates
I posted the code.
Dan Lorenc
Could you post the actual FBML that your django code produces? You should be able to see the FBML that Facebook gets from your server when you view source on your Facebook app. For all we know, there's some problem with the Django code, and we won't know until we see what it produces.
enkrates
A: 

According to Facebook (http://wiki.developers.facebook.com/index.php/Fb%3Agoogle-analytics) you're only able to use this on the canvas page. Are you using it elsewhere?

aronchick
A: 

To use Google Analytics within a non canvas pages. Use this workaround http://www.webdigi.co.uk/blog/2010/google-analytics-for-facebook-fan-pages/ by this web development company.

This works on Facebook pages and can potentially work on other places where Javascript is not enabled.

Pasta

related questions