How to find # of Safari extension users?

434 Views Asked by At

I recently launched a Safari extension (see it here http://allaregreen.us). There is also a version for Chrome, and Firefox should be coming within a day. Because the Chrome version is being hosted in the Chrome Web Store, I can easily see how many people installed my extension on the Developer Dashboard. However, I would like to find this number for Safari too. For the Safari version, the .safariextz file is hosted on my site, and people download through this link: https://extensions.apple.com/details/?id=com.nicholasrubin.greenhouse-377CXMPJ56 in the Safari Extension Gallery. I haven't been able to find the number of installs anywhere, and I'm not even sure if it exists.

What I'm wondering: Is there a way to see how many people are using my Safari Extension? Or, if it's the only option, see how many times the .safariextz file hosted on my site is being accessed? I have Webalizer and Logaholic - could I find it there?

2

There are 2 best solutions below

1
On BEST ANSWER

To track downloads, you can probably find details of when the safariextz file is accessed in your server logs.

To track actual installs and usage, you can use Google Analytics. Sign up for an account, then in your global page put something like:

// Google Analytics
var _gaq = _gaq || [];
    _gaq.push(['_setAccount', 'UA-XXXXXX-XX']);
    _gaq.push(['_trackPageview']);
(function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = 'https://ssl.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

That will track a pageview every time the global page is loaded, which I think happens each time the user opens Safari.

You can also track specific usage events. Like new installs:

if (!(safari.extension.settings.installed)) {
    _gaq.push(['_trackEvent', 'Install']);
    safari.extension.settings.installed = true;
}

Or version upgrades:

var currVersion = 110,
    prevVersion = safari.extension.settings.version;
_gaq.push(['_trackEvent', 'Upgrade', prevVersion+'->'+currVersion]);
safari.extension.settings.version = currVersion;

Or specific views:

_gaq.push(['_trackEvent', 'viewPerson', 'Nancy Pelosi']);

If including Google Analytics in your extension, it's always a good idea to have full disclosure and tell your users exactly what you are tracking.

0
On

To see the number of downloads in Logaholic, you can open the Top Pages report and put "safariextz" in the search box if needed.