> ## 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 button clicks

> Record button clicks and other interactions with the Unify Intent client.

export const UnifyLogoLight = () => <svg className="block dark:hidden" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
    <path d="M1.00985 11.8422C1.00985 10.6279 1.00985 9.41364 1.00985 8.19937C1.00985 7.70467 1.03983 7.19498 1.17475 6.71526C1.39961 5.93574 1.84934 5.30611 2.52393 4.8414C3.39341 4.25675 4.30786 3.73206 5.26728 3.29733C6.45157 2.74266 7.62086 2.83261 8.74518 3.44724C10.2293 4.25675 11.6984 5.09624 13.1675 5.92074C14.1119 6.46042 15.0564 6.9851 16.0158 7.52478C16.6604 7.89955 17.2001 8.37926 17.5599 9.03886C17.8447 9.54856 17.9796 10.1032 18.0246 10.6879C18.0396 10.8977 18.0396 11.1226 18.0396 11.3325C18.0396 13.806 18.0396 16.2795 18.0396 18.768C18.0396 19.3077 17.9946 19.8473 17.7997 20.357C17.5149 21.1516 17.0052 21.7962 16.2706 22.2309C15.4911 22.6956 14.7116 23.1603 13.9021 23.5651C12.7328 24.1647 11.5485 24.1348 10.3792 23.5351C9.97444 23.3252 9.58467 23.1004 9.19491 22.8755C7.18612 21.7362 5.17733 20.6119 3.15355 19.4726C2.5839 19.1578 2.0892 18.768 1.71442 18.2433C1.27968 17.6437 1.05482 16.9691 1.03983 16.2345C1.02484 15.5449 1.02484 14.8554 1.02484 14.1508C0.994856 13.3862 0.994856 12.6067 1.00985 11.8422ZM14.6666 22.3658C14.8165 22.3209 14.8615 22.2309 14.8615 22.096C14.8615 21.5863 14.8615 21.0616 14.8615 20.5519C14.8615 20.2071 14.7116 19.9523 14.3968 19.7724C12.5979 18.753 10.784 17.7336 8.98504 16.7292C8.74518 16.5943 8.50533 16.4744 8.26547 16.3245C7.50093 15.8448 6.91628 15.1852 6.58648 14.3307C6.37661 13.776 6.31665 13.2064 6.31665 12.6217C6.31665 10.6579 6.31665 8.67908 6.31665 6.71526C6.31665 6.4904 6.31665 6.26554 6.31665 6.02568C6.31665 5.72586 6.16674 5.51599 5.8969 5.36608C5.44717 5.11123 4.99744 4.87138 4.54771 4.61653C4.42779 4.55657 4.30786 4.51159 4.15795 4.43664C4.15795 4.55657 4.15795 4.64651 4.15795 4.73646C4.15795 7.34489 4.15795 9.95331 4.17294 12.5617C4.17294 13.2813 4.18793 14.0009 4.24789 14.7204C4.32285 15.6049 4.7276 16.3545 5.38721 16.9691C5.74699 17.2989 6.15175 17.5537 6.57149 17.7936C8.92507 19.1278 11.2787 20.462 13.6322 21.7962C13.977 21.9911 14.3368 22.1859 14.6666 22.3658ZM14.7715 16.3395C14.8015 16.1746 14.8315 16.0546 14.8315 15.9347C14.8315 14.8254 14.8465 13.716 14.8315 12.5917C14.8165 11.6773 14.4867 10.8528 13.8571 10.1632C13.4673 9.72845 12.9876 9.39865 12.4779 9.11382C11.5635 8.60413 10.649 8.07944 9.73458 7.56975C9.68961 7.53977 9.62965 7.52478 9.55469 7.4798C9.5397 7.77962 9.50972 8.03447 9.50972 8.30431C9.50972 9.02387 9.50972 9.74344 9.52471 10.463C9.52471 10.9877 9.52471 11.5274 9.65963 12.0371C9.92947 13.1464 10.5891 13.9859 11.5785 14.5705C12.4929 15.1102 13.4224 15.6199 14.3518 16.1446C14.4717 16.2195 14.6066 16.2645 14.7715 16.3395Z" fill="black" />
    <path d="M8.14551 1.67818C8.17549 1.66318 8.20547 1.64819 8.23545 1.6332C8.985 1.22845 9.70457 0.793708 10.4691 0.418935C11.5485 -0.12074 12.6578 -0.12074 13.7671 0.313998C13.887 0.358971 13.992 0.418935 14.1119 0.478898C16.5554 1.84308 18.984 3.20725 21.4275 4.57143C21.8173 4.79629 22.177 5.05114 22.4769 5.38094C22.9566 5.92062 23.2264 6.56523 23.3164 7.2698C23.3463 7.53964 23.3613 7.80948 23.3613 8.07931C23.3613 10.7027 23.3613 13.3262 23.3613 15.9496C23.3613 16.864 23.1065 17.6885 22.4919 18.3931C22.237 18.6929 21.9522 18.9478 21.6074 19.1426C20.8428 19.5924 20.0783 20.0271 19.2988 20.4768C19.2838 20.4918 19.2538 20.4918 19.2388 20.5068C19.2238 20.4918 19.2238 20.4918 19.2088 20.4768C19.2388 20.4169 19.2838 20.3719 19.3138 20.3119C19.8834 19.5774 20.1683 18.7529 20.1683 17.8234C20.1683 15.0651 20.1832 12.3068 20.1533 9.54843C20.1383 8.13928 19.4937 7.04494 18.2644 6.31038C17.0801 5.60581 15.8659 4.91622 14.6666 4.24163C13.4223 3.53705 12.1631 2.84747 10.9188 2.15789C10.0943 1.70816 9.20987 1.57324 8.28043 1.67818" fill="black" />
  </svg>;

export const UnifyLogoDark = () => <svg className="hidden dark:block" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
    <path d="M1.00985 11.8422C1.00985 10.6279 1.00985 9.41364 1.00985 8.19937C1.00985 7.70467 1.03983 7.19498 1.17475 6.71526C1.39961 5.93574 1.84934 5.30611 2.52393 4.8414C3.39341 4.25675 4.30786 3.73206 5.26728 3.29733C6.45157 2.74266 7.62086 2.83261 8.74518 3.44724C10.2293 4.25675 11.6984 5.09624 13.1675 5.92074C14.1119 6.46042 15.0564 6.9851 16.0158 7.52478C16.6604 7.89955 17.2001 8.37926 17.5599 9.03886C17.8447 9.54856 17.9796 10.1032 18.0246 10.6879C18.0396 10.8977 18.0396 11.1226 18.0396 11.3325C18.0396 13.806 18.0396 16.2795 18.0396 18.768C18.0396 19.3077 17.9946 19.8473 17.7997 20.357C17.5149 21.1516 17.0052 21.7962 16.2706 22.2309C15.4911 22.6956 14.7116 23.1603 13.9021 23.5651C12.7328 24.1647 11.5485 24.1348 10.3792 23.5351C9.97444 23.3252 9.58467 23.1004 9.19491 22.8755C7.18612 21.7362 5.17733 20.6119 3.15355 19.4726C2.5839 19.1578 2.0892 18.768 1.71442 18.2433C1.27968 17.6437 1.05482 16.9691 1.03983 16.2345C1.02484 15.5449 1.02484 14.8554 1.02484 14.1508C0.994856 13.3862 0.994856 12.6067 1.00985 11.8422ZM14.6666 22.3658C14.8165 22.3209 14.8615 22.2309 14.8615 22.096C14.8615 21.5863 14.8615 21.0616 14.8615 20.5519C14.8615 20.2071 14.7116 19.9523 14.3968 19.7724C12.5979 18.753 10.784 17.7336 8.98504 16.7292C8.74518 16.5943 8.50533 16.4744 8.26547 16.3245C7.50093 15.8448 6.91628 15.1852 6.58648 14.3307C6.37661 13.776 6.31665 13.2064 6.31665 12.6217C6.31665 10.6579 6.31665 8.67908 6.31665 6.71526C6.31665 6.4904 6.31665 6.26554 6.31665 6.02568C6.31665 5.72586 6.16674 5.51599 5.8969 5.36608C5.44717 5.11123 4.99744 4.87138 4.54771 4.61653C4.42779 4.55657 4.30786 4.51159 4.15795 4.43664C4.15795 4.55657 4.15795 4.64651 4.15795 4.73646C4.15795 7.34489 4.15795 9.95331 4.17294 12.5617C4.17294 13.2813 4.18793 14.0009 4.24789 14.7204C4.32285 15.6049 4.7276 16.3545 5.38721 16.9691C5.74699 17.2989 6.15175 17.5537 6.57149 17.7936C8.92507 19.1278 11.2787 20.462 13.6322 21.7962C13.977 21.9911 14.3368 22.1859 14.6666 22.3658ZM14.7715 16.3395C14.8015 16.1746 14.8315 16.0546 14.8315 15.9347C14.8315 14.8254 14.8465 13.716 14.8315 12.5917C14.8165 11.6773 14.4867 10.8528 13.8571 10.1632C13.4673 9.72845 12.9876 9.39865 12.4779 9.11382C11.5635 8.60413 10.649 8.07944 9.73458 7.56975C9.68961 7.53977 9.62965 7.52478 9.55469 7.4798C9.5397 7.77962 9.50972 8.03447 9.50972 8.30431C9.50972 9.02387 9.50972 9.74344 9.52471 10.463C9.52471 10.9877 9.52471 11.5274 9.65963 12.0371C9.92947 13.1464 10.5891 13.9859 11.5785 14.5705C12.4929 15.1102 13.4224 15.6199 14.3518 16.1446C14.4717 16.2195 14.6066 16.2645 14.7715 16.3395Z" fill="white" />
    <path d="M8.14551 1.67818C8.17549 1.66318 8.20547 1.64819 8.23545 1.6332C8.985 1.22845 9.70457 0.793708 10.4691 0.418935C11.5485 -0.12074 12.6578 -0.12074 13.7671 0.313998C13.887 0.358971 13.992 0.418935 14.1119 0.478898C16.5554 1.84308 18.984 3.20725 21.4275 4.57143C21.8173 4.79629 22.177 5.05114 22.4769 5.38094C22.9566 5.92062 23.2264 6.56523 23.3164 7.2698C23.3463 7.53964 23.3613 7.80948 23.3613 8.07931C23.3613 10.7027 23.3613 13.3262 23.3613 15.9496C23.3613 16.864 23.1065 17.6885 22.4919 18.3931C22.237 18.6929 21.9522 18.9478 21.6074 19.1426C20.8429 19.5924 20.0783 20.0271 19.2988 20.4768C19.2838 20.4918 19.2538 20.4918 19.2388 20.5068C19.2238 20.4918 19.2238 20.4918 19.2088 20.4768C19.2388 20.4169 19.2838 20.3719 19.3138 20.3119C19.8834 19.5774 20.1683 18.7529 20.1683 17.8234C20.1683 15.0651 20.1833 12.3068 20.1533 9.54843C20.1383 8.13928 19.4937 7.04494 18.2644 6.31038C17.0801 5.60581 15.8659 4.91622 14.6666 4.24163C13.4223 3.53705 12.1631 2.84747 10.9188 2.15789C10.0943 1.70816 9.20987 1.57324 8.28043 1.67818" fill="white" />
  </svg>;

