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

# Raw Events

> Userpilot can automatically capture events using the raw events auto-capturing feature, which captures events like Clicks, Text Inputs, and Form Submissions.

### Overview

Userpilot can automatically capture events using the raw events auto-capturing feature, which captures events like Clicks, Text Inputs, and Form Submissions. This eliminates the need for manually adding trackable events, it starts collecting data (historical data) from the moment Userpilot is installed and auto-capture enabled, as the data is reflected in Userpilot immediately (real-time data).

Auto-capture can be used in advanced segmentation, content triggering, and analytics (reporting), enabling stakeholders to make data-driven decisions.

### Use Cases

* Identify where your users are spending their time on your product

* Get an intuitive view of your feature usage

* Trigger content based on user behavior

* Track users' activity and understand what features they are interacting with

* Defining a goal using raw events to measure the impact of your in-flows on user behavior

### Raw Events Auto-Capture Enabling/Excluding

Under [Configure - Settings](https://run.userpilot.io/settings/data-capture-privacy), raw events auto-capturing can be enabled/disabled. This has to be enabled for Userpilot to collect users' interactions (clicks, text input, form submissions).

<img src="https://mintcdn.com/userpilot/O1qxAMlVdU0FgGNP/data-events/autocapture/assets/images/Screenshot2025-01-31070858.png?fit=max&auto=format&n=O1qxAMlVdU0FgGNP&q=85&s=ab2420b62a60680180d665deb6240cef" alt="" width="1770" height="392" data-path="data-events/autocapture/assets/images/Screenshot2025-01-31070858.png" />

Excluding certain elements, domains, and locations can also be added under the exclude fields not to be auto-captured by Userpilot.

<img src="https://mintcdn.com/userpilot/O1qxAMlVdU0FgGNP/data-events/autocapture/assets/images/Screenshot2025-01-25175249.png?fit=max&auto=format&n=O1qxAMlVdU0FgGNP&q=85&s=2da2f3bec05765ad9fb8f382706e91c6" alt="" width="1757" height="726" data-path="data-events/autocapture/assets/images/Screenshot2025-01-25175249.png" />

### Types of interactions captured

* **Click**: Any clicks on a button, link, or element (meaningful clicks/actions). In other words, clicking buttons with underlying mutations, links, or elements, each with a descriptive title.

* **Text Input**: Typing a character or more into a text field, with each interaction tied to the field’s placeholder or input name. The description may include the placeholder text or the input name, depending on the field.&#x20;

* **Form Submission**: The user submits a form, typically via a button or submit input which triggers the underlying action or mutation to process the data entered in the form.

### Labeling Raw Events

<Note>
  This is only available for Growth & Enterprise plans
</Note>

Turning a Raw Event into a [**Labeled Event**](../autocapture/visual-labeler) can be done by clicking "Label Event" or "Visaully label" next to the captured Raw Event. Some of the settings will be filled by the way the event was captured, but when labeling the event, it can be customized to your needs. Visually labeling the event gives the option to show the captured event in your web app for further perception.

<img src="https://mintcdn.com/userpilot/O1qxAMlVdU0FgGNP/data-events/autocapture/assets/images/file-WJTloBH6qC.png?fit=max&auto=format&n=O1qxAMlVdU0FgGNP&q=85&s=2809234183976ae2dc16af0365708a80" alt="" width="1786" height="855" data-path="data-events/autocapture/assets/images/file-WJTloBH6qC.png" />

After the event has been labeled, it will appear under [Overview](https://run.userpilot.io/events/overview) with the rest of the events (tracked events, custom events). It can be used for segmentation, content triggering, and creating analytical reports.

<img src="https://mintcdn.com/userpilot/O1qxAMlVdU0FgGNP/data-events/autocapture/assets/images/events.png?fit=max&auto=format&n=O1qxAMlVdU0FgGNP&q=85&s=1115ca53f63642bdcec8af4efa13cb2b" alt="" width="1727" height="625" data-path="data-events/autocapture/assets/images/events.png" />

<Info>
  **Historical data** that's collected for **Raw Events** before labeling can be seen/used in **Event Overview** and **Analytics** (report creation). While creating **Segments** and **Content Triggering** would only consider data that was collected after Labeling the event.
</Info>

<iframe width="700" height="415" src="https://www.youtube.com/embed/25YE0k-8Lrg?si=nrtbWvAIFRGcB8uy" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen />

<Warning>
  Changing the configuration/targeting settings of a Labeled Event affects the historical data collected as well.
</Warning>

### Supported CSS Selectors for Autocapture Raw Events

<Tabs>
  <Tab title="Tag Name">
    Examples: `div`, `span`, `button`, `a`, `form`, `font`, `path`, `svg`, `input`, etc...
  </Tab>

  <Tab title="Tag Name with Class/ID">
    Examples:

    | `a.MuiButtonBase-root.MuiListItem-button.MuiListItem-gutters` |   |
    | ------------------------------------------------------------- | - |
    | `#main-container-id, #table-container-id`                     |   |
    | `div#root`                                                    |   |
  </Tab>

  <Tab title="Nth-child">
    Example: `div.MuiPaper-root.MuiPaper-rounded:nth-child(3)`
  </Tab>

  <Tab title="Attribute Selectors">
    * **Specific Value**: `[attr="V"]` - Select elements that have attribute `attr` with a specific value of `V`. Example: `div[role="button"][aria-haspopup="true"][aria-disabled="false"]`

    * **The Attribute Value Starts With**:  `[attr^="V"]` - Select elements that have attribute `attr` with a value starting with `V`. Example: `div[tabindex="0"][role="button"][aria-labelledby^="period"]`

    * **The Attribute Value Ends With:** `[attr$="V"]` - Select elements that have attribute `attr` with a value ending in `V`

    * **The Attribute Value Contains:** `[attr*="V"]` - Select elements that have attribute `attr` with a value containing `V`

    * **The Attribute Starts With a Value Followed by Hyphen:** `[attr|="V"]` - Select elements that have attribute `attr` with an exact value of `V` or start with `V` followed by a hyphen (`V-`). Example: `[role~="dialog"][aria-describedby|="alert-dialog"]`

    * **The Attribute Value is a Space-Separated List of Words:** `[attr~="V"]` - Select elements that have attribute `attr` for which the value is a space-separated list of words, one of which is the whole word `V`. Example: `[role~="dialog"][aria-describedby|="alert-dialog"]`
  </Tab>

  <Tab title="Combinators">
    * **Child Combinator** examples:

    | `#main-container-id > div.MuiPaper-root.jss1058.jss1046.MuiPaper-elevation0 > div.MuiTabs-root > div > div > a:nth-child(2)[href="/flows/ordering"]`                                                                       |   |
    | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - |
    | `body > div.MuiDrawer-root.jss84.MuiDrawer-modal > div.MuiPaper-root.MuiDrawer-paper.jss85.MuiDrawer-paperAnchorLeft.MuiPaper-elevation16 > div > ul > span:nth-child(1) > a[tabindex="-1"][role="button"][href="/users"]` |   |

    * **Descendant Combinator** examples:

    | `div#root button p`                   |   |    |
    | ------------------------------------- | - | :- |
    | `#main-container-id button > span p`  |   |    |
    | `id=["main-container-id"] button div` |   |    |
    | `div#menu-segment_id li > div`        |   |    |
  </Tab>
</Tabs>

### FAQs

<AccordionGroup>
  <Accordion title="How do Raw Events give better insights on what to track?" defaultOpen={false}>
    Raw Events start to collect data once Userpilot is installed on your web app and auto-capturing is enabled, meaning that you would start collecting data on all your users' interactions giving measures on your user behavior and what to track to be used in analytics, content triggering, etc...
  </Accordion>

  <Accordion title="Are Raw Events supported in Integrations?" defaultOpen={false}>
    Yes, after labeling the raw events, you can send them through our HubSpot, Salesforce, and Webhook integrations. We do have plans to add labeled events to our native integrations as well.
  </Accordion>
</AccordionGroup>

<Frame as="div">
  [For any questions or concerns please reach out to **support@userpilot.com**](mailto:support@userpilot.com)
</Frame>
