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

# Capture form fills

> Record form submissions with the Unify Intent client.

## Overview

One of the most effective ways to capture leads on your website is through form
submissions. With Unify, you can capture these submissions and then run plays on
them.

The Unify Intent client can be used to capture these form fills. This can be
achieved by firing two separate events:

* **Custom event** — This captures the submission and any data entered into the
  form. Any plays will be able to filter companies or people based on whether
  they have a matching custom event.
* **Identify event** — This captures the identity of the visitor and links them
  to a company or person in Unify. The Identify event is necessary to associate
  the form submission with a specific person or company.

Typically, the simplest approach is to send both events at the same time when a
visitor completes and submits a form.

## Prerequisites

* Ensure you've already installed the Unify Intent client on your website.
  See [Set up the Unify Intent client](https://docs.unifygtm.com/developers/guides/website-traffic/unify-intent-client.md)
  for instructions.

## Example

Suppose you have a "demo sign-up" form that collects the following information:

* **First name** (e.g., `Alice`)
* **Last name** (e.g., `Smith`)
* **Email address** (e.g., `alice@acme.com`)
* **Company name** (e.g., `Acme Inc.`)
* **What are you most interested in seeing?** (e.g., `AI capabilities`)

To send this data into Unify, you should send two events.

### Send a custom event

First, send a custom event that records the form submission. The form fields can
be included as *properties* on the event. Properties are arbitrary key-value
pairs that can be viewed and used to filter events in Unify.

```ts theme={null}
unify.track('Demo Requested', {
  form_id: 'demo-signup',
  first_name: 'Alice',
  last_name: 'Smith',
  company: 'Acme Inc.',
  interest: 'AI capabilities',
});
```

### Send an Identify event

Next, send an Identify event that associates the submission with a known person
(using their email address). You can also include additional traits about the
person and their company. These traits will appear on the person and company
records in Unify.

```ts theme={null}
unify.identify('alice@acme.com', {
  person: {
    email: 'alice@acme.com',
    first_name: 'Alice',
    last_name: 'Smith',
  },
  company: {
    name: 'Acme Inc.',
  },
});
```

## Launch a play

With both events sent, you can now create plays in Unify that run on the inbound
lead. Plays can be triggered based on the custom event (e.g., "Demo Requested")
and can use filters based on the properties you sent.

For example, a play running on inbound form fills could:

1. Apply exclusions to ensure the inbound lead is not a competitor, open
   opportunity, or existing customer
2. Launch an AI agent to research the company or person and qualify or
   disqualify them based on ICP fit or other criteria
3. Enroll the person in an outbound sequence
4. Find a few more contacts at the same company that match your ideal buyer
   persona and enroll them in another outbound sequence

## FAQ

> [accordion] What if I don't have an email address?
>
> If you don't have an email address to include in the Identify event, Unify
> will not have a unique identifier to link this visitor to a person. However,
> you have other options.
>
> **Link to a company instead:**
>
> If you have a company website, you can send an Identify event with the
> visitor's company instead. This will not link the custom event to a specific
> person, but it will link it to a specific company.
>
> You can then run a play on companies with matching custom events. That play
> can prospect for contacts at the company with ICP personas.
>
> **Capture identity elsewhere:**
>
> If the visitor does not provide an email address on the form, consider
> capturing their identity elsewhere on your website. For example:
>
> * If you have another sign-up form that collects email addresses, you can
>   send an Identify event when a visitor completes that form.
> * If you link the custom event to a company, prospect for people at that
>   company, and then send sequence emails to them, you can track email link
>   clicks. When a person clicks a link in an email, their website activity
>   will be identified.
>
> If the visitor is identified through other means, all of their past activity
> will also be retroactively identified.
>
> **Automatically identify the company:**
>
> If you do not send an Identify event, Unify will still automatically attempt
> to identify the visitor's company using reveal providers based on their IP
> address.

> [accordion] How is a person linked to a company?
>
> If you send an Identify event with a corporate email address but no company,
> Unify can infer the company from the email domain.
>
> For example, if you identify a visitor as `alice@acme.com`, Unify can link
> the person to the company with the `acme.com` domain. This inference is not
> performed for personal or non-corporate email domains. If the visitor uses a
> personal email address, include a company domain in the Identify event when
> you want to link the person to a company.

> [accordion] Can I track partial form fills?
>
> Yes. If you want to track partial progress before final submission, send a
> custom event when a meaningful step is completed or enable automatic email
> input monitoring with the Unify Intent Client.
>
> For most lead routing workflows, still send a final custom event when the
> form is actually submitted. This gives you a clean trigger for plays and
> avoids treating abandoned form activity as a submitted form.

> [accordion] Should I send both a custom event and an Identify event?
>
> Usually, yes. The custom event captures what happened, such as `Demo
>         Requested`. The Identify event captures who did it. Sending both gives you a
> reliable play trigger and a person or company record to act on.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.