views:

244

answers:

4

I'm developing a Firefox extension and would like to track its use with google analytics, but I can't get it working.

I've tried manually calling a funstion from ga.js, but that didn't work for some reason. No error was produced, but neither was any data collected.

My last attempt was to have a website that just holds the tracking javascript and then loading it within the extension in an iframe with the URL configured so it contains meaningful data. This way the analytics are getting connected when I visit said webpage with a browser, but not in an extension. I've tried putting some visible javascript ont he site and have confirmed the site's javascript is executing. This method also works with other trackers, but I don't like their output and would prefer Google Analytics.

Any ideas what else I could try to accomplish this?

A: 

I have the same problem. What solution did you end up using?

David
A: 

I don't think this is possible. Firefox extensions don't allow you to load pages from other servers. So the only way I can think of is to have an invisible iframe load up the code. The pings to Google's servers need to be from a domain belonging to you. So I guess your own servers have to serve up pages every time a user loads the extension, which just kills your server and defeats the purpose of Google doing all the work!! Please post if you have found a way around it. Chrome extensions can be tracked easily!

Rajiv
Er, Firefox add-ons can in fact load pages from other servers. They can do pretty much anything, in fact.
sdwilsh
Even though you say it's not possible, I think that what you describe here would actually work.
MatrixFrog
A: 

Did anyone ever solve this? I'd love to use GA from an add-on, but have failed to get it working thus far. See http://code.google.com/chrome/extensions/tut_analytics.html, might help.

GoldyLost
A: 

did any one solve the problem. I was able to load the ga.js script but did not get any result

zilani