Get a Page Stats List

You can make a list from Page Stats, including ID, Count, and Page Slug, by the following code:

<?php
global $wpdb, $table_prefix;
$page_slug = '%about%';
$pages     = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM `{$table_prefix}statistics_pages` WHERE `uri` LIKE %s", $page_slug ) );

echo '<table border="1"><tr><td>ID</td><td>Count</td><td>Slug</td></tr>';
foreach ( $pages as $page ) {
	echo "<tr><td>{$page->id}</td><td>{$page->count}</td><td>{$page->uri}</td></tr>";
}
echo '</table>';
Let’s get started
Take your business to next level

Become part of our growing family of +600,000 users and get the tools you need to make smart choices for your website. Simple, powerful insights are just a click away.