slimstat_filter_pageview_stat
Applies to SlimStat 6.0.0 · checked
The final pageview filter receives one argument, the pageview array, before storage. Return the modified array; returning an empty array rejects the pageview. Browser and page arrays are not separate arguments.
Callback signature
add_filter( 'slimstat_filter_pageview_stat', function ( $stat ) {
if ( empty( $stat ) ) {
return $stat;
}
$stat['notes'][] = 'custom integration';
return $stat;
} );
Test callbacks on staging with your tracking mode and report context. See the database API and building an add-on.
At this hook, notes is an array of strings. Append an entry; the tracker serializes the array before storage. Return an incoming empty array unchanged if another filter has already rejected the pageview.