Skip to main content
PRO Only
Pro Feature

This feature is only available in the Pro edition. Upgrade to Pro to access download tracking.

Pro: Download Tracking

Download Tracking logs every free download with detailed information about who downloaded what, when, and from where. This data powers analytics, download limits, and email capture features.

What is Download Tracking?

Download Tracking creates a detailed log entry for each download containing:

  • User Information: User ID, email, name, phone, company, website
  • Download Details: Product ID, variation ID, files downloaded
  • Metadata: IP address, timestamp, user agent
  • Source: Where the download originated (product page, shortcode, etc.)

How It Works

Automatic Logging

Every time someone downloads a file:

  1. Download request is validated
  2. User information is collected
  3. Log entry is created in database
  4. Download proceeds
  5. Statistics are updated

This happens automatically with no user interaction required.

Data Storage

Download logs are stored as custom posts (somdn_tracked post type) with metadata:

  • Post Title: Auto-generated (e.g., "Download #12345")
  • Post Date: Download timestamp
  • Post Meta: All user and download information

This structure allows efficient querying for statistics and exports.

Enabling Download Tracking

Settings Location

Go to WP Enhanced > Free Download Woo, then click Tracking in the sidebar

Enable Tracking

  1. Check "Enable download tracking"
  2. Save settings
  3. Tracking begins immediately

Automatic Activation

Tracking is automatically enabled when you enable:

  • Download Limits
  • Email Capture

These features require tracking data to function.

What Data is Tracked?

Always Tracked

These fields are always captured:

  • User ID: WordPress user ID (0 for guests)
  • Product ID: Downloaded product
  • Variation ID: Product variation (if applicable)
  • Download Files: Array of downloaded files
  • IP Address: User's IP address
  • Timestamp: Date and time of download

Optional Fields (Email Capture)

When email capture is enabled, additional fields are collected:

  • Email Address: Required
  • First Name: Optional
  • Last Name: Optional
  • Phone Number: Optional
  • Company: Optional
  • Website: Optional

See Email Capture for configuration.

Viewing Download Logs

Admin Interface

View individual download logs:

  1. Go to WP Enhanced > Free Download Woo, then click Tracking in the sidebar
  2. Scroll to "Tracked Downloads" section
  3. Click any download to view details

Placeholder: Screenshot of download log details

Log Details

Each log shows:

  • Download ID
  • User information (name, email, phone, etc.)
  • Product name and ID
  • Variation (if applicable)
  • Downloaded files list
  • IP address
  • Download date and time

Filtering Logs

Filter logs by:

  • Date range
  • Product
  • User
  • Email address

Use WordPress admin search to find specific downloads.

Statistics Dashboard

Overview

The Statistics tab provides analytics:

  • Today's Downloads: Count for current day
  • This Week: Last 7 days
  • This Month: Last 30 days
  • Top 10 Products: Bar chart of most downloaded

Placeholder: Screenshot of statistics dashboard

Download Reports

View download trends:

  • 7 Days: Daily downloads for last week
  • 30 Days: Daily downloads for last month
  • 90 Days: Daily downloads for last quarter
  • 180 Days: Daily downloads for last 6 months

Charts show download volume over time.

See Statistics & Reports for details.

Exporting Data

Export Options

Export download data to:

  • CSV: Comma-separated values
  • XLSX: Excel spreadsheet

Maximum 15,000 records per export.

Export Configuration

Customize exports:

  1. Select date range
  2. Choose products (all or specific)
  3. Select columns to include
  4. Click "Export"

Placeholder: Screenshot of export settings

Available Columns

Export columns include:

  • Download ID
  • Date/Time
  • User ID
  • User Email
  • User Name
  • Product ID
  • Product Name
  • Variation ID
  • Variation Name
  • Files Downloaded
  • IP Address

See Statistics & Reports for export details.

Privacy and GDPR

Personal Data

Download tracking collects personal data:

  • Email addresses
  • Names
  • Phone numbers
  • IP addresses

GDPR Compliance

To comply with GDPR:

  1. Privacy Policy: Update your privacy policy to mention download tracking
  2. Consent: Obtain consent before collecting data (use email capture consent checkbox)
  3. Data Access: Provide users access to their download history
  4. Data Deletion: Delete user data upon request

User Download History

Users can view their own downloads:

  1. Go to My Account > Downloads
  2. See "Free Downloads History" section
  3. View all their free downloads

See Account History for details.

Data Retention

Download logs are retained indefinitely by default. You can:

  • Manually delete old logs
  • Use custom code to auto-delete after X days
  • Export and archive data periodically

Use Cases

