• Resolved kamurninja

    (@kamurninja)


    On the dashboard page, I see that for some pages I have a number as the title.

    Making the following query that I found in the plugin code used to fetch the data to be printed on the table:

    SELECT
    p.path, s.post_id, IFNULL(NULLIF(wp.post_title, ''), p.path) AS label, SUM(visitors) AS visitors, SUM(pageviews) AS pageviews
    FROM
    wp_koko_analytics_post_stats s
    JOIN
    wp_koko_analytics_paths p ON p.id = s.path_id
    LEFT JOIN
    wp_posts wp ON s.post_id = wp.ID
    WHERE p.path > 0
    GROUP BY
    p.path, s.post_id
    ORDER BY
    pageviews DESC, visitors DESC, s.path_id ASC

    I have results like these:

    path  | post_id | label | visitors | pageviews
    17658 | 0 | 17658 | 230 | 3656
    11002 | 1 | 11002 | 151 | 537
Viewing 1 replies (of 1 total)
  • Plugin Author Danny van Kooten

    (@dvankooten)

    Hello @kamurninja,

    It looks like the query is correct, but your wp_koko_analytics_paths table truly contains some records with numerical path values.

    Most likely this is due to a cache issue where the client-side script was sending the post ID to the data collection endpoint, which thought it was receiving a textual path.

    Does the issue persist going forward? Are new visitors and pageviews being counted for these numerical paths? If so, something on your site is aggressively caching our script (and ignoring our cache bust query parameter) and you should explicitly empty your caches.

    I hope that helps. If not, let me know please.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.