Package Download Statistics
  • 22 Feb 2023
  • 1 Minute to read
  • Dark
  • PDF

Package Download Statistics

  • Dark
  • PDF

Article Summary

ProGet's package download statistics allow you to track individual package downloads. When enabled, ProGet will record the download date, user, etc., and gives you information about the packages your organization uses.

All editions of ProGet can record package downloads, but date, user, etc. are only visible in the paid and trial versions of ProGet.

Configuring Package Download Statistics

Since package download statistics can take up a lot of database disk space, you must first enable these statistics. To do so, go to Manage Feed > Properties > Change "Package Statistics" From here you can enable "Record individual downloads for advanced statistics

You can also "Restrict viewing download statistics to Feed Administrators," if you want to limit the display of potentially sensitive information such as IP addresses.

Viewing Package Download Statistics in the UI

Once download statistics are enabled, ProGet records the following information each time a package file is requested:

  • Username - the name of the authenticated user who downloaded the package, or "Anonymous" if the user was not logged in
  • IP Address - the IP address that requested the package
  • User Agent - the user agent header that was sent in the download request
  • Date/time - the exact date/time the package was downloaded

On the Package page, you can view this download data by clicking the Usage & Statistics tab on a package's overview page.


Limitations in Free

The free version of ProGet allows you to preview this feature and test it manually.

ProGet will still record the actual downloads, but Free users will see the date, user and IP address marked as "hidden". To view the records you'd see in paid and trial editions of ProGet, click "add record" and manually add a record with an IP address of 127.0.0.* (not 1).

Advanced Reporting

For more advanced analysis of package downloads, you can query the ProGet SQL Server database directly and/or export the data as needed. Each download record is stored in the PackageDownloads table.

For example, the following query will identify the users who downloaded packages named RubbishSoft.LongGUID in the past 90 days.

  FROM [PackageDownloads]
 WHERE [Download_Date] > DATEADD(DAY, -90, GETUTCDATE())
   AND [Feed_Name] = 'approved-nuget'
   AND [Package_Id] = 'RubbishSoft.LongGUID'

Was this article helpful?