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.
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:
Type | Extensions / Patterns | Notes |
---|---|---|
Documents | pdf , docx , xlsx , txt , rtf , csv | docx matches .doc and .docx ; xlsx matches .xls and .xlsx |
Presentations | ppt , pptx | |
Archives | zip , rar , 7z , gz , pkg | GZ is often used for compressed files |
Installers | exe , pkg | EXE for Windows, PKG for macOS |
Media (video) | avi , mov , mp4 , mpeg , wmv | mpeg matches .mpg and .mpeg |
Media (audio) | midi , mp3 , wav , wma | midi matches .mid and .midi |
Other formats | key (Keynote), vcf (contacts), stp , dwg (CAD) | Duplicates like stp and dwg appear twice but don’t break anything |
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.
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;
});
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.