helicone icon indicating copy to clipboard operation
helicone copied to clipboard

[Bug]: PostHog integration always pass random distinct_id

Open Yshayy opened this issue 1 year ago • 1 comments

What happened?

When integrating PostHog, the Helicone-User-Id should serve as the distinct_id (or at least, should be configurable) as distinct_id use to define the identity linked to the event. The current behavior create lots of identities/persons entities in PostHog.

Reference: https://posthog.com/tutorials/api-capture-events From the basic example:

# curl
curl -v -L --header "Content-Type: application/json" -d '{
    "api_key": "phc_6diyp44WAiUJmihs6aqexBb8jPp5TivvPVu02hXlpcC",
    "event": "request",
    "distinct_id": "[email protected]"
}' https://us.i.posthog.com/capture/

Relevant log output

No response

Twitter / LinkedIn details

@yshayy

Yshayy avatar Nov 27 '24 07:11 Yshayy

Is there any way to overcome this? Reasonable default behaviour feels like using Helicone_User_Id as the distinct_identifier in posthog

rogersnick avatar Apr 08 '25 20:04 rogersnick