trackkit / dispatcher/types / ProxyTransportOptions
Type Alias: ProxyTransportOptions
ProxyTransportOptions =
object
Defined in: dispatcher/types.ts:30
Sends analytics to a same-origin (or explicitly allowed) proxyUrl which forwards to the real provider. This usually bypasses adblock filters that target known analytics domains or third-party scripts.
Server contract (recommended):
POST {proxyUrl}
Headers:
Content-Type: application/json
Authorization: Bearer <token> (optional)
X-Trackkit-Target: <provider URL> (required)
Body: { "payload": any }The server should validate the target against an allowlist and forward the JSON payload to that URL, returning the provider response status.
Properties
proxyUrl
proxyUrl:
string
Defined in: dispatcher/types.ts:31
token?
optionaltoken:string
Defined in: dispatcher/types.ts:32
headers?
optionalheaders:Record<string,string>
Defined in: dispatcher/types.ts:33
keepalive?
optionalkeepalive:boolean
Defined in: dispatcher/types.ts:35
If true, use fetch({ keepalive: true }) for nicer unload semantics.
allowlist?
optionalallowlist: (string|RegExp)[]
Defined in: dispatcher/types.ts:37
Optional allowlist enforcement client-side (defense-in-depth).