Analytics

Track download performance:

  • Which products are most popular?
  • What times of day see most downloads?
  • Which marketing campaigns drive downloads?
  • How many unique users download?

Lead Generation

Build email lists:

  • Collect emails via download tracking
  • Export emails for marketing
  • Integrate with MailChimp
  • Segment by downloaded product

User Behavior

Understand your audience:

  • What content do users want?
  • Do users download multiple products?
  • Which products lead to conversions?
  • What's the download-to-purchase ratio?

Abuse Prevention

Identify problematic behavior:

  • Excessive downloads from single IP
  • Bot traffic patterns
  • Suspicious email addresses
  • Download limit violations

Integration with Other Features

Download Limits

Tracking enables download limits:

  • Limits check tracking data
  • Count downloads per user/IP
  • Enforce daily/weekly/monthly quotas
  • Display remaining downloads

See Download Limits for details.

Email Capture

Tracking stores captured emails:

  • Email required for guests
  • Optional fields (name, phone, etc.)
  • Stored in download log
  • Available for export

See Email Capture for details.

MailChimp Integration

Tracking triggers MailChimp subscriptions:

  • Subscribe users after download
  • Tag by product downloaded
  • Update existing subscribers
  • Track subscription status

See MailChimp Integration for details.

Account History

Tracking powers account page:

  • Users see their download history
  • List of all downloads
  • Download dates
  • Re-download links

See Account History for details.

Performance Considerations

Database Impact

Each download creates:

  • 1 custom post
  • 10-15 post meta entries

For high-volume sites (1000+ downloads/day):

  • Monitor database size
  • Optimize database regularly
  • Consider archiving old logs
  • Use caching for statistics

Query Optimization

Statistics queries are optimized:

  • Indexed by date
  • Cached results
  • Efficient meta queries
  • Pagination for large datasets

Memory Limits

Export limits prevent memory issues:

  • Maximum 15,000 records per export
  • Chunked processing
  • Memory-efficient queries
  • Configurable via filter

Troubleshooting

Downloads Not Being Tracked

If downloads aren't logged:

  1. ✅ Verify tracking is enabled in settings
  2. ✅ Check download actually succeeded
  3. ✅ Look for PHP errors in debug log
  4. ✅ Verify database write permissions
  5. ✅ Check for plugin conflicts

Missing User Information

If user data is incomplete:

  1. ✅ Check if user was logged in
  2. ✅ Verify email capture is configured
  3. ✅ Check required fields settings
  4. ✅ Look for JavaScript errors
  5. ✅ Test with different browsers

Statistics Not Updating

If stats don't update:

  1. ✅ Clear all caches
  2. ✅ Verify tracking is enabled
  3. ✅ Check date range filters
  4. ✅ Look for database errors
  5. ✅ Regenerate statistics

Export Fails

If export doesn't work:

  1. ✅ Check PHP memory limit (256MB minimum)
  2. ✅ Reduce date range
  3. ✅ Select fewer columns
  4. ✅ Check server error logs
  5. ✅ Try CSV instead of XLSX

Developer Hooks

Actions

somdn_count_download_post_success Fires after download log is created.

add_action('somdn_count_download_post_success', function($post_id, $post_info) {
// $post_id = Download log post ID
// $post_info = Array of download data

// Custom processing
error_log('Download logged: ' . $post_id);
}, 10, 2);

Filters

somdn_are_downloads_tracked Override whether tracking is enabled.

add_filter('somdn_are_downloads_tracked', function($tracked) {
// Disable tracking for specific conditions
if (is_user_logged_in() && current_user_can('administrator')) {
return false; // Don't track admin downloads
}
return $tracked;
});

somdn_get_downloads_data_args Modify statistics query arguments.

add_filter('somdn_get_downloads_data_args', function($args, $original_args) {
// Customize query
$args['posts_per_page'] = 1000;
return $args;
}, 10, 2);

Best Practices

Data Collection

  • Minimal data: Only collect what you need
  • Clear consent: Explain what data is collected
  • Secure storage: Protect personal information
  • Regular cleanup: Archive or delete old logs

Privacy

  • Privacy policy: Document data collection
  • User access: Let users view their data
  • Data deletion: Honor deletion requests
  • Anonymization: Consider anonymizing old data

Performance

  • Monitor size: Check database growth
  • Optimize queries: Use indexes and caching
  • Archive old data: Move old logs to separate table
  • Limit exports: Don't export millions of records

Analytics

  • Regular review: Check statistics weekly
  • Identify trends: Look for patterns
  • Act on insights: Use data to improve offerings
  • A/B testing: Test different approaches