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 function 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 load 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 on the 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?
You can download Safari at http://www.apple.com/safari/download. In general, Analytics supports the two most-recent major releases of Chrome, Firefox, Edge, and Safari (on a rolling basis). We highly recommend that you use one of these supported browsers.
Google Analytics can be a quick and free way to measure screen resolutions, devices, and the browsers your site's visitors are often using.
Analytics users can download it from the Chrome web store. After you install the extension for your Chrome browser, you can load a page that you are tracking with Analytics and see the following information: Metrics: Pageviews, Unique Pageviews, Avg. Time on Page, Bounce Rate, % Exit.
The solution is to use Remy Sharp's mini library for tracking bookmarklets and extensions with Google Analytics. Works like a charm.
Usage is as simple as:
gaTrack('UA-123456', 'yoursite.com', '/js/script.js');
Note that, since it doesn't use cookies, there's no differentiation between pageviews and visits, or for that matter, between visits and visitors. But, the rest of the functionality is fairly reliable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With