People

Last updated:

|Edit this page

People in PostHog represent the users behind your events. You can view them in the People tab.

People have person properties, which enables you do things like:

  • Filter on person properties
  • Create cohorts
  • Use person properties for targeting feature flags, A/B tests, and surveys.
  • Track initial UTM values and referrers across anonymous and identified users.
  • Query the persons table using SQL insights

People and person profiles

Using people in PostHog requires capturing events with person profiles. Person profiles are how PostHog attributes events and properties to specific users. Examples of scenarios where you want to capture events with person profiles are:

  • Tracking logged-in users in B2B and B2C SaaS apps
  • Doing user segmented product analysis
  • Growth and marketing teams wanting to analyze the complete conversion lifecycle

On the other hand, there are many use cases that don't require person profiles, such as:

  • Tracking a marketing website
  • Content-focused sites
  • B2C apps where users don't sign up or log in
  • High volume API server events

Under our current pricing, events without person profiles can be up to 4x cheaper than events with them (due to computer cost of processing them), so it's recommended to only capture events with person profiles when needed.

Capturing person profiles

For backward compatibility, PostHog captures events with person profiles by default. To change this in the JavaScript Web SDK, change the person_profiles config option:

  1. person_profiles: 'always' (default) - We capture person profiles for all events.

  2. person_profiles: 'identified_only' (recommended) - We only capture person profiles for users where they are already created. This is triggered by calling functions like identify(), group(), and more. New anonymous users won't get person profiles.

An example of an updated configuration looks like this:

Web
posthog.init(
'<ph_project_api_key>',
{
api_host: 'https://us.i.posthog.com',
person_profiles: 'identified_only'
}
)

Other SDKs and the API can pass the $process_person_profile property in events. Again, person profiles are enabled by default, but you can disable this by setting the property to false.

Below is an example in Node, but the same applies to other SDKs:

Node.js
client.capture({
distinctId: 'distinct_id_of_the_user',
event: 'movie_played',
properties: {
$process_person_profile: false,
},
})

Person profiles and distinct IDs

Below is good information to know when working with distinct IDs and person profiles:

  • Every event has a distinct_id representing a user attached to it. However, not every distinct_id has an associated person profile.

  • If a distinct ID already has a person profile created, any events captured with this distinct ID are considered events with a person profile.

    • To opt out of this behavior, contact file a support ticket via the in-app modal.
  • Any distinct_id created before May 2024 will have a person profile created for them. This means all of their events will be counted as events with person properties.

Viewing person profiles

Clicking on a person in the People tab opens their profile and shows all their properties.

Person profile
  • Events shows all the events a person has triggered, which you can search and filter to find specific events.

  • Recordings shows all of the session replays a person has generated. Note this is subject to the retention policy of your plan, so people who haven't been active recently may have none.

  • Cohorts shows all the cohorts a person belongs to.

  • Related groups: shows groups (e.g. organizations, projects, and instances) a person belongs to.

  • Feature flags: shows all feature flags that are enabled for the person.

  • History: shows any manual changes that have been made to the person's profile.

Deleting person data

In the PostHog app

  • Search for the person via their unique ID. For example, their email.
  • Click on the person's ID
  • Click Delete person to remove them and all their associated data. You will be prompted to confirm this action.

Via the API

You can also delete persons data via the API. See the Data Deletion docs for more information.

