@capawesome/capacitor-posthog
Version:
Unofficial Capacitor plugin for PostHog SDK.
1,320 lines • 32.3 kB
JSON
{
"api": {
"name": "PosthogPlugin",
"slug": "posthogplugin",
"docs": "",
"tags": [],
"methods": [
{
"name": "alias",
"signature": "(options: AliasOptions) => Promise<void>",
"parameters": [
{
"name": "options",
"docs": "",
"type": "AliasOptions"
}
],
"returns": "Promise<void>",
"tags": [
{
"name": "since",
"text": "6.0.0"
}
],
"docs": "Assign another distinct ID to the current user.",
"complexTypes": [
"AliasOptions"
],
"slug": "alias"
},
{
"name": "capture",
"signature": "(options: CaptureOptions) => Promise<void>",
"parameters": [
{
"name": "options",
"docs": "",
"type": "CaptureOptions"
}
],
"returns": "Promise<void>",
"tags": [
{
"name": "since",
"text": "6.0.0"
}
],
"docs": "Capture an event.",
"complexTypes": [
"CaptureOptions"
],
"slug": "capture"
},
{
"name": "flush",
"signature": "() => Promise<void>",
"parameters": [],
"returns": "Promise<void>",
"tags": [
{
"name": "since",
"text": "6.0.0"
}
],
"docs": "Flush all events in the queue.\n\nOnly available on Android and iOS.",
"complexTypes": [],
"slug": "flush"
},
{
"name": "getDistinctId",
"signature": "() => Promise<GetDistinctIdResult>",
"parameters": [],
"returns": "Promise<GetDistinctIdResult>",
"tags": [
{
"name": "since",
"text": "8.2.0"
}
],
"docs": "Get the current distinct ID.",
"complexTypes": [
"GetDistinctIdResult"
],
"slug": "getdistinctid"
},
{
"name": "getFeatureFlag",
"signature": "(options: GetFeatureFlagOptions) => Promise<GetFeatureFlagResult>",
"parameters": [
{
"name": "options",
"docs": "",
"type": "GetFeatureFlagOptions"
}
],
"returns": "Promise<GetFeatureFlagResult>",
"tags": [
{
"name": "since",
"text": "7.0.0"
}
],
"docs": "Get the value of a feature flag.",
"complexTypes": [
"GetFeatureFlagResult",
"GetFeatureFlagOptions"
],
"slug": "getfeatureflag"
},
{
"name": "getFeatureFlagPayload",
"signature": "(options: GetFeatureFlagPayloadOptions) => Promise<GetFeatureFlagPayloadResult>",
"parameters": [
{
"name": "options",
"docs": "",
"type": "GetFeatureFlagPayloadOptions"
}
],
"returns": "Promise<GetFeatureFlagPayloadResult>",
"tags": [
{
"name": "since",
"text": "7.1.0"
}
],
"docs": "Get the payload of a feature flag.",
"complexTypes": [
"GetFeatureFlagPayloadResult",
"GetFeatureFlagPayloadOptions"
],
"slug": "getfeatureflagpayload"
},
{
"name": "group",
"signature": "(options: GroupOptions) => Promise<void>",
"parameters": [
{
"name": "options",
"docs": "",
"type": "GroupOptions"
}
],
"returns": "Promise<void>",
"tags": [
{
"name": "since",
"text": "6.0.0"
}
],
"docs": "Associate the events for that user with a group.",
"complexTypes": [
"GroupOptions"
],
"slug": "group"
},
{
"name": "identify",
"signature": "(options: IdentifyOptions) => Promise<void>",
"parameters": [
{
"name": "options",
"docs": "",
"type": "IdentifyOptions"
}
],
"returns": "Promise<void>",
"tags": [
{
"name": "since",
"text": "6.0.0"
}
],
"docs": "Identify the current user.",
"complexTypes": [
"IdentifyOptions"
],
"slug": "identify"
},
{
"name": "isFeatureEnabled",
"signature": "(options: IsFeatureEnabledOptions) => Promise<IsFeatureEnabledResult>",
"parameters": [
{
"name": "options",
"docs": "",
"type": "IsFeatureEnabledOptions"
}
],
"returns": "Promise<IsFeatureEnabledResult>",
"tags": [
{
"name": "since",
"text": "7.0.0"
}
],
"docs": "Check if a feature flag is enabled.",
"complexTypes": [
"IsFeatureEnabledResult",
"IsFeatureEnabledOptions"
],
"slug": "isfeatureenabled"
},
{
"name": "isOptOut",
"signature": "() => Promise<IsOptOutResult>",
"parameters": [],
"returns": "Promise<IsOptOutResult>",
"tags": [
{
"name": "since",
"text": "8.1.0"
}
],
"docs": "Check if the user has opted out of capturing.",
"complexTypes": [
"IsOptOutResult"
],
"slug": "isoptout"
},
{
"name": "optIn",
"signature": "() => Promise<void>",
"parameters": [],
"returns": "Promise<void>",
"tags": [
{
"name": "since",
"text": "8.1.0"
}
],
"docs": "Opt in to event capturing.",
"complexTypes": [],
"slug": "optin"
},
{
"name": "optOut",
"signature": "() => Promise<void>",
"parameters": [],
"returns": "Promise<void>",
"tags": [
{
"name": "since",
"text": "8.1.0"
}
],
"docs": "Opt out of event capturing.\n\nOn Web with `cookielessMode: 'on_reject'`: switches to cookieless anonymous tracking.\nOn iOS/Android: stops all event capturing entirely.",
"complexTypes": [],
"slug": "optout"
},
{
"name": "register",
"signature": "(options: RegisterOptions) => Promise<void>",
"parameters": [
{
"name": "options",
"docs": "",
"type": "RegisterOptions"
}
],
"returns": "Promise<void>",
"tags": [
{
"name": "since",
"text": "6.0.0"
}
],
"docs": "Register a new super property. This property will be sent with every event.",
"complexTypes": [
"RegisterOptions"
],
"slug": "register"
},
{
"name": "reloadFeatureFlags",
"signature": "() => Promise<void>",
"parameters": [],
"returns": "Promise<void>",
"tags": [
{
"name": "since",
"text": "7.0.0"
}
],
"docs": "Reload the feature flags.",
"complexTypes": [],
"slug": "reloadfeatureflags"
},
{
"name": "reset",
"signature": "() => Promise<void>",
"parameters": [],
"returns": "Promise<void>",
"tags": [
{
"name": "since",
"text": "6.0.0"
}
],
"docs": "Reset the current user's ID and anonymous ID.",
"complexTypes": [],
"slug": "reset"
},
{
"name": "screen",
"signature": "(options: ScreenOptions) => Promise<void>",
"parameters": [
{
"name": "options",
"docs": "",
"type": "ScreenOptions"
}
],
"returns": "Promise<void>",
"tags": [
{
"name": "since",
"text": "6.0.0"
}
],
"docs": "Send a screen event.\n\nOnly available on Android and iOS.",
"complexTypes": [
"ScreenOptions"
],
"slug": "screen"
},
{
"name": "setup",
"signature": "(options: SetupOptions) => Promise<void>",
"parameters": [
{
"name": "options",
"docs": "",
"type": "SetupOptions"
}
],
"returns": "Promise<void>",
"tags": [
{
"name": "since",
"text": "6.0.0"
}
],
"docs": "Setup the PostHog SDK with the provided options.\n\n**Attention**: This method should be called before any other method.\nAlternatively, on Android and iOS, you can configure this plugin in\nyour Capacitor Configuration file. In this case, you must not call this method.",
"complexTypes": [
"SetupOptions"
],
"slug": "setup"
},
{
"name": "startSessionRecording",
"signature": "() => Promise<void>",
"parameters": [],
"returns": "Promise<void>",
"tags": [
{
"name": "since",
"text": "7.3.0"
}
],
"docs": "Start session recording.",
"complexTypes": [],
"slug": "startsessionrecording"
},
{
"name": "stopSessionRecording",
"signature": "() => Promise<void>",
"parameters": [],
"returns": "Promise<void>",
"tags": [
{
"name": "since",
"text": "7.3.0"
}
],
"docs": "Stop session recording.",
"complexTypes": [],
"slug": "stopsessionrecording"
},
{
"name": "unregister",
"signature": "(options: UnregisterOptions) => Promise<void>",
"parameters": [
{
"name": "options",
"docs": "",
"type": "UnregisterOptions"
}
],
"returns": "Promise<void>",
"tags": [
{
"name": "since",
"text": "6.0.0"
}
],
"docs": "Remove a super property.",
"complexTypes": [
"UnregisterOptions"
],
"slug": "unregister"
}
],
"properties": []
},
"interfaces": [
{
"name": "AliasOptions",
"slug": "aliasoptions",
"docs": "",
"tags": [
{
"text": "6.0.0",
"name": "since"
}
],
"methods": [],
"properties": [
{
"name": "alias",
"tags": [
{
"text": "6.0.0",
"name": "since"
}
],
"docs": "The new distinct ID to assign to the current user.",
"complexTypes": [],
"type": "string"
}
]
},
{
"name": "CaptureOptions",
"slug": "captureoptions",
"docs": "",
"tags": [
{
"text": "6.0.0",
"name": "since"
}
],
"methods": [],
"properties": [
{
"name": "event",
"tags": [
{
"text": "6.0.0",
"name": "since"
}
],
"docs": "The name of the event to capture.",
"complexTypes": [],
"type": "string"
},
{
"name": "properties",
"tags": [
{
"text": "6.0.0",
"name": "since"
}
],
"docs": "The properties to send with the event.",
"complexTypes": [
"Record"
],
"type": "Record<string, any>"
}
]
},
{
"name": "GetDistinctIdResult",
"slug": "getdistinctidresult",
"docs": "",
"tags": [],
"methods": [],
"properties": [
{
"name": "distinctId",
"tags": [
{
"text": "8.2.0",
"name": "since"
}
],
"docs": "The current distinct ID.",
"complexTypes": [],
"type": "string"
}
]
},
{
"name": "GetFeatureFlagResult",
"slug": "getfeatureflagresult",
"docs": "",
"tags": [],
"methods": [],
"properties": [
{
"name": "value",
"tags": [
{
"text": "7.0.0",
"name": "since"
}
],
"docs": "The value of the feature flag.\n\nIf the feature flag does not exist, the value will be `null`.",
"complexTypes": [],
"type": "string | boolean | null"
}
]
},
{
"name": "GetFeatureFlagOptions",
"slug": "getfeatureflagoptions",
"docs": "",
"tags": [
{
"text": "7.0.0",
"name": "since"
}
],
"methods": [],
"properties": [
{
"name": "key",
"tags": [
{
"text": "7.0.0",
"name": "since"
}
],
"docs": "The key of the feature flag.",
"complexTypes": [],
"type": "string"
}
]
},
{
"name": "GetFeatureFlagPayloadResult",
"slug": "getfeatureflagpayloadresult",
"docs": "",
"tags": [],
"methods": [],
"properties": [
{
"name": "value",
"tags": [
{
"text": "7.1.0",
"name": "since"
}
],
"docs": "The value of the feature flag payload.",
"complexTypes": [
"JsonType"
],
"type": "JsonType"
}
]
},
{
"name": "GetFeatureFlagPayloadOptions",
"slug": "getfeatureflagpayloadoptions",
"docs": "",
"tags": [
{
"text": "7.1.0",
"name": "since"
}
],
"methods": [],
"properties": [
{
"name": "key",
"tags": [
{
"text": "7.1.0",
"name": "since"
}
],
"docs": "The key of the feature flag.",
"complexTypes": [],
"type": "string"
}
]
},
{
"name": "GroupOptions",
"slug": "groupoptions",
"docs": "",
"tags": [
{
"text": "6.0.0",
"name": "since"
}
],
"methods": [],
"properties": [
{
"name": "type",
"tags": [
{
"text": "6.0.0",
"name": "since"
},
{
"text": "'company'",
"name": "example"
}
],
"docs": "The group type.",
"complexTypes": [],
"type": "string"
},
{
"name": "key",
"tags": [
{
"text": "6.0.0",
"name": "since"
},
{
"text": "'company_id_in_your_db'",
"name": "example"
}
],
"docs": "The group key.",
"complexTypes": [],
"type": "string"
},
{
"name": "groupProperties",
"tags": [
{
"text": "6.0.0",
"name": "since"
}
],
"docs": "The properties to send with the group event.",
"complexTypes": [
"Record"
],
"type": "Record<string, any>"
}
]
},
{
"name": "IdentifyOptions",
"slug": "identifyoptions",
"docs": "",
"tags": [
{
"text": "6.0.0",
"name": "since"
}
],
"methods": [],
"properties": [
{
"name": "distinctId",
"tags": [
{
"text": "6.0.0",
"name": "since"
}
],
"docs": "The distinct ID of the user.",
"complexTypes": [],
"type": "string"
},
{
"name": "userProperties",
"tags": [
{
"text": "6.0.0",
"name": "since"
}
],
"docs": "The person properties to set.",
"complexTypes": [
"Record"
],
"type": "Record<string, any>"
}
]
},
{
"name": "IsFeatureEnabledResult",
"slug": "isfeatureenabledresult",
"docs": "",
"tags": [
{
"text": "7.0.0",
"name": "since"
}
],
"methods": [],
"properties": [
{
"name": "enabled",
"tags": [
{
"text": "7.0.0",
"name": "since"
}
],
"docs": "Whether the feature flag is enabled.\n\nIf the feature flag does not exist, the value will be `false`.",
"complexTypes": [],
"type": "boolean"
}
]
},
{
"name": "IsFeatureEnabledOptions",
"slug": "isfeatureenabledoptions",
"docs": "",
"tags": [
{
"text": "7.0.0",
"name": "since"
}
],
"methods": [],
"properties": [
{
"name": "key",
"tags": [
{
"text": "7.0.0",
"name": "since"
}
],
"docs": "The key of the feature flag.",
"complexTypes": [],
"type": "string"
}
]
},
{
"name": "IsOptOutResult",
"slug": "isoptoutresult",
"docs": "",
"tags": [
{
"text": "8.1.0",
"name": "since"
}
],
"methods": [],
"properties": [
{
"name": "optedOut",
"tags": [
{
"text": "8.1.0",
"name": "since"
}
],
"docs": "Whether the user has opted out of capturing.",
"complexTypes": [],
"type": "boolean"
}
]
},
{
"name": "RegisterOptions",
"slug": "registeroptions",
"docs": "",
"tags": [
{
"text": "6.0.0",
"name": "since"
}
],
"methods": [],
"properties": [
{
"name": "key",
"tags": [
{
"text": "6.0.0",
"name": "since"
}
],
"docs": "The name of the super property.",
"complexTypes": [],
"type": "string"
},
{
"name": "value",
"tags": [
{
"text": "6.0.0",
"name": "since"
}
],
"docs": "The value of the super property.",
"complexTypes": [],
"type": "any"
}
]
},
{
"name": "ScreenOptions",
"slug": "screenoptions",
"docs": "",
"tags": [
{
"text": "6.0.0",
"name": "since"
}
],
"methods": [],
"properties": [
{
"name": "screenTitle",
"tags": [
{
"text": "6.0.0",
"name": "since"
}
],
"docs": "The name of the screen.",
"complexTypes": [],
"type": "string"
},
{
"name": "properties",
"tags": [
{
"text": "6.0.0",
"name": "since"
}
],
"docs": "The properties to send with the screen event.",
"complexTypes": [
"Record"
],
"type": "Record<string, any>"
}
]
},
{
"name": "SetupOptions",
"slug": "setupoptions",
"docs": "",
"tags": [
{
"text": "6.0.0",
"name": "since"
}
],
"methods": [],
"properties": [
{
"name": "apiKey",
"tags": [
{
"text": "6.0.0",
"name": "since"
},
{
"text": "'phc_g8wMenebiIQ1pYd5v9Vy7oakn6MczVKIsNG5ZHCspdy'",
"name": "example"
}
],
"docs": "The API key of your PostHog project.",
"complexTypes": [],
"type": "string"
},
{
"name": "apiHost",
"tags": [
{
"text": "8.3.0",
"name": "since"
},
{
"text": "'https://us.i.posthog.com'",
"name": "default"
},
{
"text": "'https://eu.i.posthog.com'",
"name": "example"
}
],
"docs": "The API host of your PostHog instance or reverse proxy.\n\nIf both `apiHost` and `host` are provided, `apiHost` takes precedence.",
"complexTypes": [],
"type": "string | undefined"
},
{
"name": "host",
"tags": [
{
"text": "6.0.0",
"name": "since"
},
{
"text": "'https://us.i.posthog.com'",
"name": "default"
},
{
"text": "'https://eu.i.posthog.com'",
"name": "example"
},
{
"text": "Use `apiHost` instead.",
"name": "deprecated"
}
],
"docs": "The API host of your PostHog instance.\n\nDeprecated alias for `apiHost`.",
"complexTypes": [],
"type": "string | undefined"
},
{
"name": "uiHost",
"tags": [
{
"text": "8.3.0",
"name": "since"
},
{
"text": "'https://eu.posthog.com'",
"name": "example"
}
],
"docs": "The PostHog UI host used when `apiHost` points to a reverse proxy.\n\nOnly available on Web.",
"complexTypes": [],
"type": "string | undefined"
},
{
"name": "cookielessMode",
"tags": [
{
"text": "8.1.0",
"name": "since"
},
{
"text": "web",
"name": "platform"
}
],
"docs": "Cookieless tracking mode.\n\n- `'always'`: Always use cookieless tracking with server-side anonymous hash.\n- `'on_reject'`: Normal tracking until `optOut()` is called, then switches to cookieless.\n\nOnly available on Web. Requires cookieless mode to be enabled in PostHog project settings.",
"complexTypes": [],
"type": "'always' | 'on_reject' | undefined"
},
{
"name": "enableSessionReplay",
"tags": [
{
"text": "7.3.0",
"name": "since"
},
{
"text": "false",
"name": "default"
}
],
"docs": "Whether to enable session recording automatically.",
"complexTypes": [],
"type": "boolean | undefined"
},
{
"name": "optOut",
"tags": [
{
"text": "8.1.0",
"name": "since"
},
{
"text": "false",
"name": "default"
}
],
"docs": "Whether to opt out of capturing by default.\n\nUser must call `optIn()` to enable capturing.",
"complexTypes": [],
"type": "boolean | undefined"
},
{
"name": "sessionReplayConfig",
"tags": [
{
"text": "7.3.0",
"name": "since"
}
],
"docs": "Session replay configuration options.",
"complexTypes": [
"SessionReplayOptions"
],
"type": "SessionReplayOptions"
},
{
"name": "captureApplicationLifecycleEvents",
"tags": [
{
"text": "8.3.0",
"name": "since"
},
{
"text": "true",
"name": "default"
}
],
"docs": "Whether to capture application lifecycle events.\n\nOnly available on iOS and Android.",
"complexTypes": [],
"type": "boolean | undefined"
}
]
},
{
"name": "SessionReplayOptions",
"slug": "sessionreplayoptions",
"docs": "",
"tags": [
{
"text": "7.3.0",
"name": "since"
}
],
"methods": [],
"properties": [
{
"name": "screenshotMode",
"tags": [
{
"text": "7.3.0",
"name": "since"
},
{
"text": "false",
"name": "default"
}
],
"docs": "Enable screenshot mode for session recordings.\nWARNING: This may capture sensitive information.",
"complexTypes": [],
"type": "boolean | undefined"
},
{
"name": "maskAllTextInputs",
"tags": [
{
"text": "7.3.0",
"name": "since"
},
{
"text": "true",
"name": "default"
}
],
"docs": "Mask all text input fields in session recordings.",
"complexTypes": [],
"type": "boolean | undefined"
},
{
"name": "maskAllImages",
"tags": [
{
"text": "7.3.0",
"name": "since"
},
{
"text": "true",
"name": "default"
}
],
"docs": "Mask all images in session recordings.",
"complexTypes": [],
"type": "boolean | undefined"
},
{
"name": "maskAllSandboxedViews",
"tags": [
{
"text": "7.3.0",
"name": "since"
},
{
"text": "true",
"name": "default"
}
],
"docs": "Mask all sandboxed system views (iOS-specific).",
"complexTypes": [],
"type": "boolean | undefined"
},
{
"name": "captureNetworkTelemetry",
"tags": [
{
"text": "7.3.0",
"name": "since"
},
{
"text": "false",
"name": "default"
}
],
"docs": "Capture network telemetry in session recordings.",
"complexTypes": [],
"type": "boolean | undefined"
},
{
"name": "debouncerDelay",
"tags": [
{
"text": "7.3.0",
"name": "since"
},
{
"text": "1.0",
"name": "default"
}
],
"docs": "Debounce delay for session recording snapshots (in seconds).",
"complexTypes": [],
"type": "number | undefined"
}
]
},
{
"name": "UnregisterOptions",
"slug": "unregisteroptions",
"docs": "",
"tags": [
{
"text": "6.0.0",
"name": "since"
}
],
"methods": [],
"properties": [
{
"name": "key",
"tags": [
{
"text": "6.0.0",
"name": "since"
}
],
"docs": "The name of the super property to remove.",
"complexTypes": [],
"type": "string"
}
]
}
],
"enums": [],
"typeAliases": [
{
"name": "JsonType",
"slug": "jsontype",
"docs": "",
"types": [
{
"text": "string",
"complexTypes": []
},
{
"text": "number",
"complexTypes": []
},
{
"text": "boolean",
"complexTypes": []
},
{
"text": "null",
"complexTypes": []
},
{
"text": "{\n [key: string]: JsonType;\n }",
"complexTypes": [
"JsonType"
]
},
{
"text": "JsonType[]",
"complexTypes": [
"JsonType"
]
}
]
}
],
"pluginConfigs": [
{
"name": "Posthog",
"slug": "posthog",
"properties": [
{
"name": "apiKey",
"tags": [
{
"text": "7.1.0",
"name": "since"
},
{
"text": "'phc_g8wMenebiIQ1pYd5v9Vy7oakn6MczVKIsNG5ZHCspdy'",
"name": "example"
}
],
"docs": "The API key of your PostHog project.",
"complexTypes": [],
"type": "string | undefined"
},
{
"name": "apiHost",
"tags": [
{
"text": "8.3.0",
"name": "since"
},
{
"text": "'https://us.i.posthog.com'",
"name": "default"
},
{
"text": "'https://eu.i.posthog.com'",
"name": "example"
}
],
"docs": "The API host of your PostHog instance or reverse proxy.",
"complexTypes": [],
"type": "string | undefined"
},
{
"name": "host",
"tags": [
{
"text": "7.1.0",
"name": "since"
},
{
"text": "'https://us.i.posthog.com'",
"name": "default"
},
{
"text": "'https://eu.i.posthog.com'",
"name": "example"
},
{
"text": "Use `apiHost` instead.",
"name": "deprecated"
}
],
"docs": "The API host of your PostHog instance.\n\nDeprecated alias for `apiHost`.",
"complexTypes": [],
"type": "string | undefined"
},
{
"name": "uiHost",
"tags": [
{
"text": "8.3.0",
"name": "since"
},
{
"text": "'https://eu.posthog.com'",
"name": "example"
}
],
"docs": "The PostHog UI host used when `apiHost` points to a reverse proxy.\n\nOnly available on Web.",
"complexTypes": [],
"type": "string | undefined"
},
{
"name": "enableSessionReplay",
"tags": [
{
"text": "7.3.0",
"name": "since"
},
{
"text": "false",
"name": "default"
}
],
"docs": "Whether to enable session recording automatically.",
"complexTypes": [],
"type": "boolean | undefined"
},
{
"name": "sessionReplayConfig",
"tags": [
{
"text": "7.3.0",
"name": "since"
}
],
"docs": "Session recording configuration options.",
"complexTypes": [
"SessionReplayOptions"
],
"type": "SessionReplayOptions"
},
{
"name": "captureApplicationLifecycleEvents",
"tags": [
{
"text": "8.3.0",
"name": "since"
},
{
"text": "true",
"name": "default"
}
],
"docs": "Whether to capture application lifecycle events.",
"complexTypes": [],
"type": "boolean | undefined"
}
],
"docs": ""
}
]
}