Filters
Change what SlimStat records, stores and queries before it happens.
| Filter | What it does |
|---|---|
| slimstat_custom_wpdb | Replace the database connection SlimStat writes to, so stats can live in a separate database or under custom table names. |
| slimstat_db_filters_normalized | Modify the normalised filter array built from the SlimStat dropdown menus, after parsing and before the report query runs. |
| slimstat_db_pre_filters | Modify the filters an administrator has set through the SlimStat dropdown menus, before they reach the database query. |
| slimstat_filter_pageview_data_js | Adjust the raw data the JavaScript tracker receives from the browser, before SlimStat parses it into a pageview record. |
| slimstat_filter_pageview_stat | Change pageview data immediately before it is stored. |
| slimstat_filter_pageview_stat_init | Initialise the array holding everything about a pageview being tracked. |
| slimstat_filter_pre_tracking | Switch the SlimStat tracker off for conditions the settings screen does not cover, evaluated in PHP before a pageview is recorded. |
| slimstat_filter_pre_tracking_js | Switch off the SlimStat JavaScript tracker for conditions the settings screen does not cover, without disabling server-side tracking with it. |
| slimstat_get_country | This filter is no longer applied anywhere in SlimStat, so a callback on it never runs. |
| slimstat_get_results_sql | Rewrite the SQL behind any SlimStat report: add to the SELECT, change the WHERE, or re-order the results. |
| slimstat_get_var_sql | Modify the SQL that retrieves a single aggregated value from the WP SlimStat tables, before the query runs. |
| slimstat_init_options | Applied to the SlimStat settings array on init, so a third-party tool can change plugin options in code rather than through the settings screen. |
| slimstat_js_params | Change the parameters passed to the JavaScript tracker via wp_localize_script, including the encoded copy of the plugin settings. |
| slimstat_maxmind_path | Set the filesystem path SlimStat uses to load and store the MaxMind GeoIP database, which is what a network install needs to share one copy. |
| slimstat_report_header_buttons | Add your own buttons to a SlimStat report header, which is how the Export to Excel feature adds its control. |
| slimstat_reports_info | Add, remove or edit the reports available in WP SlimStat through a single filter. |
| slimstat_set_visit_cookie | Decide per pageview whether SlimStat sets its visit cookie, which is how sites check an opt-out before tracking under European privacy law. |