Ghostboard Tracker Update: Unload Removed + sendBeacon
We’ve pushed a reliability and performance upgrade to our open-source tracking code and tracking API. In short:
- We removed support for the deprecated
unloadevent. - We switched to
navigator.sendBeacon()for exit-safe analytics delivery. - We added scroll-depth tracking to the beacon-friendly endpoint in the API.
- Both repos are open source: the client tracker and the tracking API. 🎉
This post explains what changed, why it matters for your Ghost blog, how to get it (spoiler: users don’t need to do a thing), and how to verify it’s working—plus FAQs for devs. Let’s dive in. ⚡
Benefits
- More reliable analytics on page exits.
sendBeacon()delivers “fire-and-forget” hits even when visitors close or switch tabs, without blocking navigation. unloadremoved (and goodbye Lighthouse deductions). Dropping the deprecatedunloadlistener prevents Lighthouse from flagging deprecated/unreliable behavior and BFCache blockers—helping you avoid warnings like “Avoid unload event listeners” and “Page prevented back/forward cache restoration,” with all the ripple effects on perceived speed, Best Practices checks, CI budgets, and UX.- Deeper insights. Scroll-depth events are better tracked and sent via the beacon-friendly endpoint, so you can see how far readers get through your posts and act on the drop-off points.
FAQ
Does removing unload mean I’ll lose data?
No—the opposite. unload is unreliable and can block performance features; sendBeacon() makes exit-time analytics more reliable.
Is sendBeacon() widely supported?
Yes. It’s been broadly available for years and is the platform-recommended method for non-blocking analytics.
Do I need to edit my Ghost theme?
If you use our standard CDN snippet, no. You already receive the update. If you self-host or pinned an older file, update from the tracker repo.
Where do I see scroll data?
In Ghostboard’s dashboards, including Scroll Report and Top Posts by Scroll Depth.
Release notes (editor-friendly)
- Removed: support for
window.unload(deprecated). - Added: exit-safe analytics delivery via
navigator.sendBeacon(). - Added: scroll-depth tracking routed to the beacon endpoint (API).
- Open source: tracker and tracking API remain public for audit and PRs.
Open-source links
- Tracker (client snippet) — code you paste into your Ghost blog.
- Tracking API — receives views, clicks, and scroll events
- Background — why we open-sourced our tracker and API
