• Resolved vijaiya

    (@vijaiya)


    Hi Ajay,

    Thank you for looking into this. I’ve started this new thread as requested.

    Website: Softfully.com

    I’m experiencing an issue with the Top 10 recent/popular posts data. Some visits are being recorded, but other confirmed page views are not appearing in the recent 4-hour data. Top 10 settings

    • Top 10 v4.3.1
    • Overall tracker: Enabled
    • Daily range tracker: Enabled
    • Tracker type: REST API based
    • Tracking method: Funnel tracking
    • Load tracker on all pages: Enabled

    Controlled test

    I manually opened this post:

    MEmu 9.5.6.1:
    https://www.softfully.com/virtualization/memu

    I then waited 5 minutes. The MEmu visit still did not appear in the “Top 10 – Daily Popular Posts” recent 4-hour data.

    I also used “Sync Funnel Now” during testing.

    At the same time, the widget was showing other posts with one view, such as Kaspersky and later the Softfully.com homepage. However, the MEmu post I had definitely opened was still missing. Other pages that I know were visited were also missing.

    Therefore, it seems that Top 10 is not completely inactive, but some page views may not be reaching or appearing in the recent-period data correctly. Caching/optimization setup

    My website also uses:

    • Hostinger CDN
    • WP Rocket
    • Perfmatters
    • WP Armour

    Perfmatters currently has Disable REST API → Default (Enabled), so the REST API is not disabled.

    Could you please check the site from your end and determine whether the Top 10 tracking request is being recorded correctly?

    In particular, I would like to know whether the MEmu test visit is reaching Top 10, whether it is being placed into the funnel, and whether it is subsequently being written to the daily/overall tables.

    Please let me know if you need any additional information or if there is a specific setting I should temporarily change for testing.

    Thank you.