## Overview

Website and product interactions are a strong indicator of a visitor's goal. For
example, a visitor to your marketing website who interacts with a pricing
calculator is much more likely to be an interested buyer than the average
visitor.

In Unify, you capture these types of interactions by sending a custom event when
buttons or website components are clicked. If a visitor is then identified
(e.g., from another form fill or based on company IP matches), their
interactions can be viewed in Unify and used to run Plays.

## Prerequisites

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

## Example

Suppose you have a button that opens your pricing calculator. You can log this
interaction with a custom event that includes useful context as properties.

### Send a custom event

Call `track` when the button is clicked. Include properties that help with
attribution and routing later (e.g., `button_id`, page, placement, or variant).

```ts theme={null}
unify.track('Pricing Calculator Opened', {
  button_id: 'pricing-calculator',
  placement: 'pricing-page-hero',
});
```

### Send multiple custom events

There's no limit on the number of events you can send into Unify, and more data
is always better. You can fire off multiple custom events to capture
interactions at a more granular level.

For example, suppose your pricing calculator contains buttons to select which
pricing plan to view (e.g., "Basic," "Pro," "Enterprise"). You can send an event
each time this button is clicked:

```ts theme={null}
unify.track('Pricing Plan Selected', {
  button_id: 'select-pro-plan',
  plan: 'Pro',
});
```

Suppose that the pricing calculator also contains a slider to select the usage
quantity they expect to use. This information can be sent as well:

```ts theme={null}
unify.track('Pricing Quantity Selected', {
  slider_id: 'usage-quantity',
  credits_needed: '5000',
  plan: 'Pro',
});
```

Now, you can run a Play that segments visitors based on what pricing tier they
are most likely to be interested in. Your reps will also know what usage tier
they viewed or selected.

### Identifying the visitor

This example assumes the button click itself does not collect any information
about the visitor, such as name or email address. That's fine—if the visitor is
identified later (e.g., via form fill or IP match), Unify will link this event
to that person or company.

If you *do* have information about the visitor at click time, you should also
send an Identify event. This will immediately link the visitor to the person
or company you specify.

```ts theme={null}
// Send a basic "Identify" event
unify.identify('alice@acme.com');

// Send an "Identify" event with company and person information
unify.identify('alice@acme.com', {
  person: {
    email: 'alice@acme.com',
    first_name: 'Alice',
    last_name: 'Smith',
    title: 'Product Manager',
  },
  company: {
    name: 'Acme Inc.',
    domain: 'acme.com',
  },
});
```

You do not need to send an Identify event on every click. Send it wherever you
first learn the visitor's identity and then subsequent events will be linked
automatically.

## Launch a Play

With this custom event in place, you can create Plays in Unify that react to
high‑intent clicks like “Pricing Calculator Opened.” For example, a Play could:

1. Apply exclusions (competitors, open opportunities, current customers)
2. Launch an AI agent to research the company or person for ICP fit
3. Enroll the person in a follow‑up sequence
4. Prospect more contacts at the same company and enroll them in outreach

## FAQ

<AccordionGroup>
  <Accordion title="What properties should I include?">
    Include any information that may help you qualify and route interactions,
    such as:

    * Button or form identifier
    * Values entered by the visitor
    * Page or component context
    * Variant (for A/B tests)

    When in doubt, err on the side of including more properties.
  </Accordion>
</AccordionGroup>
