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
279 stars 83 forks source link

Exclude pages, don't count from bots and object cache time #255

Closed arhimed-me-account closed 4 years ago

arhimed-me-account commented 4 years ago

Hello, I have few questions and one wish

  1. Can we exclude page from being counted in post views
  2. Can we block views from bot's
  3. Can we get filter here so we can setup this number to higher value, or you can make settings in plugin settings for this value http://prntscr.com/ro3jrp

Best regards Nikola

cabrerahector commented 4 years ago

Hi there,

Can we exclude page from being counted in post views

Yes you can, there's a filter hook available for this already: wpp_trackable_post_types.

Can we block views from bot's

WordPress Popular Posts uses AJAX (JavaScript) to track views. One of the reasons why it's like this is precisely to prevent bots from inflating the views count: the vast majority of them won't even bother to parse/execute JS when crawling a webpage for a variety of reasons so visits from bots won't have a significant impact (if any) of your site's overall statistics.

Can we get filter here so we can setup this number to higher value, or you can make settings in plugin settings for this value http://prntscr.com/ro3jrp

I might do this in a future release so thanks for the suggestion.

arhimed-me-account commented 4 years ago

Hi thanks for your replay.

Thanks for your fast replay as always!

Main problem is because of AJAX usage ... I have a lot of boots crawling my site, because it is news site and i have a hundreds of calls per minute ...

I will change ti now manual to match 5min and on next release when you make filter, I will use it.. You think that 5 min is ok, i have w3 total cache with object caching I hope it will not produce any interferiance.

Regards!

cabrerahector commented 4 years ago

Thanks for your fast replay as always!

Don't worry, glad I can be of help.

Main problem is because of AJAX usage ... I have a lot of boots crawling my site, because it is news site and i have a hundreds of calls per minute ...

These calls are likely being caused by visitors and not by bots. As previously mentioned, only Googlebot and a handful of other bots will execute AJAX calls.

If your sites gets a lot of visits per hour, you may also want to consider limiting the amount of data WPP stores on your database to keep it from growing too large which can have an impact on performance. Check out the Data Logging section under Performance for more details.

You think that 5 min is ok, i have w3 total cache with object caching I hope it will not produce any interferiance.

Yes, 5 minutes should be fine.

dnikola commented 4 years ago

Hi,

sorry for delay in replay. I opened this ticket from my team account and didn't noticed that, because of that didn't get notification on replay :)

These calls are likely being caused by visitors and not by bots. As previously mentioned, only Googlebot and a handful of other bots will execute AJAX calls.

I tried to block them to don't follow rest api rout with roboots.txt file bit still getting a lot of hits :-(

If your sites gets a lot of visits per hour, you may also want to consider limiting the amount of data WPP stores on your database to keep it from growing too large which can have an impact on performance. Check out the Data Logging section under Performance for more details.

Yes, that was first I checked. I only store last 7 days.

cabrerahector commented 4 years ago

I tried to block them to don't follow rest api rout with roboots.txt file bit still getting a lot of hits :-(

No idea to be honest. Might want to ask about this on WordPress' Support Forums. Maybe someone there can give you ideas on preventing bots from accessing your REST API endpoints.

nickasd commented 3 years ago

Thanks for this awesome plugin. I installed it together with Post Views Counter to see which I like better. The trending posts graph with the ability to set the timeframe is something which the other plugin doesn‘t offer, so at the moment I prefer this one. But I‘m wondering why the two plugins show different view counts: Wordpress Popular Posts shows far less views than Post Views Counter, even when disabling bots and enabling Fast AJAX JavaScript on the latter. Does anybody have any idea why the two differ? Is this difference caused by bots or something else?

cabrerahector commented 3 years ago

Hi @nickasd,

Thanks for this awesome plugin.

Thank you for the kind words!

Does anybody have any idea why the two differ?

Well it's hard to say without more details, see: Popular Posts View Count Different than Jetpack?

On WPP's side you'll want to check these FAQs to make sure that the plugin works as expected on your website:

Aside from that -again- you'll want to share more details (your site's URL for example, active plugins, etc) so I can provide more guidance.

nickasd commented 3 years ago

Thanks a lot, the first link dissipated all my doubts. Again, thanks for your wonderful work!