Viewing 15 replies - 1 through 15 (of 45 total)
  • Plugin Author Ajay

    (@ajay)

    @vijaiya

    I just checked the link above, and I don’t see the tracker code added to that post or any other posts, which I don’t understand because I can see the CSS being added.

    Can you please note the settings you have across all tabs on the settings page, then reset the settings?

    Can you also try changing the tracker type, although that won’t change the issue of the tracker not being added? Does that work if you have WP Rocket disabled for a bit?

    Thread Starter vijaiya

    (@vijaiya)

    Hi Ajay,

    I performed the tests you suggested and I now have some interesting results. I have also documented all my current Top 10 settings below so you can check them from your side. Top 10 v4.4.3 settings

    Features

    • Popular Posts and Post Count blocks: Enabled
    • Popular posts feeds: Disabled
    • Legacy widgets: Enabled

    General

    • Enable cache: Disabled
    • Time to cache: 86400
    • Lazy load popular posts: Disabled
    • Delete options on uninstall: Disabled
    • Delete counter data on uninstall: Disabled
    • Link to Top 10 plugin page: Disabled
    • Show metabox: Enabled
    • Limit meta box to Admins: Disabled
    • Display admin columns: Enabled
    • Show views to non-admins: Enabled

    Counter/Tracker

    • Display number of views on Posts, Pages, Home page, Feeds, Category archives, Tag archives and Other archives: All disabled
    • Format to display post views: Visited %totalcount% times, %dailycount% visit(s) today
    • No visits text: No visits yet
    • Number format post count: Enabled
    • Number format style: Full
    • Start daily counts at midnight: Enabled
    • Default custom period range: 1 day, 0 hours
    • Always display latest post count: Disabled
    • Exclude display on post IDs: None

    Tracker settings

    • Overall: Enabled
    • Daily range: Enabled
    • Tracker type: Query variable based
    • Tracking method: Funnel tracking
    • Load tracker on all pages: Enabled
    • Track feed views: Disabled
    • Track user groups: Authors and Editors enabled; Admins disabled
    • Track logged-in users: Disabled
    • Do not track bots: Enabled
    • Debug mode: Disabled

    Posts list

    • Number of posts to display: 20
    • Published age of posts: 0
    • Post types: Posts only
    • Exclude Front page and Posts page: Disabled
    • Exclude current post: Disabled
    • Post/page IDs to exclude: None
    • Exclude Categories: None
    • Exclude category IDs: None
    • Exclude on Categories: None
    • Heading of posts: <h3>Popular posts:</h3>
    • Heading for daily/custom period: <h3>Currently trending:</h3>
    • Show when no posts are found: Blank output
    • Custom text: No top posts yet
    • Show post excerpt: Disabled
    • Excerpt length: 10
    • Show date: Disabled
    • Show author: Disabled
    • Show number of views: Disabled
    • WP-PostRatings rating: Do not display
    • Limit post title length: 70
    • Open links in new window: Disabled
    • Add nofollow to links: Disabled
    • HTML before list: <ul>
    • HTML after list: </ul>
    • Before each list item: <li>
    • After each list item: </li>

    Thumbnail

    • Location: Display thumbnails inline with posts, before title
    • Thumbnail size: tptn_thumbnail (35×35 cropped)
    • Thumbnail width: 35
    • Thumbnail height: 35
    • Hard crop thumbnails: Enabled
    • Generate thumbnail sizes: Disabled
    • Thumbnail size attributes: Use HTML attributes
    • Thumbnail meta field name: post-image
    • Get first image: Enabled
    • Use default thumbnail: Enabled
    • Default thumbnail: https://www.xyz.com/wp-content/plugins/top-10/default.png

    Styles

    • Popular posts style: Left thumbnails
    • Custom CSS: .tptn-left-thumbs .tptn_title {font-weight: 600;}

    Maintenance

    • Enable scheduled maintenance: Enabled
    • Daily table retention period: 0
    • Visits log retention period: 0
    • Maintenance time: 08:00
    • Run maintenance: Weekly

    Feed

    • Overall permalink: popular-posts
    • Daily permalink: popular-posts-daily
    • Number of posts: 10
    • Custom period: 1 day

    Controlled testing

    I found a very useful pattern.

    With WP Rocket enabled and the tracker type set to REST API based, I opened my MEmu post, but the visit was not recorded.

    I then disabled WP Rocket and opened the same MEmu post again. The visit was recorded after a few minutes.

    I also tested:

    • SpywareBlaster — recorded with WP Rocket disabled
    • SpyHunter — recorded with WP Rocket disabled

    I then re-enabled WP Rocket and tested another post:

    • Avira Phantom VPN Free — recorded successfully

    So I initially thought WP Rocket might be the complete cause, but the Avira test showed that WP Rocket does not prevent all Top 10 tracking. Most important test

    I then kept WP Rocket enabled and changed only the Top 10 tracker type:

    REST API based → Query variable based

    I kept Funnel tracking enabled.

    I opened the same MEmu post again, and this time the visit was recorded.

    Therefore, the results are:

    WP Rocket ON + REST API tracker → MEmu not recorded ❌

    WP Rocket OFF + REST API tracker → MEmu recorded ✅

    WP Rocket ON + Query variable tracker → MEmu recorded ✅

    This makes me think the issue may specifically be related to the REST API based tracker interacting with WP Rocket, rather than WP Rocket itself blocking all Top 10 tracking.

    My website also uses:

    • Hostinger CDN
    • WP Rocket
    • Perfmatters
    • WP Armour
    • Kadence Security

    Perfmatters has Disable REST API → Default (Enabled), so the REST API is not disabled.

    Kadence Security REST API is already set to Default Access

    I have not reset the Top 10 settings because I wanted to preserve the existing configuration for troubleshooting.

    Could you please check the site from your side now and see if you can determine why the REST API based tracker is not being added/working correctly when WP Rocket is enabled, while the Query variable tracker works with WP Rocket enabled?

    In particular, could you check whether there is any interaction between Top 10’s REST API tracker and WP Rocket caching/optimization?

    All tests were performed in Chrome Incognito, so the visits were logged-out visitors.

    For now I have left the tracker on Query variable based + Funnel tracking, since that combination successfully recorded the MEmu test with WP Rocket enabled.

    Thank you.

    Thread Starter vijaiya

    (@vijaiya)

    Hi Ajay,

    I wanted to give you an update with all the testing results because the behavior now appears to be random, and I don’t think we can conclusively say that the REST API tracker or WP Rocket is the cause.

    I have now switched the Top 10 tracker back to:

    • Tracker type: REST API based
    • Tracking method: Funnel tracking

    All of my tests are performed using Chrome Incognito, so I am testing as a logged-out visitor. Tests I performed

    1. MEmu

    • WP Rocket enabled + REST API tracker → not recorded
    • WP Rocket disabled + REST API tracker → recorded
    • WP Rocket enabled + Query Variable tracker → recorded

    This initially made it look like there might be an interaction between WP Rocket and the REST API tracker.

    2. Freemake Video Downloader

    • WP Rocket enabled → not recorded
    • WP Rocket disabled → recorded after about 2–3 minutes

    3. SpywareBlaster

    • WP Rocket disabled → recorded

    4. SpyHunter

    • WP Rocket disabled → recorded

    5. Avira Phantom VPN Free

    • WP Rocket enabled → recorded

    This showed that WP Rocket does not consistently prevent tracking.

    6. Driver Easy

    • Tested with the current setup → not recorded

    7. Pale Moon

    • Tested with the current setup → not recorded

    Driver Easy and Pale Moon were both not recorded, even though the tracker has successfully recorded other pages under similar conditions.

    Because of these mixed results, I don’t think we can say that REST API tracking is definitely the problem. The issue appears to be intermittent/random: sometimes a visit is recorded and sometimes it is not.

    I have now switched back to REST API based + Funnel tracking so that my site is back on the original configuration.

    My other relevant setup is:

    • Hostinger CDN
    • WP Rocket
    • Perfmatters
    • WP Armour
    • Kadence Security

    Perfmatters has Disable REST API → Default (Enabled).

    Kadence Security has REST API → Default Access.

    I also have the following custom REST-related code:

    remove_action('wp_head', 'rest_output_link_wp_head');

    and a rest_prepare_user filter that prevents logged-out users from accessing user information through the REST API. This does not intentionally block the REST API globally.

    At this point, could you please check the site from your side and see whether you can determine why the Top 10 tracker is sometimes not being added or processed?

    The fact that the behavior is inconsistent makes me wonder whether there is some caching, CDN, optimization, or request-specific condition affecting the tracker.

    I have not reset the Top 10 settings because I documented the complete configuration and wanted to preserve the current setup for troubleshooting.

    Please let me know what you find from your side.

    Thank you.

    Plugin Author Ajay

    (@ajay)

    Can you completely clear your cache?

    I’ve been randomly checking your site and the ones you’re likely seeing tracking are the posts where the Top 10 tracker (see screenshot in Firefox Developer tools on what that looks like) is being loaded properly.

    https://ibb.co/ksbfgsB9

    This doesn’t matter on the tracker type but if the tracker actually loads or not.

    I don’t know WP Rocket, but I’m wondering if there is a version cached e.g. if you’re logged in which doesn’t have the tracker and so it ends up showing that version. Can you check if this setting (Track user groups) is also active for Admin and Editors?

    Thread Starter vijaiya

    (@vijaiya)

    Hi Ajay,

    I checked the complete request details for the Driver Easy test.

    The request is:

    POST https://www.softfully.com/wp-json/top-10/v1/tracker

    Status: 204 No Content

    The request is initiated by top-10.min.js and contains the expected Top 10 tracker payload.

    I also checked the response headers and noticed:

    x-hcdn-cache-status: DYNAMIC

    cache-control: max-age=15, s-maxage=0

    The browser request also contains cache-control: no-cache.

    Therefore, it appears that Hostinger CDN is not serving this tracker request from cache; it is being handled dynamically.

    The tracker request is definitely reaching the endpoint and receiving a successful 204 response, but the Driver Easy visit still does not appear in the Daily Popular Posts results.

    Could you check whether this particular REST request is actually being inserted into the Top 10 funnel/staging table after the endpoint receives it?

    If possible, could you also check whether top_ten_id = 850 from this request exists in the funnel/staging table after the request?

    At this point, it seems the issue may be occurring after the browser sends the tracker request, rather than the tracker failing to load or Hostinger CDN caching the request.

    I am currently using REST API based + Funnel tracking.

    Thread Starter vijaiya

    (@vijaiya)

    I also disabled WP Rocket completely and repeated the test. The result was exactly the same: /wp-json/top-10/v1/tracker was sent as a POST, returned 204 No Content, and Hostinger CDN reported DYNAMIC.

    Therefore, the same behavior occurs with WP Rocket enabled and disabled.

    At this point, I don’t think WP Rocket or Hostinger CDN is causing the REST tracker request itself to fail.

    Could you please check what happens inside Top 10 after this REST request is received, particularly whether the visit is inserted into the funnel/staging table and subsequently aggregated into the daily table?

    Thread Starter vijaiya

    (@vijaiya)

    Hi Ajay,

    I completely cleared both the WP Rocket and Hostinger CDN caches and continued testing in Chrome Incognito. The behavior was still intermittent, so I don’t think the 204 response itself is the issue.

    I also tested with WP Rocket disabled, and I could still reproduce the same behavior, so I don’t think WP Rocket is conclusively the root cause.

    I’m currently using the REST API tracker with Funnel tracking. I also added top-10.min.js to WP Rocket’s Delay JavaScript Execution exclusions as a test. So far, tracking appears to be working, but I’m continuing to test to see whether this makes the behavior consistent.

    I also checked the browser Network panel. When tracking works, I see top-10.min.js load and the /wp-json/top-10/v1/tracker request return 204 No Content.

    I’ll continue testing and let you know if excluding top-10.min.js from Delay JavaScript Execution consistently resolves it.

    Thread Starter vijaiya

    (@vijaiya)

    Could you consider adding Subscribers to the Track user groups list? Currently, the available groups are Authors, Editors, and Admins. Since Subscribers are also WordPress logged-in users, having a Subscriber option would allow us to explicitly control whether their views are tracked. This would be useful for sites where Subscriber accounts need to be included in view tracking.

    Thank you

    Plugin Author Ajay

    (@ajay)

    @vijaiya

    Reading through the email chains. The 204 tracking positive result means this worked. If you check the Tools page, you’ll see that after this is tracked, it shows up in the funnel table before it empties into the counts table. Happens every 2 minutes. Can you check those tables?

    On “Subscribers to Track” – this is by default. The reason you have Authors, Editors, and Admins is to turn them on by default. There isn’t a way to turn off subscribers and doing so means you are effectively removing tracking from your site.

    Thread Starter vijaiya

    (@vijaiya)

    Hi Ajay,

    Yes, I checked the Tools page. After testing the tracker, the top_ten_visits_funnel table showed 1 entry. I then clicked Sync Funnel Now, and it went back to 0, so the funnel entry was successfully processed.

    I also understand now that Subscribers are tracked by default, so there is no need to add Subscriber to the user-group list.

    Thanks for clarifying this!

    I tested this again to make sure I understand the funnel behavior correctly.

    I opened 3 different posts within about 30 seconds. When I checked Top 10 → Tools, the top_ten_visits_funnel table showed Entries: 1. The aggregation cron was still scheduled to run every 2 minutes.

    Since all 3 visits happened within 30 seconds, I expected to see 3 pending funnel entries. So I’m not sure whether:

    the other 2 visits were already processed/aggregated,
    Top 10 intentionally combines/deduplicates these visits in the funnel, or
    the other 2 tracker requests did not get recorded.

    Could you please clarify how the funnel table handles multiple visits to different posts within a short period?

    I can also provide the Network results for each post if that would help.

    Thanks!

    I have one more question about the Enable cache option under Top 10 → General.

    The description says: “If activated, Top 10 will use the Transients API to cache the popular posts output for the time specified below.”

    Since I’m already using WP Rocket and Hostinger CDN caching, I currently have this option disabled.

    Is this Top 10 cache mainly useful for sites that do not have another caching plugin, or is there still a benefit to enabling it alongside WP Rocket/CDN?

    I want to avoid unnecessary or overlapping caching, so I’d like to confirm whether I should keep it disabled.

    Thanks!

    Thread Starter vijaiya

    (@vijaiya)

    Hi Ajay,

    I have now done another test and I believe there is a problem with the Top 10 tracking pipeline.

    Google Analytics is showing the site live activity immediately — active users and page-view events are appearing in Realtime.

    However, I visited posts while Incognito and completely logged out, and after waiting 10–15 minutes (well beyond the 2-minute Top 10 aggregation interval):

    Top 10 – Daily Popular Posts: still completely empty
    top_ten: 1,517 — unchanged
    top_ten_daily: 30,063 — unchanged
    top_ten_visits_funnel: 0 — unchanged
    top_ten_visits_log: 5,501 — unchanged
    Aggregation cron: Scheduled every 2 minutes

    We also previously confirmed that the Top 10 tracker request reaches:
    /wp-json/top-10/v1/tracker
    and returns HTTP 204 No Content.

    So could you please investigate and fix the tracking/data-processing issue? Google Analytics is receiving the same live page activity, while Top 10 is not adding the visits to its funnel/daily/count tables even after 10–15 minutes.

    I don’t want to keep changing WP Rocket, CDN, or Top 10 settings without knowing what is happening after the 204 response. Could you please trace one tracker request through the Top 10 funnel and aggregation process?

    Plugin Author Ajay

    (@ajay)

    @vijaiya

    Would you have a staging site by any chance? Alternatively, the easiest way to trace a request at your end is. Load a page and check that the tracker returns a 204.

    Immediately go to the Tools page as you did above and check what is in the “funnel” table. It should have gone up by at least one post.

    To confirm, you’re running the Funnel tracking, right – not Legacy?

    Alternatively, switch to legacy tracking and see if top_ten_daily directly updates.

    Please can you try both please.

    Thread Starter vijaiya

    (@vijaiya)

    I have one more question about the Enable cache option under Top 10 → General.

    The description says: “If activated, Top 10 will use the Transients API to cache the popular posts output for the time specified below.”

    Since I’m already using WP Rocket and Hostinger CDN caching, I currently have this option disabled.

    Is this Top 10 cache mainly useful for sites that do not have another caching plugin, or is there still a benefit to enabling it alongside WP Rocket/CDN?

    I want to avoid unnecessary or overlapping caching, so I’d like to confirm whether I should keep it disabled.

    Thanks!

    Plugin Author Ajay

    (@ajay)

    @vijaiya

    you can keep the plugin’s cache setting disabled as you have WP Rocket caching the page. Did you see my previous response?

    https://wordpress.org/support/topic/issue-views-not-being-recorded-correctly/#post-18995997

    Thread Starter vijaiya

    (@vijaiya)

    Hi Ajay,

    I tested both tracking methods on my live site.

    Tracker type: REST API based — Funnel tracking: This does not appear to be tracking successfully. Over approximately 2 hours, I saw only 4–5 users reflected in the Daily Popular Posts.

    Tracker type: REST API based — Legacy tracking: In the same type of test over approximately 2 hours, I saw around 40–42 users reflected in the Daily Popular Posts.

    The difference is quite significant. Based on my testing, Funnel tracking is missing a large number of visits, while Legacy tracking appears to be tracking much more consistently.

    I understand that Funnel tracking is the newer tracking method, so I cannot fully trust it yet based on these results. For now, I have therefore switched back and set my site to:

    Tracker type: REST API based — Legacy tracking

    Could you please check why Funnel tracking is missing so many visits compared with Legacy tracking?

    Thanks.

Viewing 15 replies - 1 through 15 (of 45 total)

You must be logged in to reply to this topic.