PostHogClientOptions
Defined in: clients/posthog-client/dist/index.d.mts:4
Options for createPostHogClient.
Properties
Section titled “Properties”baseUrl?
Section titled “baseUrl?”
optionalbaseUrl?:string
Defined in: clients/posthog-client/dist/index.d.mts:13
Override base URL for testing. Takes precedence over host.
errors?
Section titled “errors?”
optionalerrors?:ErrorSink
Defined in: clients/posthog-client/dist/index.d.mts:19
Reports transport failures and unexpected 5xx. Defaults to a no-op.
fetch?
Section titled “fetch?”
optionalfetch?: (input,init?) =>Promise<Response>
Defined in: clients/posthog-client/dist/index.d.mts:15
Override fetch for testing. Defaults to globalThis.fetch.
Parameters
Section titled “Parameters”string | URL | Request
RequestInit
Returns
Section titled “Returns”Promise<Response>
optionalhost?:string
Defined in: clients/posthog-client/dist/index.d.mts:11
PostHog host. Defaults to https://app.posthog.com.
Use https://eu.posthog.com for EU cloud, or your self-hosted URL.
logger?
Section titled “logger?”
optionallogger?:Logger
Defined in: clients/posthog-client/dist/index.d.mts:17
Structured logger for request/response diagnostics. Defaults to a no-op.
token:
string
Defined in: clients/posthog-client/dist/index.d.mts:6
PostHog API token, sent as a bearer token.