Skip to content

Add server-side alias helper #142

Description

@marandaneto

Summary

Add a public server-side alias helper.

Why

sdk-specs marks alias as applicable to both client and server SDKs. Backend SDK users should be able to link a previous/existing ID to a new ID without manually constructing $create_alias events.

Current status

No public alias API is present in public_api.snapshot.

Suggested scope

  • Add an idiomatic Elixir API for $create_alias.
  • Accept previous/existing distinct ID and new alias ID.
  • Validate both IDs are present/non-empty.
  • Emit event: "$create_alias", top-level distinct_id as the previous ID, and properties.alias as the new ID.
  • Route through normal capture/batching and future before_send hook.
  • Add tests and docs.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions