• shiner82

    (@shiner82)


    Hello,

    I need to render a customized page. Here some demo code:

    (…)
    function render_custom_page() {
    if (get_query_var(‘custom_page’)) {
    echo ‘Test’;
    exit();
    }
    }
    add_action(‘template_redirect’, ‘render_custom_page’);

    When I land on mysite/custom-page/ the page is rendered correctly but the statistics are recording a visit on the homepage. How can I fix this? Should I call some API?

    Thank you
    Andrea

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Mostafa Soufi

    (@mostafas1990)

    Hi,

    Could you please open the XHR request in the browser’s network tab and check what is the payload of the requests /hit? Make sure to enable the Cache Compatibility option while doing so.”

    Thread Starter shiner82

    (@shiner82)

    Hello,
    thank you for your reply.

    I have enabled the ‘Cache Compatibility’ option, but I don’t see any XHR requests, and in the overview panel there are no active users. When I try it on other pages, I can see the XHR request correctly.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Stats on custom pages’ is closed to new replies.