> ## Documentation Index
> Fetch the complete documentation index at: https://docs.morf.health/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Posthog Event

> Event payload details and trigger documentation for Posthog Event data from Posthog

<img src="https://mintcdn.com/morfhealth/EU2WCxuXGIUQcziR/images/posthog.svg?fit=max&auto=format&n=EU2WCxuXGIUQcziR&q=85&s=68f43c29792d2fccd792a68821ad0634" alt="images/posthog.svg" width="50" height="30" data-path="images/posthog.svg" />

# Events

## Triggering Webhook Types

The following event types are associated with the Posthog Event event payload from Posthog.

* `$Autocapture`
* `$Identify`
* `$Pageleave`
* `$Pageview`
* `$Rageclick`
* `$Screen`
* `$Set`
* `$Web Vitals`

<RequestExample>
  ```json Example theme={null}
  {
    "event": {
      "distinct_id": "776b6998-96d2-4914-88b8-c1668170cea0",
      "elements_chain": "button:attr__id=\"pageViewBtn\"attr__onclick=\"trackPageView()\"attr_id=\"pageViewBtn\"nth-child=\"1\"nth-of-type=\"1\"text=\"Track Page View\";div.button-group:attr__class=\"button-group\"nth-child=\"3\"nth-of-type=\"2\";div.container:attr__class=\"container\"nth-child=\"1\"nth-of-type=\"1\";body:nth-child=\"2\"nth-of-type=\"1\"",
      "event": "$pageview",
      "properties": {
        "$browser": "Chrome",
        "$current_url": "https://us.posthog.com/project/158784/pipeline/new/destination/hog-template-webhook"
      },
      "timestamp": "2025-06-02T10:58:03.080Z",
      "url": "https://us.posthog.com/project/158784/events/",
      "uuid": "b677f41f-7cd9-42c4-9015-556c34879707"
    },
    "person": {
      "id": "ecf17b10-8971-4826-a463-1fb9a24a6aff",
      "name": "Example person",
      "properties": {
        "email": "example@posthog.com"
      },
      "url": "https://us.posthog.com/person/ecf17b10-8971-4826-a463-1fb9a24a6aff"
    }
  }
  ```
</RequestExample>

<ResponseExample>
  ```json Description theme={null}
  {
    "event": {
      "distinct_id": "Links events to a specific user",
      "elements_chain": "Contains data on the location of autocapture events in your code",
      "event": "Event name",
      "properties": "Properties of the person",
      "timestamp": "Timestamp of the event",
      "url": "URL associated with the event",
      "uuid": "Unique identifier for this event"
    },
    "person": {
      "id": "Unique identifier for the person",
      "name": "Name of the person",
      "properties": "Properties of the person",
      "url": "URL to the person's profile"
    }
  }
  ```
</ResponseExample>

### Payload Field Details

