Tinybird flock.js: rows quarantined for missing session_id

Using the Tinybird web analytics tracker (flock.js) in a Next.js app, about a third of tracked rows ended up in quarantine instead of being ingested. The quarantine error was Strict type checking failed. Object does not have column 'session_id', you should send a value or recreate the table with a Nullable column type. While accessing jsonpath '$.session_id'. The reporter had 340 good rows and 150 quarantined.

The tracker sometimes failed to store a session ID (depending on the storage mode), and then sent events with no session_id at all, which strict type checking quarantined. The Tinybird team reproduced it and shipped the fix in flock.js v1.4.3 (PR #115): the tracker now falls back to a generated session ID value when none could be stored, so rows ingest instead of quarantining.

Fix: make sure youre loading flock.js v1.4.3 or newer. If youre pinning the unpkg URL, update the pinned tag on the script element (the one loading flock.js with the data-host and data-token attributes) to the new version.

Source: https://github.com/tinybirdco/web-analytics-starter-kit/issues/103