
PostHog Alias
CertifiedCreate a PostHog alias
PostHog Alias
Create a PostHog alias
Tells PostHog that two identifiers belong to the same user, by sending a $create_alias event. The alias identity is merged into the distinctId identity: distinctId is the user that is kept, and both identifiers then resolve to that user. The merge is not applied by PostHog if the alias user has already been identified. Uses the project API key (phc_).
type: io.kestra.plugin.posthog.AliasExamples
Link an anonymous ID to an authenticated user
id: link_anonymous_user
namespace: company.growth
inputs:
- id: anonymous_id
type: STRING
- id: user_id
type: STRING
tasks:
- id: alias_user
type: io.kestra.plugin.posthog.Alias
apiKey: "{{ secret('POSTHOG_API_KEY') }}"
host: "https://us.i.posthog.com"
distinctId: "{{ inputs.user_id }}"
alias: "{{ inputs.anonymous_id }}"
Properties
alias *string
Alias
The other identity of the same user, e.g. an anonymous ID. It is merged into the user identified by distinctId. Must be different from distinctId.
apiKey *string
PostHog project API key
The project API key (starts with phc_). Use a Kestra secret, e.g. {{ secret('POSTHOG_API_KEY') }}.
distinctId *string
Distinct ID
The identity of the user that is kept, e.g. the authenticated user ID. The alias identity is merged into it.
assets
Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.
io.kestra.core.models.assets.AssetsDeclaration
IGNOREFAILWARNAsset failure behavior
Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.
Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.
The assets consumed as inputs.
io.kestra.core.models.assets.AssetIdentifier
1The assets produced as outputs.
io.kestra.plugin.ee.assets.Dataset
1150{}1150io.kestra.plugin.ee.assets.File
1150{}1150io.kestra.plugin.ee.assets.Table
1150{}1150io.kestra.plugin.ee.assets.VM
1150{}1150io.kestra.core.models.assets.External
1150{}1150io.kestra.core.models.assets.Custom
11501Custom asset type
{}1150host string
PostHog host
The PostHog ingestion host, e.g. https://us.i.posthog.com (US Cloud), https://eu.i.posthog.com (EU Cloud) or a self-hosted URL. Defaults to US Cloud when empty.