Function eventsOf
-
eventsOf(
event: BeaconEvent,
): {
body: {
name: string;
params: Record<string, string | number>;
timestamp_micros: number;
};
client: string;
}[]Parameters
- event: BeaconEvent
Returns {
body: {
name: string;
params: Record<string, string | number>;
timestamp_micros: number;
};
client: string;
}[]
Turns a held gtag collect request into Measurement Protocol events, each stamped with the time it happened. A batched request carries one event per body line and the shared parameters in the query. Events with no client id or an invalid name are skipped. The parameter mapping (
dl,dt,ep.name,epn.name,_et,sid) is the one gtag.js uses on the wire; it is read from observed requests, not from a vendor document.