Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Download Statistics

Security covered Maintenance fixes only 68 sites

This module tracks file downloads on your Drupal site, showing which files are most popular. It offers a customizable block to display popular and recent downloads, and integrates with Views to provide download count data.

The Download Statistics module extends functionality of the core Statistics module and provides for Drupal 8/9 some file download statistics functionality that was available in Drupal 7 through Download Count module.

The file download statistics are useful in determining which files visitors most often download from your site. It provides a customisable "Popular file downloads" block that displays the most downloaded files today and for all time, and the last files downloaded. The block can be added to any region of your theme and it allows to configure the number of most recent downloaded files to display, the number of all time downloads to display and the number of day's top downloads to display.

The module provides extensive Views support: the views fields for Total File Downloads count, File Downloads Today count and Most Recent File Download timestamp.

The important configuration step for this module to be able to count downloads - as for any other module that controls or monitors files access - is to setup the "private" directory for the uploaded files. In the "Field settings" tab of the file upload field definition, make sure you select Upload destination: Private files. The private directory has to be configured in settings.php. If the upload destination is "Public files", the web server sends the file to client browser directly, bypassing Drupal code, and counting downloads is impossible.

Once you setup your files to go to a private directory, you can use the block from the module or you can build your own block with the views to show the attachments and their downloads right on a node page.

To enable/disable the file downloads count, navigate to Download Statistics Settings page at /admin/config/system/download-statistics. On the same settings page you can clear the file downloads table if desired.

To use the enabled download counter on a particular Views page or block display, select File URI with Download Count as URI Formatter type in Views UI.
To count downloads of an attachment from node or media page, select File with Download Statistics recorded as Format in Manage Display tab for a particular entity type.

Finally, set the necessary permissions so that the counter is visible to the users.

Drupal 10–11

Ask your assistant about Download Statistics

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

  • field Drupal core
  • file Drupal core
  • node Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
5
Tracked since
Aug 2023
Latest release
2 months ago
Releases (12 mo)
3 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
1.2.1 Stable 10–11 Jul 16, 2026
1.2.0 Stable 10–11 Mar 5, 2026
1.1.0 Stable 10–11 Dec 2, 2025
1.0.0 Stable 8–10 Aug 22, 2023
1.0.x-dev Dev 10–11 Aug 18, 2023