post_views_count question

Posted in: Newspaper
Post count: 8

Hi, I would like to clarify how post_views_count work? I tried to find this information in documentation and forum, but I could not. Does it count from category view or home page (where snippet of the post shown 3 times)? According your documentation it should increase only if user came to this page. It works for me: when I refresh the page the post_view_count increase by one. But I have a very big discrepancy in the numbers. F.E. one post shows post_views_count 1488, post_views_count_7_day_total 1490, All posts – Views 1142, Google Analytics Pageviews 751.
Can you please clarify. I have WP 4.4.2, Newspaper 6.7, no Cache plugins and sorting is working.
Thank you.

Post count: 22421

Hello,

The post views are a simple hit count. Whenever you access a post it will register a hit. If you refresh the post, there will again be a hit. It’s not very complicated. The 7 days complicates things a bit as it will create a separate counter in a custom field that is required for the 7 days post sorting but that does not affect the post counter. It will only count on the back-end. Pleas make sure you do not use the ajax view count if you do not use a caching plugin: https://forum.tagdiv.com/ajax-view-count/
I;m not sure of the discrepancy, but please use google analytics on a new post that already had the analytics set as an older post that already had some views, those could not have been picked up by google.
Let us know how it goes.

Thank you!

Post count: 8

Hello Bogdan,

Am I right the the post views ONLY count access a post. It does NOT count from category view or home page where the part of the post shown.
Thank you.

Post count: 22421

Hi,
Well the post vies are post views. If you access a category or a page, you are not accessing a post so the view does not get incremented. There are no page views or category views. only post vies.
Thank you!

Post count: 2

I have caching enabled and am using the ajax view count but i have noticed the google web crawler bot has now started hitting the ajax view count, which would increase the number of views compared to those shown in google analytics now that it will count bot hits.
Also importantly, i don’t want the web crawler wasting time with these extra requests, i’m happy for it to used cached view count each hit.

default robots.txt for wordpress is this:

User-agent: *
Disallow: /wp-admin/

Allow: /wp-admin/admin-ajax.php

Do you think changing robots.txt to the latter would work? There is a lot conjecture about order of precedence of rules?

User-agent: *
Disallow: /wp-admin/

Allow: /wp-admin/admin-ajax.php
Disallow: /wp-admin/admin-ajax.php?td_theme_name=Newspaper&v=7.3

Also if you aren’t already, consider not updating the count if its a bot hit.

EDit: actually google robots.txt tester says the latter should block it but the first version not. Are there any frontend resources or anything loaded via /wp-admin/admin-ajax.php?td_theme_name=Newspaper&v=7.3 that i shoudl be aware of i may be affecting?

Post count: 22421

Hello,

I will add this to our list for further testing. At the moment The first thing that comes to mind is that admin ajax is used for more features in our theme, not just the ajax view count. Ajax is used for the live search, for the blocks pagination and fort the blocks ajax filters. Blocking it in robots.txt will not make ajax not work anymore but it could influence google and it;s crawler when it comes to indexing your content. You can test it out as i cannot provide a precise answer for this request. Try it out with a bit of trial and error and see how it goes.

Thank you!

Post count: 2

Thanks Bogdan, I didn’t actually log the post headers or check if it was the ajax view count or the ajax load more posts, thanks for pointing that out.

Viewing 7 posts - 1 through 7 (of 7 total)
The forum ‘Newspaper’ is closed to new topics and replies.