What is Tracking script?
A tracking script is the JavaScript file an analytics tool loads on every page to record activity and send it back. Its weight, the number of requests it makes and whether it blocks rendering are costs paid by every visitor on every page — which is why script size is a legitimate criterion when choosing a tool, not a vanity metric.
What the size actually costs
Three separate costs, and only the first is obvious.
Transfer. The bytes over the wire. Compare compressed sizes, not raw ones — brotli is what a modern browser actually downloads, and it is typically 55–60% smaller than the uncompressed file.
Parse and execute. JavaScript has to be parsed and run, and on a mid-range phone this costs more than the download. A large script competes for the main thread with your own page during the exact window in which it is trying to become interactive.
Requests. Some tools load a small bootstrap that pulls further modules, or send several beacons per pageview. The tag in your HTML is not always the whole cost.
Reading a size claim honestly
Vendors quote different numbers for the same file. To compare fairly, hold three things constant: the compression (raw, gzip or brotli — say which), whether it is the full bundle or a loader, and the date.
sonex publishes its own measurement and the command that produces it, so the number can be checked rather than believed. As of 2026-08-13 the tracker is 7,179 bytes raw, 3,306 gzipped and 2,968 brotli, and the API serves the pre-compressed bundle.
Loading it well
defer, not blocking. Analytics is never more important than the page rendering.- One script, not a chain. Each additional request is another DNS lookup, connection and round trip.
- Beware the tag-manager reflex. Loading a small analytics script through a large tag manager can cost several times more than the script itself.
- Measure it yourself. Run the page in the browser’s network panel with and without the script. Whatever a vendor claims, that difference is what your visitors experience.