<ResponseField name="Posthog Event" type="Event Payload">
  <Expandable title="fields" defaultOpen="true">
    <ResponseField name="event" type="object" required>
      *Description coming soon*

      ```json CEL theme={null}
      event
      ```

      ```json Example theme={null}
      {
      "distinct_id": "776b6998-96d2-4914-88b8-c1668170cea0",
      "elements_chain": "button:attr__id=\"pageViewBtn\"attr__onclick=\"trackPageView()\"attr_id=\"pageViewBtn\"nth-child=\"1\"nth-of-type=\"1\"text=\"Track Page View\";div.button-group:attr__class=\"button-group\"nth-child=\"3\"nth-of-type=\"2\";div.container:attr__class=\"container\"nth-child=\"1\"nth-of-type=\"1\";body:nth-child=\"2\"nth-of-type=\"1\"",
      "event": "$pageview",
      "properties": {
      "$browser": "Chrome",
      "$current_url": "https://us.posthog.com/project/158784/pipeline/new/destination/hog-template-webhook"
      },
      "timestamp": "2025-06-02T10:58:03.080Z",
      "url": "https://us.posthog.com/project/158784/events/",
      "uuid": "b677f41f-7cd9-42c4-9015-556c34879707"
      }
      ```
    </ResponseField>

    <ResponseField name="event.uuid" type="string" required>
      Unique identifier for this event

      ```json CEL theme={null}
      event.uuid
      ```

      ```json Example theme={null}
      "b677f41f-7cd9-42c4-9015-556c34879707"
      ```
    </ResponseField>

    <ResponseField name="event.distinct_id" type="string" required>
      Links events to a specific user

      ```json CEL theme={null}
      event.distinct_id
      ```

      ```json Example theme={null}
      "776b6998-96d2-4914-88b8-c1668170cea0"
      ```
    </ResponseField>

    <ResponseField name="event.timestamp" type="timing.v1.Timestamp" required>
      Timestamp of the event

      ```json CEL theme={null}
      event.timestamp
      ```

      ```json Example theme={null}
      "2025-06-02T10:58:03.080Z"
      ```
    </ResponseField>

    <ResponseField name="event.elements_chain" type="string">
      Contains data on the location of autocapture events in your code

      ```json CEL theme={null}
      event.elements_chain
      ```

      ```json Example theme={null}
      "button:attr__id=\"pageViewBtn\"attr__onclick=\"trackPageView()\"attr_id=\"pageViewBtn\"nth-child=\"1\"nth-of-type=\"1\"text=\"Track Page View\";div.button-group:attr__class=\"button-group\"nth-child=\"3\"nth-of-type=\"2\";div.container:attr__class=\"container\"nth-child=\"1\"nth-of-type=\"1\";body:nth-child=\"2\"nth-of-type=\"1\""
      ```
    </ResponseField>

    <ResponseField name="event.url" type="string">
      URL associated with the event

      ```json CEL theme={null}
      event.url
      ```

      ```json Example theme={null}
      "https://us.posthog.com/project/158784/events/"
      ```
    </ResponseField>

    <ResponseField name="event.event" type="string" required>
      Event name

      ```json CEL theme={null}
      event.event
      ```

      ```json Example theme={null}
      "$pageview"
      ```
    </ResponseField>

    <ResponseField name="event.properties" type="object" required>
      Properties of the person

      ```json CEL theme={null}
      event.properties
      ```

      ```json Example theme={null}
      {
      "$browser": "Chrome",
      "$current_url": "https://us.posthog.com/project/158784/pipeline/new/destination/hog-template-webhook"
      }
      ```
    </ResponseField>

    <ResponseField name="person" type="object" required>
      *Description coming soon*

      ```json CEL theme={null}
      person
      ```

      ```json Example theme={null}
      {
      "id": "ecf17b10-8971-4826-a463-1fb9a24a6aff",
      "name": "Example person",
      "properties": {
      "email": "example@posthog.com"
      },
      "url": "https://us.posthog.com/person/ecf17b10-8971-4826-a463-1fb9a24a6aff"
      }
      ```
    </ResponseField>

    <ResponseField name="person.id" type="string" required>
      Unique identifier for the person

      ```json CEL theme={null}
      person.id
      ```

      ```json Example theme={null}
      "ecf17b10-8971-4826-a463-1fb9a24a6aff"
      ```
    </ResponseField>

    <ResponseField name="person.properties" type="object" required>
      Properties of the person

      ```json CEL theme={null}
      person.properties
      ```

      ```json Example theme={null}
      {
      "email": "example@posthog.com"
      }
      ```
    </ResponseField>

    <ResponseField name="person.name" type="string">
      Name of the person

      ```json CEL theme={null}
      person.name
      ```

      ```json Example theme={null}
      "Example person"
      ```
    </ResponseField>

    <ResponseField name="person.url" type="string">
      URL to the person's profile

      ```json CEL theme={null}
      person.url
      ```

      ```json Example theme={null}
      "https://us.posthog.com/person/ecf17b10-8971-4826-a463-1fb9a24a6aff"
      ```
    </ResponseField>
  </Expandable>
</ResponseField>
