koko-analytics
koko-analytics copied to clipboard
Feature suggestion: Show pageviews column on post/page overview pages
I'd love to see Hits column in admin post/page list just to have brief overview on how many times the articles have been read. WP Statistics plugin has such feature, just simple numbler would be enough, chart in column is not necessary.
Please vote on this feature suggestion using :+1: or :-1: below.
Hmm, interesting. For what time period are those hits though? Should it be configurable from the UI?
Verstuurd vanaf mijn iPhone
Op 5 apr. 2020 om 08:59 heeft svatoupravdu [email protected] het volgende geschreven:
I'd love to see Hits column in admin post/page list just to have brief overview on how many times the articles have been read. WP Statistics plugin has such feature, just simple numbler would be enough, chart in column is not necessary.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
I like this idea, too! Maybe we could have an option to choose a default time period in the settings and use it for both the main chart view and this new column in the post/page list?
For me personally I don't need time period setting, total hits since ever is enough, just to keep things silly simple. Thanks!
I support this. Even if possible, @dannyvankooten could implement a shortcode to show the views on the frontend per post.
I've been collecting stats for last 6 months and I still miss the column with total hits count most. The column could still be optional though, there's an option pane above posts list in admin which could bear such checkbox.
Never mind, I achieved my goal by installing WP Code Snippets plugin and enabling this snippet for admin area only:
add_filter('manage_post_posts_columns', function($columns) {
return array_merge($columns, ['pageviews' => __('Pageviews', 'textdomain')]);
});
add_action('manage_post_posts_custom_column', function($column_key, $post_id) {
global $wpdb;
if ($column_key == 'pageviews') {
echo $wpdb->get_var(
$wpdb->prepare( "SELECT SUM(pageviews) FROM wp_koko_analytics_post_stats WHERE id = $post_id" )
);
}
}, 10, 2);
https://wordpress.org/support/topic/counter-behind-the-postings/#post-14611944