Ghostboard Tracker Update: Unload Removed + sendBeacon

Ghostboard Tracker Update: Unload Removed + sendBeacon
Photo by Umberto / Unsplash

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 unload event.
  • 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.
  • unload removed (and goodbye Lighthouse deductions). Dropping the deprecated unload listener 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.
  • Tracker (client snippet) — code you paste into your Ghost blog.
GitHub - ghostboard/tracker: Tracking code on client side to track analytics views, scrolling (coming soon!) and clicks on text/images in a Ghost blog
Tracking code on client side to track analytics views, scrolling (coming soon!) and clicks on text/images in a Ghost blog - ghostboard/tracker
  • Tracking API — receives views, clicks, and scroll events
GitHub - ghostboard/tracking-api: Ghostboard.io Tracking API that receives the tracking data (such as views, clicks on text/images and scrolling) from the Ghost blogs
Ghostboard.io Tracking API that receives the tracking data (such as views, clicks on text/images and scrolling) from the Ghost blogs - ghostboard/tracking-api
  • Background — why we open-sourced our tracker and API
Open-sourcing our tracking API and tracker snippet code
Learn more about why Ghostboard is open-sourcing the Tracking API and the Tracker Snippet Code and 4 benefits of open-sourcing