Event tracking

Every scan is a single logged event with exact rules for what counts — not a counter that just goes up.

A dashboard showing "240 scans" is only useful if you trust what it's actually counting. Print a poster near a busy group chat and a link-preview bot fetching the URL to generate a thumbnail can look, from a naive counter, exactly like a real person scanning — and now the number is quietly wrong in a way that's invisible unless you know to distrust it.

Event tracking is the layer underneath the dashboard that decides, case by case, whether something that touched a code's short link actually counts as a scan — and just as importantly, when it deliberately doesn't. That distinction is what the total-vs-unique numbers on the analytics page are actually built out of.

How it works

  1. 1

    The code has to pass its own gates first

    Paused, outside a schedule window, or over a configured scan limit — any of these sends the visitor straight to a status page, and nothing gets logged. The gate is checked before logging is even considered, not after.

  2. 2

    A password-gated code doesn't log at the first touch

    The redirect hands off to the unlock prompt instead of resolving anything. An abandoned or wrong-password attempt is never written — a scan only gets logged once the correct password is submitted and the real destination is revealed.

  3. 3

    The request is checked against a bot filter

    A user-agent library's bot detection plus a denylist of known link-unfurlers (WhatsApp, Slack, Telegram, Discord, and similar preview fetchers) catches the traffic that technically hits the link but was never a person looking at a phone.

  4. 4

    The event is written — country, device, referrer, timestamp

    A record captures when it happened, a country/city guess from the request's edge headers, parsed OS/device/browser from the user agent, the referring page if any, and a one-way visitor hash — never a raw IP or anything identifying.

  5. 5

    Uniqueness is settled at write time, not counted later

    See the technical section below — there's no query that counts distinct visitors after the fact; the database itself enforces it.

Worked example

The first time a given visitor hash scans a particular code, a small record pairing that hash with that code gets created, and both the code's total and unique counts go up by one. The second time the same hash scans the same code, creating that same pairing record fails — a uniqueness constraint on exactly that pair rejects it as a duplicate — and only the total count goes up. Nothing computed this after the fact by scanning old rows; the database's own constraint is the uniqueness check, which is what keeps it fast even as a code's scan history grows into the thousands.

How uniqueness gets counted without counting anything

The naive way to compute "unique visitors" is to store every scan, then run a query later that counts distinct visitor hashes per code — correct, but it gets slower as the history grows, since the database has to look at every row to answer the question. This platform does it differently: uniqueness is a side effect of a database constraint, not a query. Alongside every code, there's a lightweight table pairing a code with a visitor hash, with a uniqueness rule enforced on that exact pairing. The first time hash X scans code Y, that pairing gets inserted successfully, and both the total and unique counters go up by one in the same step. The second time the identical hash scans the identical code, inserting that same pairing again fails outright — the database itself refuses the duplicate — and that failure is the signal to bump only the total counter, not the unique one.

The practical result is that "is this visitor new to this code" is answered in constant time, not by scanning history, no matter whether a code has nine scans or nine thousand. It also means the whole scan-logging step runs without ever blocking the actual redirect on it: the write happens after the visitor's already on their way to the real destination, and if it fails for any reason — a database hiccup, a malformed field — that failure is caught and logged server-side, never surfaced to the person scanning and never able to turn a working code into a broken one. Analytics being wrong for a moment is an acceptable failure; a QR code that stops redirecting because its own logging broke is not, and the two are kept structurally incapable of affecting each other.

An honest limitation

What gets logged is that a scan resolved successfully to a destination — not what happened once someone got there. A vCard code's event log tells you it was opened; it doesn't tell you whether the person actually tapped "save contact," the way a landing page's event log tells you the redirect fired but not whether anyone read past the first line or clicked through. Measuring attention (a scan happened) and measuring action (something was done with it) are genuinely different questions, and only the first one is answered today. If you need to know the second, that's not something this feature currently does.

Frequently asked

What's stored in a single scan event?
A timestamp, a country and city guess, parsed OS/device/browser, the referring page (if the client sent one), and a one-way visitor hash. No raw IP address, no name, no persistent cookie, and no data that identifies a specific person rather than a specific device+browser combination.
If someone scans an old printed copy of a paused code, does that count as a scan?
No — the pause check happens before logging is even reached, so a paused (or schedule-expired, or over-limit) code never writes an event no matter how many old copies are still out there being scanned.
Does a password prompt loading count as a scan?
No. Nothing is logged when the prompt appears — only once the correct password is submitted and the real destination is handed back. An abandoned or failed attempt leaves no trace in the scan count.
Can a bug in event logging ever break someone's actual redirect?
No, by design — the log write happens without the redirect ever waiting on it, and any error inside it is caught and swallowed rather than allowed to propagate. A broken analytics write is a missing data point, never a broken link.

Related features

Relevant QR types

Try event tracking

Free to start — no credit card required.

See your scan events