cabrerahector / wordpress-popular-posts

WordPress Popular Posts - A highly customizable WordPress widget that displays your most popular posts.
https://wordpress.org/plugins/wordpress-popular-posts/
GNU General Public License v2.0
280 stars 83 forks source link

WPP doesn't count frontpage views #215

Closed jh-isw closed 5 years ago

jh-isw commented 5 years ago

Hello, thanks for the useful plugin. I have a question: is it possible to count views of the front page? WPP counts sub-pages and posts, but not the index page.

Thanks in advance

cabrerahector commented 5 years ago

Hi there,

Yes, it is possible. However, the homepage being excluded by the plugin is by design and mainly for two reasons:

  1. The homepage is the single most visited page of 99.99% of the websites out there. Because of that, the homepage would be perpetually at the top of the popular posts list which wouldn't be really helpful to visitors (and why would visitors want to see the homepage on the list anyways?)
  2. Tracking the views count of the homepage would mean -as obvious as this might sound- writing to the database every single time someone lands there. This can have an impact on the performance of the site because -as explained before- this is usually the most viewed page of any site, and many views = many database writes.
jh-isw commented 5 years ago

Thanks for your quick reply. Mainly, I started using WPP because it's interesting to me, how often a post gets viewed. Now I would like to see any page hit including the front page. I will have a look, if another plugin suits this need better, otherwise come back here and ask for how it's done to switch it on in your plugin.

Greetings, Jan

cabrerahector commented 5 years ago

Alright, if you have any further questions don't hesitate to ask.