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

# Identify visitors with Stripe or a custom event

> How an anonymous Radar visitor becomes an identified person: automatically through Stripe, or when your code sends an email on a custom event.

Every Radar visitor starts anonymous: Radar recognizes them without any personal information and shows a generated name. A visitor becomes an identified person when Radar learns their email, and in some cases their name. This guide explains the two ways that happens, which fields Radar reads, and the rule that decides whether a name shows up on the People page.

Not a developer? The Help Center article on [identifying visitors](https://docs.taap.it/help/radar/features/identify-visitors.md) gives the short version.

## Two ways a visitor gets identified

| Way | What you do | Code needed |
| - | - | - |
| Through Stripe | Connect Stripe to your Radar project. Paying customers are identified from their payment. | No |
| Through a custom event | Send the visitor's identity fields with `visitors.track`, at the moment you learn who they are. | Yes |

> [!NOTE]
>
> Radar has no separate `identify` method. Identity travels on your custom events, as ordinary properties with reserved names.

## Identify through Stripe

When Stripe is connected, each paying customer is identified automatically. Radar takes the email and the name from the payment and links them to the visitor's session. You have nothing to send.

This covers customers who pay on the Stripe Checkout page, the payment page hosted by Stripe. If your site has its own payment page, you also send a `payment` event. See [track revenue](https://docs.taap.it/radar/guides/track-revenue.md).

## Identify with a custom event

Add the identity fields to the properties of any `visitors.track` call:

```javascript theme={null}
visitors.track("signup", {
  email: "jane@example.com",
});
```

If custom events are new to you, start with [send custom events](https://docs.taap.it/radar/guides/custom-events.md).

### The fields Radar reads

| Field | What it holds | When Radar uses it |
| - | - | - |
| `email` | The visitor's email address. | On any event, whatever its name. |
| `name` | The visitor's full name. | Only on an event named exactly `payment`. |
| `first_name` | The visitor's first name. | Only on an event named exactly `payment`. |
| `last_name` | The visitor's last name. | Only on an event named exactly `payment`. |

### Which field wins

When an event carries `name` together with `first_name` and `last_name`, `name` takes priority. Send `name` when you already have the full name as your customer typed it.

### The rule about names and `payment`

An email identifies the visitor on any event. A name does not. Radar copies `name`, `first_name` and `last_name` to the People page only when they arrive on an event named exactly `payment`. On any other event, these fields stay attached to the event itself, and the People page keeps showing the generated name.

Compare the two calls:

```javascript Sign-up theme={null}
// The visitor is identified by their email.
// The People page still shows a generated name.
visitors.track("signup", {
  email: "jane@example.com",
  first_name: "Jane",
  last_name: "Doe",
});
```

```javascript Payment theme={null}
// The visitor is identified by their email,
// and the People page shows "Jane Doe".
visitors.track(
  "payment",
  {
    email: "jane@example.com",
    first_name: "Jane",
    last_name: "Doe",
    name: "Jane Doe",
  },
  {
    revenue_amount: 49,
    revenue_currency: "USD",
  }
);
```

> [!WARNING]
>
> Keep `payment` for real sales. It is the event that carries the amount of a sale, so do not send it only to make a name appear.

## When to identify

Identify a visitor at the first moment you know who they are. Their earlier, anonymous history stays with them, so you see what they did before and after.

| Moment | Example event name | What to send |
| - | - | - |
| Sign-up | `signup` | `email` |
| Login | `login` | `email` |
| Call booked or contact form sent | `book_call`, `contact_form_submit` | `email` |
| Newsletter subscription | `newsletter_subscribe` | `email` |
| Purchase on your own payment page | `payment` | `email`, the name fields, and the amount |
| Purchase on the Stripe Checkout page | None | Nothing, once Stripe is connected |

The event names are examples, except `payment`. Use the names that fit your product.

### On sign-up or login

Send the event once the account is created or the login has succeeded. Read the email from your own user object instead of typing it in the code.

```javascript theme={null}
function onSignupSuccess(user) {
  visitors.track("signup", {
    email: user.email,
  });
}

function onLoginSuccess(user) {
  visitors.track("login", {
    email: user.email,
  });
}
```

### On a booking or a form

One call records the action and identifies the person. In this example, `submitBooking` stands for your own booking code.

```javascript theme={null}
async function onBookCall(form) {
  const result = await submitBooking(form);
  if (!result.success) return;

  visitors.track("book_call", {
    source: "landing",
    email: form.email,
  });
}
```

### On a purchase

On your own payment page, send the `payment` event once the payment is confirmed. This is the only event on which the name fields reach the People page.

```javascript theme={null}
function onPaymentConfirmed(order) {
  visitors.track(
    "payment",
    {
      email: order.customer.email,
      first_name: order.customer.firstName,
      last_name: order.customer.lastName,
      name: order.customer.fullName,
    },
    {
      revenue_amount: order.total,
      revenue_currency: order.currency,
    }
  );
}
```

The three arguments are detailed in [track revenue](https://docs.taap.it/radar/guides/track-revenue.md).

## Check that a visitor is identified

**1. Do the action yourself**

On your published site, sign up, log in or fill in the form with a test email address.

**2. Open the People page**

In your Radar project, go to People and find your visit. The visitor now carries the email you sent. Click the line to open their full history.

**3. Check the name, if you sent a payment event**

After a `payment` event with name fields, the People page shows the real name instead of the generated one.

You can run the same check from your own tools with the Radar API. The `identity` filter keeps only identified visitors:

```bash theme={null}
curl -X GET 'https://taap.it/api/v1/radar/people?start=2026-11-01T00:00:00Z&end=2026-11-30T23:59:59Z&identity=identified' \
  -H 'Authorization: Bearer taapit_your_api_key_here'
```

Each person comes back with a `status` (`identified` or `anonymous`), an `email`, and a `name` that holds the real name when Radar knows it and a generated one otherwise. See the [people endpoint](https://docs.taap.it/api-reference/radar/people.md). The Radar API is available from the Pro plan.

## Before you ship this

> [!WARNING]
>
> Identifying visitors is not the same thing as anonymous analytics. Features that identify visitors require a consent banner. Read [privacy, cookies and GDPR](https://docs.taap.it/help/radar/privacy-and-consent.md) and check your banner and your privacy policy first.

## Good to know

* **Radar only knows what it is sent.** It does not reveal the name or the company of a visitor who never gave you their details.
* **Every call is an event.** An identifying event counts toward the events your plan includes each month, like any other custom event. See [plans and events](https://docs.taap.it/help/radar/plans-and-events.md).
* **No webhooks.** Radar does not notify your systems when a visitor is identified or comes back. Read the data with the [Radar API](https://docs.taap.it/api-reference/radar/introduction.md) instead.

## Next steps

> [card] [Send custom events](https://docs.taap.it/radar/guides/custom-events.md)
>
> The call, its arguments and when to send it.

> [card] [Track revenue](https://docs.taap.it/radar/guides/track-revenue.md)
>
> Connect Stripe or send a payment event from your own payment page.


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