Jump to content

Recommended Posts

Posted

370 ms on every hit was a lot, nice that it's only parsed once now. The server-side check on page ID and template is a good one too, otherwise anyone could fill the stats with fake pages.

  • Like 1
Posted

NativeAnalytics 1.0.37 is out

A bigger update this time, focused on data quality and spam:

Spoof-proof visitor IP
X-Forwarded-For / CF-Connecting-IP are now trusted only from Cloudflare and from your own proxies. Before this, anyone could fake them to get around the IP blocklist. The settings show which IP was detected and warn you if your host’s load balancer needs to be added to Trusted proxies.

Form spam honeypot (optional)
Adds an invisible field to front-end POST forms (FormBuilder, LoginRegister, custom forms). Bots that fill it in are flagged in analytics, or you can stop the submission entirely.4-honeypot-settings.thumb.jpg.648887625630505b9898ad20b917dfbf.jpg

New Content tab
Declining and growing pages compared with the previous period, plus published pages that got no visits at all. Handy for spotting content that needs an update.
 1-content-trends.thumb.jpg.a02d6dc72bd42938b4d0ef95e996e5b0.jpg

2-pages-without-visits.thumb.jpg.91db4a90792c57bc979f03108f4d632f.jpg

Bot traffic report (System tab)
Flagged traffic broken down by detection reason.

Verified beacons (PR #24, thanks @adrian)
A forged tracking beacon can no longer attach a made-up path or title to a real page.

Developer hooks
shouldTrack, beforeSaveHit, beforeSaveEvent and honeypotTriggered. Add them in site/init.php.

Bot detection notice now follows your admin theme (thanks @matjazp for the feedback about the blue box!).
Matomo-style.jpg.63740904257b94af83a467e6b2dcd52c.jpg

Upgrade as usual. Existing settings are kept, and the honeypot is off by default. If your site is behind a load balancer, check Filters & exclusions → Visitor IP source after upgrading.

Cheers
R

  • Like 4
Posted

NativeAnalytics 1.0.38 is out — a small security update, recommended for everyone.

@adrian kindly reported two low-severity issues privately. Both are fixed:

1. Tracking endpoint size limits
The public tracking endpoint accepted request bodies of any size, and event "extra" data was stored without trimming, so someone could post large events repeatedly to fill the database. Now:
- requests over 8 KB are refused (HTTP 413) before anything is decoded
- event extra data keeps only flat values (max 20 keys, 255 chars per value) and is capped at 2 KB
- new setting under Filters & exclusions: "Tracking endpoint: max requests per IP per minute" (default 240, 0 disables). Requests over the limit get HTTP 429 and are not stored. If many of your visitors share one IP (schools, offices behind NAT), you may want to raise it.

2. CSV injection in exports
Paths, referrers and event names/labels come from visitors' browsers. A value starting with =, +, - or @ could open as a live formula in Excel or Google Sheets. The Pages, Referrers, 404 and Events CSV exports now prefix such cells with an apostrophe; numbers are left unchanged.

No schema changes. Just update the files and refresh modules.

Thanks again Adrian for the careful review and for reporting it privately!

Update as always 😉
Cheers

R

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...