WP Statistics 14.16.19 has 24 actions and 131 filters, read directly from its source code on Nov 17, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when WP Statistics fires an action
add_action( 'wp_statistics_after_report_email', function( $result_email, $email_receivers, $final_report_text ) {
// Your code runs here.
}, 10, 3 );
// Change a value WP Statistics is about to use
add_filter( 'wp_statistics_active_user_online', function( $value ) {
// Change $value here.
return $value;
}, 10, 1 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
/** * Filters the post arguments used during an async request. */ apply_filters( "{$this->identifier}_post_args", $args ); -
/** * Filters the post arguments used during an async request. */ apply_filters( "{$this->identifier}_query_args", $args ); -
/** * Filters the post arguments used during an async request. */ apply_filters( "{$this->identifier}_query_url", $url ); -
/** * Number of seconds to sleep between batches. Defaults to 0 seconds, minimum * 0. */ apply_filters( "{$this->identifier}_seconds_between_batches", apply_filters( $this->prefix . '_seconds_between_batches', 0 ) ); -
{$this->identifier}_wp_die
filter/** * Should wp_die be used? */ apply_filters( "{$this->identifier}_wp_die", true ); -
/** * Number of seconds to sleep between batches. Defaults to 0 seconds, minimum * 0. */ apply_filters( "{$this->prefix}_seconds_between_batches", 0 ); -
/** * Disable/Enable User Online */ apply_filters( 'wp_statistics_active_user_online', true ); -
wp_statistics_admin_assets
filter/** * Filter: wp_statistics_admin_assets */ apply_filters( 'wp_statistics_admin_assets', $list ); -
wp_statistics_admin_bar
filter/** * WP Statistics Admin Bar List */ apply_filters( 'wp_statistics_admin_bar', $admin_bar_list, $data, '' ); -
/** * Fire actions after sending email */ do_action( 'wp_statistics_after_report_email', $result_email, $email_receivers, $final_report_text ); -
/** * Create .htaccess to avoid public access. */ apply_filters( 'wp_statistics_enable_htaccess_protection', true ); -
/** * Filter for email template content */ apply_filters( 'wp_statistics_final_text_report_email', $email_content ); -
/** * Filter: wp_statistics_geolocation_download_url */ apply_filters( 'wp_statistics_geolocation_download_url', $defaultUrl ); -
/** * Filter the geolocation provider name. This allows developers to change the * provider used for geolocation. */ apply_filters( 'wp_statistics_geolocation_provider', $geoIpProvider ); -
/** * Trigger action after validating the hit request parameters. */ do_action( 'wp_statistics_invalid_hit_request', $isValid, IP::getIP() ); -
wp_statistics_loaded
action/** * wp-statistics loaded */ do_action( 'wp_statistics_loaded' ); -
/** * How many minutes a visitor counts as "online" for. */ apply_filters( 'wp_statistics_online_visitors_timeframe', 5 ); -
/** * Filters a For Return WP Statistics Option */ apply_filters( "wp_statistics_option_{$option_name}", $options[$option_name] ); -
/** * Filter whether to allow caching in WP Statistics Query. */ apply_filters( 'wp_statistics_query_allow_caching', $flag, $this ); -
/** * Email receivers */ apply_filters( 'wp_statistics_report_email_receivers', Option::getEmailNotification() ); -
/** * Filter to modify email subject */ apply_filters( 'wp_statistics_report_email_subject', self::getEmailSubject() ); -
/** * Filter for enable/disable sending email by template. */ apply_filters( 'wp_statistics_report_email_template', true ); -
/** * This Filter Used For Custom $_SERVER String */ apply_filters( 'wp_statistics_sanitize_user_ip', sanitize_text_field($ip) ); -
/** * Trigger a WordPress action hook after saving the visitor relationship. This * allows for custom actions to be executed. */ do_action( 'wp_statistics_save_visitor_relationship', $page_id, $visitor_id, $insert_id ); -
wp_statistics_show_admin_bar
filter/** * Filters whether to show the WordPress admin bar. */ apply_filters( 'wp_statistics_show_admin_bar', $showAdminBar ); -
wp_statistics_table_prefix
filter/** * Filter the prefix segment used between wpdb prefix and table name. */ apply_filters( 'wp_statistics_table_prefix', 'statistics', $tableName ); -
/** * Filters the list of trusted proxy IPs / CIDR ranges whose forwarding headers * are honoured when resolving the visitor IP. */ apply_filters( 'wp_statistics_trusted_proxies', self::$private_SubNets ); -
do_action( "wp_statistics_{$this->getCurrentPage()}_{$this->getCurrentTab()}_template", $args ); -
https_local_ssl_verify
filterapply_filters( 'https_local_ssl_verify', false ); -
do_action( 'wp_statistics_after_admin_page_title' ); -
apply_filters( 'wp_statistics_enable_help_icon', true ); -
apply_filters( 'wp_statistics_enable_upgrade_to_bundle', true ); -
apply_filters( "wp_statistics_localize_{$handle}", $localize ); -
do_action( "{$this->identifier}_cancelled" ); -
do_action( "{$this->identifier}_completed" ); -
apply_filters( "{$this->identifier}_default_time_limit", 20 ); -
apply_filters( "{$this->identifier}_memory_exceeded", $return ); -
{$this->identifier}_paused
actiondo_action( "{$this->identifier}_paused" ); -
apply_filters( "{$this->identifier}_queue_lock_time", $lock_duration ); -
{$this->identifier}_resumed
actiondo_action( "{$this->identifier}_resumed" ); -
apply_filters( "{$this->identifier}_time_exceeded", $return ); -
plugin_locale
filterapply_filters( 'plugin_locale', determine_locale(), 'wp-statistics' ); -
apply_filters( "wp_statistics_{$handle}_loading_strategy", $strategy ); -
apply_filters( "wp_statistics_{$pageKey}_{$tabKey}_locked", $tab['locked'] ?? false ); -
apply_filters( "wp_statistics_{$pageKey}_{$tabKey}_tooltip", $tab['tooltip'] ?? '' ); -
apply_filters( "wp_statistics_{$this->getCurrentPage()}_{$this->getCurrentTab()}_data", [] ); -
apply_filters( "wp_statistics_{str_replace('-','_',$this->pageSlug)}_filters", $this->filters ); -
apply_filters( "wp_statistics_{str_replace('-','_',$this->pageSlug)}_views", $this->views ); -
apply_filters( 'wp_statistics_active_custom_events', $activeCustomEvents ); -
wp_statistics_active_pages
filterapply_filters( 'wp_statistics_active_pages', true ); -
apply_filters( 'wp_statistics_active_visitors', true ); -
wp_statistics_admin_notices
filterapply_filters( 'wp_statistics_admin_notices', $this->coreNotices ); -
apply_filters( 'wp_statistics_admin_page_list', $admin_list_page ); -
wp_statistics_ajax_list
filterapply_filters( 'wp_statistics_ajax_list', $list ); -
apply_filters( 'wp_statistics_allowed_protocols', $customProtocols ); -
wp_statistics_assets_handle
filterapply_filters( 'wp_statistics_assets_handle', $handle ); -
apply_filters( 'wp_statistics_async_background_process_ajax_interval', 5000 ); -
wp_statistics_cache_status
filterapply_filters( 'wp_statistics_cache_status', $use ); -
apply_filters( 'wp_statistics_coefficient_per_visitor', self::$coefficient ); -
wp_statistics_cron_schedules
filterapply_filters( 'wp_statistics_cron_schedules', $schedules ); -
wp_statistics_current_page
filterapply_filters( 'wp_statistics_current_page', $current_page ); -
apply_filters( 'wp_statistics_current_timestamp', self::getCurrentDate('U') ); -
apply_filters( 'wp_statistics_custom_event_name_validation', $isValid, $name ); -
wp_statistics_custom_events
filterapply_filters( 'wp_statistics_custom_events', [] ); -
apply_filters( "wp_statistics_data_{child-method-name}_args", $args ); -
apply_filters( 'wp_statistics_date_time_range', $date_range ); -
apply_filters( 'wp_statistics_days_ago_request', self::$time_ago_days ); -
wp_statistics_email_header
filterapply_filters( 'wp_statistics_email_header', $emailHeader ); -
wp_statistics_email_logo
filterapply_filters( 'wp_statistics_email_logo', WP_STATISTICS_URL . 'assets/images/logo-statistics-header-blue.png' ); -
wp_statistics_email_logo_url
filterapply_filters( 'wp_statistics_email_logo_url', get_bloginfo('url') ); -
apply_filters( 'wp_statistics_email_template_layout', $email_template ); -
wp_statistics_email_title
filterapply_filters( 'wp_statistics_email_title', $emailTitle ); -
apply_filters( 'wp_statistics_enqueue_chartjs', false ); -
apply_filters( 'wp_statistics_excluded_custom_events', [] ); -
wp_statistics_exclusion
filterapply_filters( 'wp_statistics_exclusion', $exclude, $visitorProfile ); -
wp_statistics_exclusion_list
filterapply_filters( 'wp_statistics_exclusion_list', array_keys(Exclusion::exclusion_list()) ); -
apply_filters( 'wp_statistics_exclusion_robots', $robots ); -
apply_filters( 'wp_statistics_exporter_importer_drivers', $this->drivers ); -
apply_filters( 'wp_statistics_google_auth_disconnect_url', '' ); -
apply_filters( 'wp_statistics_google_auth_redirect_url', '' ); -
apply_filters( 'wp_statistics_google_auth_test_url', '' ); -
apply_filters( 'wp_statistics_google_auth_url', '' ); -
wp_statistics_hash_ip
filterapply_filters( 'wp_statistics_hash_ip', $truncatedHash ); -
apply_filters_deprecated( 'wp_statistics_hashed_asset_dir', [path_join($this->uploadsDir, $this->hashedFileName), $this->uploadsDir, $this->hashedFileName], '14.16.7', '', 'The obfuscator no longer writes a copy of the tracker into wp-content/uploads/.' ); -
apply_filters( 'wp_statistics_hashed_asset_name', $this->hashedFileName, $this->inputFileDir ); -
apply_filters_deprecated( 'wp_statistics_hashed_asset_root', [$this->uploadsDir], '14.16.7', '', 'The obfuscator no longer writes a copy of the tracker into wp-content/uploads/.' ); -
wp_statistics_header_url
filterapply_filters( 'wp_statistics_header_url', WP_STATISTICS_URL . 'assets/images/' . ($isPremium ? 'wp-statistics-premium.svg' : 'white-header-logo.svg') ); -
wp_statistics_html_comment
filterapply_filters( 'wp_statistics_html_comment', true ); -
apply_filters( 'wp_statistics_injection_patterns', $patterns ); -
apply_filters( 'wp_statistics_internal_custom_events', [] ); -
apply_filters( 'wp_statistics_ip_detection_preview', $ip_method ); -
apply_filters( 'wp_statistics_js_check_time_interval', 60000 ); -
apply_filters( 'wp_statistics_location_column_value', $result, $location, $region, $city ); -
apply_filters( 'wp_statistics_mail_attachments', $this->attachments, $this ); -
wp_statistics_meta_box_class
filterapply_filters( 'wp_statistics_meta_box_class', self::$namespace . str_replace("-", "_", $meta_box), $meta_box ); -
apply_filters( 'wp_statistics_meta_box_more_button', true ); -
wp_statistics_metabox_list
filterapply_filters( 'wp_statistics_metabox_list', self::$metaboxes ); -
apply_filters( 'wp_statistics_mini_chart_metric', $metric ); -
apply_filters( 'wp_statistics_notice_db_row_threshold', 500000 ); -
apply_filters( 'wp_statistics_oath_authentication_status', false ); -
apply_filters( "wp_statistics_option_{$setting_name}_{$option_name}", $options[$option_name] ); -
apply_filters( "wp_statistics_option_{$settingName}", $result ); -
wp_statistics_options
filterapply_filters( 'wp_statistics_options', $wp_statistics_options ); -
wp_statistics_page_uri
filterapply_filters( 'wp_statistics_page_uri', $page_uri ); -
apply_filters( 'wp_statistics_pages_entry-pages_locked', true ); -
apply_filters( 'wp_statistics_pages_exit-pages_locked', true ); -
apply_filters( 'wp_statistics_pages_information', $pages ); -
do_action( 'wp_statistics_pages_overview_entry_pages_widget' ); -
do_action( 'wp_statistics_pages_overview_exit_pages_widget' ); -
apply_filters( 'wp_statistics_pages_where_type_query', $query, $id, $type ); -
apply_filters( 'wp_statistics_privacy_audits_list', $audits ); -
apply_filters( 'wp_statistics_privacy_faqs_list', $faqs ); -
apply_filters( 'wp_statistics_privacy_policy_content', $content ); -
wp_statistics_record_visitor
actiondo_action( 'wp_statistics_record_visitor', $visitor_id ); -
apply_filters( 'wp_statistics_referrals_campaigns_locked', true ); -
apply_filters( 'wp_statistics_referrals_google-search_locked', true ); -
wp_statistics_referrals_list
filterapply_filters( 'wp_statistics_referrals_list', $result ); -
do_action( 'wp_statistics_referrals_overview_entry_pages_widget' ); -
apply_filters( 'wp_statistics_referrals_overview_glance_metrics', $metrics ); -
do_action( 'wp_statistics_referrals_overview_gsc_widgets' ); -
do_action( 'wp_statistics_referrals_overview_source_categories_widget' ); -
apply_filters( 'wp_statistics_referrals_utm-performance_locked', true ); -
apply_filters( 'wp_statistics_remote_request_args', $args ); -
apply_filters( 'wp_statistics_remote_request_params', $params ); -
apply_filters( 'wp_statistics_request_days_format', $args['format'] ); -
apply_filters( 'wp_statistics_request_signature_enabled', true ); -
apply_filters( 'wp_statistics_resolve_page_from_uri', $pageUri ); -
wp_statistics_save_exclusion
actiondo_action( 'wp_statistics_save_exclusion', $exclusion, $wpdb->insert_id ); -
wp_statistics_save_page
actiondo_action( 'wp_statistics_save_page', $page_id, $page ); -
wp_statistics_save_settings
actiondo_action( 'wp_statistics_save_settings' ); -
wp_statistics_save_visitor
actiondo_action( 'wp_statistics_save_visitor', $visitor_id, $visitor, $visitorProfile->getCurrentPageType() ); -
apply_filters( 'wp_statistics_schedule_db_maint_days', 30 ); -
apply_filters( 'wp_statistics_search_engine_list', $engines ); -
apply_filters( 'wp_statistics_show_taxonomy_hits', true ); -
apply_filters( 'wp_statistics_single_content_analytics_glance_metrics', $metrics, $postId ); -
do_action( 'wp_statistics_single_content_search_console_widgets' ); -
apply_filters( 'wp_statistics_source_channels_list', $channels ); -
wp_statistics_truncate_table
actiondo_action( 'wp_statistics_truncate_table', str_ireplace(self::prefix() . 'statistics_', "", $table_name) ); -
do_action( 'wp_statistics_update_visitor_hits', $visitor_id, $same_visitor ); -
apply_filters( 'wp_statistics_use_trusted_proxy_resolution', false ); -
apply_filters( 'wp_statistics_user_http_agent', isset($_SERVER['HTTP_USER_AGENT']) ? sanitize_text_field(wp_unslash($_SERVER['HTTP_USER_AGENT'])) : '' ); -
wp_statistics_user_id
filterapply_filters( 'wp_statistics_user_id', $user_id ); -
wp_statistics_user_ip
filterapply_filters( 'wp_statistics_user_ip', sanitize_text_field($ip) ); -
wp_statistics_user_referer
filterapply_filters( 'wp_statistics_user_referer', $referred ); -
apply_filters( 'wp_statistics_visitor_data_before_update', $data, $visitorProfile ); -
apply_filters( 'wp_statistics_visitor_information', $visitor ); -
apply_filters( 'wp_statistics_visitors_overview_glance_metrics', $metrics ); -
do_action( 'wp_statistics_visitors_overview_hourly_traffic_widget' ); -
apply_filters( 'wp_statistics_visitors_search-terms_locked', true );
Generated from WP Statistics's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Can't find the right hook?
We can build the customisation for you. Describe what you need: