How to useDownloads Statistics for Wordpress


The plugin allows track files downloads in specific site’s relative path by sending statistics to Google Analytics and the Local Database.

General Settings

Relative site path

Type relative site’s path to monitor it’s file downloads.

Note: Choose path more precisely. Otherwise, it might degrade performance of downloading site’s elements.

Statistics event label

It is possible to use URL’s arguments as a statistics label. Label will be formed from a list of request’s arguments using the argument separator and the value delimiter. So e.g. for URL ‘http://yoursite.com/page?arg1=v1&arg2=v1’ label will be ‘arg1:v1,arg2:v2’.

Send mode

By default statistic sending is postponed to preserve site performance. If there is any trouble with WordPress’s scheduler (WP Cron is disabled or broken on your website) just set mode to ‘Immediately’.

Note: There is the alternative way how to setup WP Cron on your site.

Google Analytics Settings

If enabled, statistics will be sent to Google Analytics account by specified tracking ID as events with specified event category, URI as event action and URL arguments as event label if it is enabled in general settings.

Enable

Set this checkbox to enable statistics sending.

Tracking ID

Type your Google Analytics’s tracking ID.

Event category

Change event category if needed.

Custom dimension for client ID

Custom dimension index to store client ID for debug purposes e.g. user’s IP. Optional.

Local Database Settings

If enabled, statistics will be written to the local database table with name ‘wp_seraph_dlstat’. Use any databese viewer or editor to see events. It is used generally for debug purposes only or if there is no any other way.

Enable

Set this checkbox to enable statistics writing.

Data

Set this checkbox and all data will be erased. If ‘Enabled’ is unchecked ‘wp_seraph_dlstat’ table will be deleted as well.

API

There are a set of filters and actions to hook.

seraph_dlstat_prepare_events filter

seraph_dlstat_event_label_format filter

seraph_dlstat_items_download_requested action

seraph_dlstat_ga_prepare_event filter

Requirements

  • WordPress 4.9 or higher.
  • PHP 5.4 or higher.
  • Browser (Google Chrome, Firefox, IE).

Leave a Reply