@drupflare/spool - v0.1.0
    Preparing search index...

    Type Alias CollectorConfig

    A cross-origin analytics collector the worker holds instead of letting the page send it. The page gets an immediate empty answer; the event leaves on a network moment that happens anyway, inside maxAgeMs. Events older than that are dropped and counted, never sent late.

    type CollectorConfig = {
        delivery: "replay" | "sink";
        match: string;
        maxAgeMs: number;
        stamp?: { kind: StampKind; param: string };
        vendor: string;
    }
    Index
    delivery: "replay" | "sink"

    replay sends the held request from the worker to its own URL with no cookies, so identity has to be in the payload. sink hands it to the server half in the flush, for a vendor that needs a secret the page must not hold.

    match: string

    the origin and path prefix of the collector's URL, such as https://www.google-analytics.com/g/collect

    maxAgeMs: number

    the vendor's backfill window less a margin, in milliseconds

    stamp?: { kind: StampKind; param: string }

    a query parameter the replay sets to the event's time, for a vendor that accepts one

    vendor: string

    names the collector in drop counts and on the held event