File Types for Download Tracker

Available on:
Free
Premium
Data Plus Add-on

The Download Tracker in DataPlus monitors when visitors download specific types of files from your site.
It identifies these downloads by checking the file’s extension in the URL against a pre-defined list.

By default, we supports these extensions:

TypeExtensions / PatternsNotes
Documentspdf, docx, xlsx, txt, rtf, csvdocx matches .doc and .docx; xlsx matches .xls and .xlsx
Presentationsppt, pptx
Archiveszip, rar, 7z, gz, pkgGZ is often used for compressed files
Installersexe, pkgEXE for Windows, PKG for macOS
Media (video)avi, mov, mp4, mpeg, wmvmpeg matches .mpg and .mpeg
Media (audio)midi, mp3, wav, wmamidi matches .mid and .midi
Other formatskey (Keynote), vcf (contacts), stp, dwg (CAD)Duplicates like stp and dwg appear twice but don’t break anything

How to extend the allowed file types

The plugin uses this method:

return apply_filters('wpstatistics_data_plus_event_file_extensions', $fileExtensions);

This means you can hook into the filter wpstatistics_data_plus_event_file_extensions to add new file extensions.

Example — Add new extensions

Add this to your theme’s functions.php or to a small custom plugin:

<?php
// Extend WP Statistics DataPlus download tracker extensions
add_filter('wpstatistics_data_plus_event_file_extensions', function (array $extensions) {
    // Add extra types
    $extensions[] = 'svg';       // Vector graphics
    $extensions[] = 'webp';      // WebP images
    $extensions[] = 'apk';       // Android packages

    // Optional: deduplicate list
    $extensions = array_values(array_unique($extensions));

    return $extensions;
});

Let’s get started
Take your business to next level

Become part of our growing family of +600,000 users and get the tools you need to make smart choices for your website. Simple, powerful insights are just a click away.