This feature is only available in the Pro edition. Upgrade to Pro to access statistics and reports.
Pro: Statistics & Reports
Statistics & Reports provide comprehensive analytics about your free downloads. Track download trends, identify popular products, and export detailed data for further analysis.
Overview
The Reports section (in the plugin settings sidebar) provides:
- Overview tab: Stat cards (Today, Average per day, Total Downloads, Unique Products, Unique Users), downloads-over-time chart, top products chart, file type distribution, and recent downloads table
- Export Data tab: Export to CSV or XLSX with date range, product filter, and customizable columns
- Delete Logs tab: Delete old download log entries by date range or by product
All views use the date range set at the top of the page (start and end date picker).
Accessing Reports
Where to find it
Go to WP Enhanced > Free Download Woo, then click Reports in the sidebar. The page title is Download Reports and the description is “View download reports, trends, and export data.”
Requirements
Reports require:
- Download Tracking enabled (in the Tracking section)
- At least one download logged
- Pro edition with an active license
Overview tab
The Overview tab shows:
Stat cards
- Today – Downloads since midnight
- Average per Day – For the selected date range
- Total Downloads – In the selected date range
- Unique Products – Number of different products downloaded
- Unique Users – Number of different users (or IPs) who downloaded
Charts and table
- Downloads Over Time – Chart of download counts per day in the selected range
- Top Downloaded Products – Bar chart of most popular products
- File Type – Distribution of downloaded file types
- Recent Downloads – Table of latest download log entries
Use the date range picker at the top right to change the period. Use the refresh button next to it to reload data.
Export Data tab
On the Export Data tab you choose what to export and which columns to include. The date range is taken from the picker at the top of the Reports page (above the tabs).
What do you want to export?
- All Downloads – Every download in the date range
- All Products – Same as All Downloads (all products included)
- Specific Products – Only downloads for selected products; when you choose this, a Select Products list appears with checkboxes
Customize Export Columns
Check or uncheck columns to include in the export. Use Select All or Clear All for a quick reset. Available columns:
- Download ID, Date, Product ID, Product Name, Files
- Variation ID, User ID, Username, Email Address
- IP Address, Country (based on IP), Subscribed
- First Name, Last Name, Telephone, Company, Website
Note: Including Country looks up the country for each IP and can make large exports much slower. Leave it unchecked for faster exports.
Export format and limit
- Export XLSX – Excel spreadsheet (recommended for large data)
- Export CSV – Comma-separated values (opens in Excel, Google Sheets, etc.)
Only the first 15,000 records in the date range are exported (from the start date). For more data, export in multiple date ranges and combine if needed, or use the somdn_max_downloads_to_report_xlsx filter.
Export process
- Set the date range at the top of the Reports page.
- Open the Export Data tab.
- Choose What do you want to export? (All Downloads, All Products, or Specific Products and then select products).
- Under Customize Export Columns, select the columns you want.
- Click Export XLSX or Export CSV.
- Wait for the file to generate (may take 30–60 seconds for large exports).
- The file downloads automatically; open it in your spreadsheet application.
Export preferences (export type, selected products, selected columns) are saved when you click Save at the bottom of the settings page.
Delete Logs tab
The Delete Logs tab lets you remove old download log entries to reduce database size.
- Choose whether to delete by date range or by product.
- Use Preview Count to see how many entries would be deleted.
- Click Delete Logs and confirm in the dialog. Deletion is permanent.
Export any data you need from the Export Data tab before deleting logs.
Using Exported Data
Spreadsheet Analysis
Sort and Filter:
- Sort by date, product, user
- Filter by specific criteria
- Find patterns
Pivot Tables:
- Summarize by product
- Group by date
- Calculate totals
Charts and Graphs:
- Create custom visualizations
- Compare products
- Track trends
Email Marketing
Build Lists:
- Extract email addresses
- Remove duplicates
- Import to email platform
Segmentation:
- Group by product downloaded
- Segment by date
- Target specific interests
CRM Integration
Import Contacts:
- Add to CRM system
- Track lead source
- Follow up on downloads
Lead Scoring:
- Score by download count
- Prioritize engaged leads
- Identify hot prospects
Business Intelligence
Performance Metrics:
- Downloads per product
- Conversion rates
- Popular content
Trend Analysis:
- Growth over time
- Seasonal patterns
- Campaign effectiveness
Custom Export Columns
Adding Custom Columns
Add product price to export:
// Add custom column header
add_filter('somdn_stats_get_headers_all', function($headers) {
$headers['product_price'] = array(
'type' => 'custom',
'title' => 'Product Price',
'content' => 'string'
);
return $headers;
});
// Populate custom column data
add_filter('somdn_stats_get_custom_field_product_price', function($value, $download_id) {
$product_id = get_post_meta($download_id, 'somdn_product_id', true);
$product = wc_get_product($product_id);
return $product ? $product->get_regular_price() : '';
}, 10, 2);
Example Custom Columns
User Role:
add_filter('somdn_stats_get_headers_all', function($headers) {
$headers['user_role'] = array(
'type' => 'custom',
'title' => 'User Role',
'content' => 'string'
);
return $headers;
});
add_filter('somdn_stats_get_custom_field_user_role', function($value, $download_id) {
$user_id = get_post_meta($download_id, 'somdn_user_id', true);
if ($user_id) {
$user = get_user_by('id', $user_id);
return $user ? implode(', ', $user->roles) : 'Guest';
}
return 'Guest';
}, 10, 2);
Download Source:
add_filter('somdn_stats_get_headers_all', function($headers) {
$headers['download_source'] = array(
'type' => 'custom',
'title' => 'Source',
'content' => 'string'
);
return $headers;
});
add_filter('somdn_stats_get_custom_field_download_source', function($value, $download_id) {
$referer = get_post_meta($download_id, 'somdn_referer', true);
if (strpos($referer, 'facebook') !== false) return 'Facebook';
if (strpos($referer, 'google') !== false) return 'Google';
return 'Direct';
}, 10, 2);
Filtering Export Data
By User Type
Export only guest downloads:
add_filter('somdn_get_downloads_data_args', function($args) {
$args['meta_query'] = array(
array(
'key' => 'somdn_user_id',
'value' => '0',
'compare' => '='
)
);
return $args;
});
By Subscription Status
Export only subscribers:
add_filter('somdn_get_downloads_data_args', function($args) {
$args['meta_query'] = array(
array(
'key' => 'somdn_user_subbed',
'value' => '',
'compare' => '!='
)
);
return $args;
});
By Product Category
Export downloads from specific category:
add_filter('somdn_get_downloads_data_args', function($args) {
// Get products in category
$products = get_posts(array(
'post_type' => 'product',
'tax_query' => array(
array(
'taxonomy' => 'product_cat',
'field' => 'slug',
'terms' => 'ebooks'
)
),
'fields' => 'ids',
'posts_per_page' => -1
));
$args['meta_query'] = array(
array(
'key' => 'somdn_product_id',
'value' => $products,
'compare' => 'IN'
)
);
return $args;
});
Performance Optimization
Large Datasets
For sites with many downloads:
Database Optimization:
- Index meta keys
- Regular cleanup
- Archive old data
Export Optimization:
- Limit date ranges
- Export in batches
- Use CSV instead of XLSX
Server Resources:
- Increase PHP memory limit
- Increase max execution time
- Use cron for scheduled exports
Caching
Cache statistics for performance:
add_filter('somdn_cache_stats_duration', function($duration) {
return HOUR_IN_SECONDS; // Cache for 1 hour
});
Scheduled Exports
Automate exports with cron:
add_action('init', function() {
if (!wp_next_scheduled('somdn_daily_export')) {
wp_schedule_event(time(), 'daily', 'somdn_daily_export');
}
});
add_action('somdn_daily_export', function() {
// Export logic here
// Email to admin
});
Troubleshooting
Reports or stats not showing
If the Overview tab is empty or stats don’t display:
- Verify Track Downloads is enabled (sidebar Tracking section).
- Confirm at least one download has occurred since tracking was enabled.
- Check the date range at the top of the Reports page (expand it if needed).
- Clear browser cache and hard-refresh, or click the refresh button next to the date range.
- Check the browser console (F12) for JavaScript errors; try another browser or disable other plugins temporarily.
Export fails or returns no file
If Export XLSX or Export CSV doesn’t produce a file:
- Check PHP memory limit (256MB minimum recommended).
- Increase
max_execution_time(e.g. 300 seconds) if exports are large. - Use a shorter date range or Specific Products with fewer products.
- Select fewer columns under Customize Export Columns (e.g. leave Country unchecked for faster exports).
- Try Export CSV instead of Export XLSX for very large data.
- Check server/PHP error logs for the exact failure.
Export times out
If the export request times out:
- Reduce the date range so fewer than 15,000 records are included.
- Increase PHP
max_execution_timeon the server. - Export in multiple date ranges and combine files manually.
- Use CSV format and fewer columns.
- If the problem persists, contact your host about PHP limits.
Missing or wrong data in export
If the exported file is missing rows or columns:
- Confirm Customize Export Columns includes the columns you need.
- Verify the date range at the top covers the period you expect.
- If using Specific Products, check that the right products are selected.
- Confirm downloads exist in the Overview tab (Recent Downloads) for that range.
- Check for any custom filters or hooks that might alter the export query.
Charts not loading
If the Overview charts (Downloads Over Time, Top Products, etc.) don’t appear:
- Check the browser console (F12) for JavaScript errors.
- Ensure there is download data for the selected date range.
- Hard-refresh the page (Ctrl+F5 / Cmd+Shift+R) or clear cache.
- Try a different browser or disable other plugins to rule out conflicts.
Developer Hooks
Filters
somdn_get_downloads_data_args
Modify export query.
add_filter('somdn_get_downloads_data_args', function($args, $original_args) {
// Customize query
return $args;
}, 10, 2);
somdn_stats_get_headers_all
Add custom export columns.
add_filter('somdn_stats_get_headers_all', function($headers) {
$headers['custom_field'] = array(
'type' => 'custom',
'title' => 'Custom Field',
'content' => 'string'
);
return $headers;
});
somdn_stats_get_custom_field_{header_id}
Populate custom column.
add_filter('somdn_stats_get_custom_field_custom_field', function($value, $download_id) {
// Return custom value
return $value;
}, 10, 2);
somdn_max_downloads_to_report_xlsx
Change export limit.
add_filter('somdn_max_downloads_to_report_xlsx', function($max) {
return 20000; // Increase to 20,000
});
Actions
somdn_stats_export_init
Before export starts.
add_action('somdn_stats_export_init', function() {
// Pre-export processing
});
somdn_stats_export_complete
After export completes.
add_action('somdn_stats_export_complete', function($file_path, $record_count) {
// Post-export processing
}, 10, 2);
Best Practices
Regular Review
- Weekly: Check top products and trends
- Monthly: Review growth and patterns
- Quarterly: Analyze long-term trends
- Annually: Strategic planning
Data Analysis
- Identify patterns: Look for trends
- Compare periods: Month-over-month, year-over-year
- Segment data: By product, user type, source
- Act on insights: Use data to improve
Export Management
- Regular exports: Backup data regularly
- Organized storage: Keep exports organized
- Data retention: Archive old exports
- Security: Protect exported data
Performance
- Monitor size: Watch database growth
- Optimize queries: Use efficient filters
- Cache results: Cache statistics
- Archive old data: Move old logs
Related Topics
- Download Tracking - Data source for statistics
- Email Capture - Captured data in exports
- MailChimp Integration - Newsletter subscriber data
- Settings Reference Pro - Complete Pro settings