Questions?

  • Jack
    4 months ago

    Despite Identify Call Double Tracking

    Depsite using an identify API call upon logging in im still getting an anon ID for all the automatic tracking stuff like clicked DIV, but also am running API calls for specific buttons we want to track.

    Screenshot 2025-04-22 at 10.09.26 PM.png

  • Muhammad
    4 months ago

    Can't See Person Profiles

    I've verified all the settings, the events are being captured, sessions have been recorded but People Profiles aren't still being made. What am i missing?

    • Roni
      4 months ago

      Could you share what kind of code snippets you are using? Are you using posthog.identify or $set in a event?

      Please also make sure the distinct_id's are valid and not for example [Object object]. More information in the documentation's troubleshooting section: "What happens if you call identify or alias with invalid inputs?"

    • Muhammad
      Author3 months ago

      This is the Script. !function(t,e){var o,n,p,r;e.__SV||(window.posthog=e,e._i=[],e.init=function(i,s,a){function g(t,e){var o=e.split(".");2==o.length&&(t=t[o[0]],e=o[1]),t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}}(p=t.createElement("script")).type="text/javascript",p.crossOrigin="anonymous",p.async=!0,p.src=s.api_host.replace(".i.posthog.com","-assets.i.posthog.com")+"/static/array.js",(r=t.getElementsByTagName("script")[0]).parentNode.insertBefore(p,r);var u=e;for(void 0!==a?u=e[a]=[]:a="posthog",u.people=u.people||[],u.toString=function(t){var e="posthog";return"posthog"!==a&&(e+="."+a),t||(e+=" (stub)"),e},u.people.toString=function(){return u.toString(1)+".people (stub)"},o="init capture register register_once register_for_session unregister unregister_for_session getFeatureFlag getFeatureFlagPayload isFeatureEnabled reloadFeatureFlags updateEarlyAccessFeatureEnrollment getEarlyAccessFeatures on onFeatureFlags onSurveysLoaded onSessionId getSurveys getActiveMatchingSurveys renderSurvey canRenderSurvey canRenderSurveyAsync identify setPersonProperties group resetGroups setPersonPropertiesForFlags resetPersonPropertiesForFlags setGroupPropertiesForFlags resetGroupPropertiesForFlags reset get_distinct_id getGroups get_session_id get_session_replay_url alias set_config startSessionRecording stopSessionRecording sessionRecordingStarted captureException loadToolbar get_property getSessionProperty createPersonProfile opt_in_capturing opt_out_capturing has_opted_in_capturing has_opted_out_capturing clear_opt_in_out_capturing debug getPageViewId captureTraceFeedback captureTraceMetric".split(" "),n=0;n<o.length;n++)g(u,o[n]);e._i.push([i,s,a])},e.__SV=1)}(document,window.posthog||[]); posthog.init('phc_Dg2rluUGgd4FXqWYX62751yNQyGXbQ74ZDUlvFfqDSL', { api_host: 'https://us.i.posthog.com', person_profiles: 'identified_only', });

  • Emiliano
    a year ago
    • Gareth
      3 months ago

      This really should be a thing

  • Daniel
    a year ago

    Navigating users based on IDs (without names)

    I'm having trouble navigating the users based on (UU)IDs. In our current setup we apply data minimalism and don't replicate users names and other PII into PostHog. However, our application has a UUID identifying a user which we use in the identify call to PostHog when a user logs into our application.

    Now, here's the question: when looking into the People view I have a column "Person" displaying a UUID and a column "ID". Both show UUIDs. Using the application user UUID in the search field allows me to find the corresponding user profile in PostHog. However, for this found user, both the "Person" value (HogQL expression person) and the "ID" value (HogQL expression id) show a different UUID. There seems to be no HogQL field distinct_id (as it is called on client side).

    My expectation would have be able to find exactly the UUID that I passed to identify on client-side when the user logged in. What am I missing?

    • Marcus
      a year agoSolution

      Hey Daniel, the ID of each person is generated by PostHog when a new user is being created. Note that a single user could have multiple distinct_id's. You can find the corresponding ID using this query:

      select person_id
      from person_distinct_ids
      where distinct_id = 'your_distinct_id'
  • Sakshi
    2 years ago

    Why do I see person not found for a user that gets recreated after deletion?

    I deleted a user and all it's events from posthog. And then I recreated the user (by capturing events on my app). The new events get generated successfully and email & name get set as expected. However, when click on the person (of such an event), it says, person not found. Why does it not get recreated properly?

    • Alexandre
      5 months ago

      Hi, I have the same initial issue but the person deleted (me) do not resurfaced when identify is called back. How can I fix this?

  • Florencia
    2 years ago

    Select users in SQL

    When trying to filter users like this

    SELECT * FROM persons WHERE persons.properties.name is in (
    'xxx@yyy.com', 'bbb@zzz.com' )

    It shows me a massage of error: Authentication credentials were not provided.

    What should I do to do queries with this field?

    thanks!

    • Marcus
      2 years agoSolution

      That seems to be another query and another error. Note that the person model itself does not carry an email field. I guess you would rather access the email user property under properties.

  • eyal
    3 years ago

    bulk delete all persons

    hi, i am trying to delete all persons in my posthog . they where inserted by mistake . i try to use the DELETE endpoing . but to delete a person it requires an id. id of type number. in the systme of posthog , the id is string. where can i find the needed id ?

    the end point: const personDeleteUrl = https://app.posthog.com/api/projects/${PROJECT_ID}/persons/${personI.id}/?personal_api_key=${POSTHOG_PERSONAL_API_KEY}

    • Emanuele
      3 years agoSolution

      Hi, you can list persons in your project using this endpoint:

      https://app.posthog.com/api/projects/:project_id/persons/

      You can then use the DELETE endpoint as you were correctly suggesting.

      You can see all persons related endpoints here:

      https://posthog.com/docs/api/persons

  • Peter
    3 years ago

    Exporting Persons to bigQuery or database

    I'd like to export Persons data so I can connect it to our database to create a marketing attribution dashboard.

    Specifically, I want to connect person properties like initial_utm_source to usage data we have in our database.

    How can I do this?

    • Michael
      3 years agoSolution

      Hey! It's probably best to use the PostHog API for this: https://posthog.com/docs/api/persons. Note that the state of a person can change, so you'll need to sync the data from PostHog every so often.

  • Helena
    3 years ago

    Display User Property

    Can we show the user's name rather than the user ID throughout Posthog reports?

    • Yakko
      3 years ago

      Hey Helena,

      If you set the property 'name' on persons that's what we'll use on the list to identify them.

      Best,

      Yakko

    • Karl-Aksel
      3 years agoSolution

      Hey Helena

      If you set the property 'name' on persons that's what we'll use on the list to identify them. Alternatively you can set the 'Person Display Name' properties under project settings!

Was this page useful?

Next article

Sessions

A session is a set of events that try to capture a single use of your product or visit to your website. They are used in multiple areas of PostHog: Session replays Web analytics Session aggregations Session properties Sessions enable you to analyze how exactly users are using your product, their entry and exit points, how long they spend on your site, how active they are, bounce rate, and more. How does PostHog define a session? Our JavaScript Web library and mobile SDKs (Android, iOS, React…

Read next article