• Resolved arezvanov

    (@arezvanov)


    Hey guys!

    On our website we have a page views counter for every article that shows how many times the article was opened. This number becomes inaccurate if we switch on Super Page Cache for Cloudflare.

    Is there a way to fix the accuracy of article views counter while using your cache plugin?

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor iSaumya

    (@isaumya)

    The page view counter is dependent on PHP, which means every request needs to be executed by the server. But when page is being served from cache PHP is not getting executed to load that page content and as a result the counter doesn’t get increased.

    You can use an admin.ajax.php request to request to increase the view counter but that would increase the load in your server insanely as for every request a PHP process needs to be invoked.

    Thread Starter arezvanov

    (@arezvanov)

    Thanks for your response.

    And if we will use something like Post Views Counter plugin – any of its four modes would work?
    They say it has PHP, JavaScript, REST?API and Fast AJAX. Although I am not sure how any of those works.

    Plugin Contributor iSaumya

    (@isaumya)

    Hi you can try using javascript option cause PHP, Ajax and REST API all will make continuous dynamic request to your server to execute PHP code in different way. Don’t know how their javascript mode works.

    Thread Starter arezvanov

    (@arezvanov)

    Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Page Views Counter + Cloudflare Cache’ is closed to new replies.