Description
Filter hook to exclude terms from user tracking stats display table.
Parameters
$excludes
(array)(required) An array of excluded strings that should be excluded from displayed results.
Usage
add_filter( 'wpmem_ut_display_exclude', 'my_wpmem_ut_excluded_terms' ); function my_wpmem_ut_excluded_terms( $excludes ) { /* * Add any specific strings that would appear in results * you want to be excluded from displayed results. */ $excludes[] = '/wp-content/uploads/'; // This would exclude any result with "/wp-content/uploads/" in the URL. $excludes[] = '?action=register'; // This would exclude anything with a query string beginning with "action=register". // Return the array of strings to exclude. return $excludes; }
Notes
The tracking extension records an entry anytime the WP action wp_head is fired. Depending on the details of your complete application (WP, theme, plugins, etc), wp_head may be fired for actions that are not necessarily a page view.
This filter allows you to “clean up” any extraneous results in your tracking display by excluding certain strings in the recorded URL. For example, if your application returns results that consistently display direct URLs to your /wp-content/uploads/ folder but you do not want to view those in the table results, you can add this in a filter to exclude from display any URLs containing “/wp-content/uploads/”.
Source
wpmem_ut_display_exclude is located in includes/admin/views/visits.php