Black Fridayfrom $34.30/yr1 site · 5 sites $83.30 · unlimited sites $139.3030% off every planNov 20–Dec 1 (UTC)

Filters

slimstat_custom_wpdb

Applies to SlimStat 6.1.2 and SlimStat Pro 3.1.1 · checked

This filter receives the analytics database connection, initially WordPress’s $wpdb. Return a compatible wpdb connection. A provider must preserve the intended table prefix and site ownership. New Pro connections follow the site’s database context; verified takeover of the retired Custom DB add-on preserves its existing prefix, including an empty prefix. Do not silently substitute another database on connection failure. Tracking, reporting, schema work and maintenance must use the same connection. Pro provides a settings-based external database option.

Callback signature

add_filter( 'slimstat_custom_wpdb', function ( $db ) {
    return $db;
} );

Test callbacks on staging with your tracking mode and report context. See the database API and building an add-on.

See legacy Custom DB takeover and outage behavior before changing an existing provider. Tracking, maintenance and privacy erasure must use the selected analytics connection.