Robert Munteanu
Robert Munteanu

Reputation: 68308

Counting eclipse plugin installations/downloads

I'm currently hosting an Eclipse plugin update site on sourceforge.net . SF.net does not allow access to server logs but I'd still like to know how many downloads the plugin gets.

Is there an alternative way of gathering them?

I'm not going to have any sort of 'call home' feature in the plugin, so please don't suggest that.

Upvotes: 2

Views: 183

Answers (3)

Austin Rappa
Austin Rappa

Reputation: 26

I wrote a blog about how to track downloads of an Eclipse plug-in update site. What you can do is specify a url to your server and every time a download is initiated the update site will send an HTTP HEAD request to that url, which you can then use to count the number of times the plug-in was downloaded. If you want to track some information about who is downloading the plug-in you can pass information, like the package name, version, os, and and store it in a database.

http://programmingfortherestofus.blogspot.com/2014/08/tracking-downloads-to-your-eclipse.html

I hope it helps!

Upvotes: 1

Kothar
Kothar

Reputation: 6629

It is possible to host the plugin jars in the file release service, and then get your site.xml file to point to them. You need to point at a specific mirror to make it work.

This will tell you how many times people download each file as with a normal file release.

Unfortunately, in practice this is a lot of work to maintain, and tends to be unreliable (I kept getting bug reports saying the update site wasn't working).

You could write a very simple php script which just serves up the relevant file, and logs the download to a file or DB. Make sure it double checks the URL is a valid one to download to the user of course :)

Once that's in place, you can update the site.xml to point to the correct thing, or you could probably use URL rewriting to intercept requests to your jar file and pass them through the script. I've never tried that on the SF servers, but it might work.

EDIT: Even better, just have a php script which sends a redirect like this:

<?php
  $file = $_GET('file');

  // Now log the access to file

  header('Location: ' . $file);
?>

Upvotes: 1

zvikico
zvikico

Reputation: 9825

Just a thought: AFAIK, SourceForge does tell you how much data you served. You know the size of your plugin JARs. Divide the data served by the size of your plugin and you get a rough estimate of how many downloads you had.

Upvotes: 0

Related Questions