GitbookIO / GitbookIO/integrations

Feature Request: Support PostHog identify API

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

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
131
Forks
96
Avg merge
7h 8m
Merged PRs (30d)
31

Description

Summary
PostHog integration currently tracks anonymous events only, it never calls posthog.identify. Without this call, events can’t be stitched to known users across sessions, which limits cohort analysis, funnels, and retention metrics.

Current Behavior

  • User performs an action that triggers an analytics event.
  • The event arrives in PostHog with a random distinct_id.
  • No subsequent identify call is sent, so the user remains anonymous forever.

Expected Behavior
After a user logs in / registers (or whenever we have a stable user ID), the integration should:
posthog.identify('<stable_user_id>', { // optional user traits email: 'alice@example.com', plan: 'Pro', });
All future events from that client should automatically be linked to this distinct_id.

Why it matters

  • Accurate user journeys: Lets us see pre‑ and post‑signup behavior for a single person.
  • Richer segmentation: Enables funnels by user properties, churn analysis, etc.
  • Industry standard: “Identify users” is considered a core PostHog feature and is supported by most official SDKs.

Happy to assist with the PR.

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

Locate the PostHog integration entry point and the login, registration, or stable-user-ID flow first; the issue names no files or tests. Done means sending posthog.identify with the stable ID when it becomes available and confirming subsequent events are linked to that identity.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
analytics
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.