People

Last updated:

|Edit this page

People in PostHog represent users who do events.

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

Capturing person profiles and user properties enables:

  • Viewing person profiles in the People tab
  • Filtering on user properties
  • Merging identities across distinct_id values (i.e. merging an anonymous user with a logged in user)
  • Cohort creation
  • Feature flag, experimentation, and survey targeting on user properties
  • Tracking initial UTM values and referrers across anonymous and identified users

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

For backward compatibility and to make sure we don't drop person information accidentally, person profile processing is enabled by default for configs without any option set. Also, if a user distinct ID already has a person profile created, we count events as ones with person profiles. To reset this, delete the person in the person details UI in PostHog or use the DELETE operation of the person API endpoint.

Note: Since we changed our data structure to make person profiles optional, 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.

Capturing person profiles

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

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

  2. person_profiles: 'identified_only' - 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: '<ph_instance_address>',
person_profiles: 'identified_only'
}
)

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

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

Viewing person profiles

Clicking on a person 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 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 a person.

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

Deleting person data

  • Select 'Persons' from the left-hand menu
  • 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 from the PostHog instance. You will be prompted to confirm this action.

Deleting person data with the API

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

Questions?

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