PostHog / PostHog/posthog-elixir

Add server-side alias helper

Open
#142 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Elixir
Stars
65
Forks
30
Avg merge
1d 16h
Merged PRs (30d)
16

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with public_api.snapshot and the sdk-specs alias specification, then trace the existing capture and batching entry points. Add the public server-side alias API with validation, normal capture/batching and before_send routing, and add tests and documentation that verify the specified event and IDs.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir
Domain
api, backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.