Type Alias Ga4Options
type Ga4Options = {
apiSecret: string;
debug?: boolean;
fetch?: typeof fetch;
maxAgeMs?: number;
measurementId: string;
now?: () => number;
}
apiSecret: string;
debug?: boolean;
fetch?: typeof fetch;
maxAgeMs?: number;
measurementId: string;
now?: () => number;
}
Properties
api Secret
apiSecret: string
the Measurement Protocol API secret; it stays on the server and never reaches the page
Optionaldebug
debug?: boolean
post to /debug/mp/collect, which validates and returns messages without recording
Optionalfetch
fetch?: typeof fetch
Optionalmax Age Ms
maxAgeMs?: number
events older than this are dropped and counted; default 48 hours, never past 72
measurement Id
measurementId: string
Optionalnow
now?: () => number
what ga4Sink takes