Type Alias BeaconEvent
type BeaconEvent = {
at: number;
body: string;
contentType: string;
deliver?: "sink";
method?: "GET";
origin?: string;
path: string;
search?: string;
until?: number;
vendor?: string;
}
at: number;
body: string;
contentType: string;
deliver?: "sink";
method?: "GET";
origin?: string;
path: string;
search?: string;
until?: number;
vendor?: string;
}
Properties
at
at: number
epoch milliseconds on the device
body
body: string
content Type
contentType: string
Optionaldeliver
deliver?: "sink"
sink sends the event to the server half in the flush; absent, the worker replays it to its URL
Optionalmethod
method?: "GET"
GET for a pixel beacon; absent means POST
Optionalorigin
origin?: string
the origin of a held cross-origin request; absent for the site's own
path
path: string
Optionalsearch
search?: string
the query string of the original URL, with its leading ?
Optionaluntil
until?: number
epoch milliseconds after which the worker drops the event instead of sending it; never sent
Optionalvendor
vendor?: string
the collector entry that matched, which sets the age cap
One request the worker held back: where it was going, what it carried and when it happened. A same-origin one leaves
originout. A request to another origin names it, with thevendorwhose delay cap applies and, whendeliverissink, the server half forwards it.