# Profiles

> One page per visitor and customer with every click, visit, email, text and sale, their first and last source, and lifetime value. Needs 90-day tracking.

Source: https://datacenter.so/docs/customer-profiles
Section: Measure

Profiles show each person who visits, signs up or buys, one page each. You see every visit, short link click, email or text click, event and sale over time. You also see their first and last source, their orders and what they spent in total (lifetime value).

Each profile has a **stage** (Lead, Engaged, Customer and so on) and one conversation stream: every email and text sent and received, and every visit, goal, form, order and CRM stage, in time order. A box at the bottom lets you write to them. See [Messages](https://datacenter.so/docs/messages).

Open a site, then the **Profiles** tab. Profiles are on paid plans: Solo, Studio, Agency and Custom. Free does not include them.

## Visitors before they give an email

With 90-day tracking, every visitor gets an anonymous profile on their first visit, named like **Visitor 4F2A9C** from their device id. It shows when they were first and last seen, their visits, the page they landed on, their first and latest source (with the ad platform when an ad click id came with them), country, device and browser, and the same journey as a customer: visits, pages, goals and events.

- With **Wait for consent** on, a visitor gets a profile only after they agree.
- When the visitor gives an email (a form, the identify call, a checkout), that profile becomes the customer. Nothing is copied or doubled: it is the same profile, now with their email and name. If the email already belongs to a customer, the visits join that customer.
- An anonymous profile is deleted 90 days after the last visit, when the device id runs out too.
- Your sites keep up to 20,000 anonymous profiles together on Solo, 75,000 on Studio and 150,000 on Agency and Custom. Past that, the visitor seen longest ago, on any of your sites, makes room for each new one, so recent visitors always have a profile. Everyone still counts in your stats and still becomes a customer when they give an email.
- In Private mode there are no visitor profiles. Private mode keeps no id from one day to the next, by design.

On the Profiles tab, **All** lists everyone, anonymous visitors too, and **With email** lists only customers: people who gave an email or another id. Each shows its count. The tab opens on **All**.

### Visits but no profiles?

90-day tracking needs its own tag, the one that loads `sa.js`. The plain tag (`s.js`) still counts visits, but keeps no id, so no one gets a profile and sales tie back only within the same day. When a site with 90-day tracking has sent visits from the plain tag in the last 24 hours, and none from the 90-day tag, the dashboard, the Profiles tab and the **Tracking mode** card in **Settings** say so and show the tag to paste instead.

If your site asks for consent itself and loads the tag only after the visitor agrees, you can leave **Wait for consent** off.

## What you need

1. **90-day tracking** on the site. Profiles build on its first-party id (the `_dc_id` cookie), which ties one person's visits together for 90 days. Switch it in the site's **Settings** tab. See [Tracking modes](https://datacenter.so/docs/tracking-modes).
2. **Consent, where the law asks.** 90-day tracking stores an id on the device. In the EU and UK this usually needs consent first. Turn on **Wait for consent**, and nothing is stored or identified until your banner says yes. Datacenter has a [simple cookie banner](https://datacenter.so/docs/cookie-banner) you can turn on with no code.
3. **Nothing else, for most sites.** The tag you added in setup already adds people who sign up, sign in or send a form. The Profiles tab shows it under **How people are added**.

## How people are added

New people arrive on their own. No importing again.

- **Synced from your tag.** On a new site, the one tag line adds people from sign-up, sign-in and other forms on your site. The card says how many it added this week. Details below.
- **Shopify.** Connect it under **Integrations**. It adds every buyer from their order, and every new customer account, with their email, phone and name. Nothing to add to your theme for this.
- **Stripe, Klaviyo or Mailchimp.** Connect them under **Integrations**. Each brings in its customers or subscribers, and keeps doing so.
- **Sign-ins with no form**, like Sign in with Google, Sign in with Apple or a magic link. Your site never shows a form, so the tag has nothing to read. Add one more line, called right after sign-in. The install step in setup offers it under **Signs people in with Google or a magic link? Add one more line**, and the Profiles card links there. See [Identify on your site](#identify-on-your-site).

**Import a list once** sits under the card as a quiet link: a one-time catch-up for people who have not visited lately. See [Import customers](https://datacenter.so/docs/import-customers). When nothing automatic is on, the card also shows the identify line and server code under **For developers**.

## People from sign-ups and forms

The switch is **Add people from sign-ups and forms**, on the Profiles tab. New sites start with it on. Sites added earlier start with it off; one tap turns it on. Turn it off any time. Your privacy policy should say that your site's forms send the email and name to an analytics service.

When a visitor sends a form on your site that has an email or phone field:

- Datacenter adds them as a customer with the email, and the phone and name if the form has fields for them. Their earlier visits join the profile.
- Sign-up and sign-in forms count. An email typed in a username or login field counts too. A username that is not an email is skipped.
- Forms sent by script, as in many single-page apps, count too. When the page sends the form itself and no submit event fires, a press of the form's submit button counts instead, once. A form the browser would refuse, for example with a required field empty, is not counted.
- It sends a `Form sent` event, which the **Someone fills in a form** goal counts.

What it never does:

- It never reads password fields. A field of type password, or named like a password, card number, security code, IBAN, social security number, secret or token, is skipped before its value is read. Hidden and file fields are skipped too.
- It never reads the rest of the form, only fields that look like an email, a phone or a name.
- It never sends anything in Private mode, and never before the visitor agrees when **Wait for consent** is on.

Press **Test it**, send a form on your site with your own email, then **Check again**. The panel shows the page and the fields it found, never the values.

## Identify on your site

For sign-ins with no form on your site (Google, Apple, magic links), or to send your own user id. Right after someone signs in, tell Datacenter who this is:

```js
window.datacenter?.('identify', { email: user.email, name: user.name, id: user.id });
```

You can send `email`, `phone`, `name` and `id` (your own user id). Send at least one of email, phone or id. The `?.` makes the line safe on pages where the tag is not loaded: it then does nothing.

- It works only with 90-day tracking, and only after consent when you wait for it. In Private mode the call does nothing and sends nothing.
- Earlier visits from the same device join the profile. So the ad or short link that first brought them in becomes their first touch.
- The same email from a phone and a laptop is one customer.

## Identify from your server

Events you send with the [Events API](https://datacenter.so/docs/events-api) identify the customer too, when the site uses 90-day tracking. Send any of `email`, `phone`, `visitor.id` (the `_dc_id` cookie) or `external_ids`:

```js
body: JSON.stringify({
  name: 'Purchase', event_id: 'order-1042', value: 49, currency: 'USD',
  email: order.email,
  visitor: { id: req.cookies._dc_id },
  external_ids: { stripe_customer: order.customer },
}),
```

A sale with a `value` adds an order and its value to the customer. Revenue adds up in the customer's first currency.

### Shopify and Stripe

The easiest way: connect [Stripe](https://datacenter.so/docs/stripe-connector) or [Shopify](https://datacenter.so/docs/shopify-connector) on the site's **Integrations** page (under **Settings**). Orders, refunds and subscriptions then join each customer on their own, with the last 90 days imported.

To send them yourself instead:

### Shopify checkout

Send `orders/paid` webhooks to the Events API with the order email, as in [From a Shopify webhook](https://datacenter.so/docs/events-api#from-a-shopify-webhook). Add `external_ids: { shopify_customer: String(o.customer.id) }`.

### Stripe

Send `checkout.session.completed` to the Events API, as in [From a Stripe webhook](https://datacenter.so/docs/events-api#from-a-stripe-webhook). Copy `_dc_id` into `metadata.dc_id` when you create the session, and send it back as `visitor.id`.

## The customer page

- **Lifetime value**, **orders**, **first seen** and **last seen**.
- **First touch** and **last touch**: the source, campaign, ad platform and short link of their first and latest known visit. A direct visit never replaces a known one.
- **Journey**: one list, newest first. Visits with their source, short link clicks, email and text clicks (visits tagged `utm_medium=email` or `sms`), custom events, server events, purchases with their value, and sends to Meta. Items from other tools show here too. Filter by source or by kind.
- **Seen on**: countries and devices, and what the person is known by.
- **Messages and flows**: whether they agreed to texts or unsubscribed from email, where that answer came from (a website form, an import, the unsubscribe link, a STOP reply) and when, the tags [automations](https://datacenter.so/docs/automations) gave them, and each flow they are in or went through, with a link to it.

Visits and events are kept in detail for about 90 days. After that the journey shows less. The first touch, orders and revenue stay on the profile for as long as the customer does. The page says so when it applies.

## The list

Search by email, name or phone, or by a visitor's name such as `Visitor 4F2A9C`. Sort by last seen, revenue or first seen. **Came from** shows where each person came from: your site, a website form, an import, Stripe, Shopify and so on. Filter by whether they have an email, where they came from (pick **Imported lists** for imports), and by source, ad platform, campaign or short link, for the first touch or the last touch. **Export CSV** downloads the list as it is filtered.

The customer page has a **Contact** card with the email, phone and name, and **Details** with any extra columns from an import.

The [attribution report](https://datacenter.so/docs/attribution-report) counts customers per source and splits them into new and returning. Each count links to the customers behind it.

## Matching and merging

A customer can be known by many things: an email, a phone number, a device id, your user id, and ids in other tools such as a Stripe customer id. When one call shows that two profiles are the same person, they merge into one. The page lists each merge and why.

Two different emails are never merged. If two people share a device, the device moves to whoever identified last.

## Privacy

- Emails and phone numbers are normalized and hashed with SHA-256, the way Meta asks. People are matched on the hashes.
- **Show contact details** (on by default) keeps the email, name and phone number, and details from an import, encrypted, so you can see who is who. Turn it off under **Privacy and data requests** on the Profiles tab. They are then deleted, and people show as a masked label such as `a•••@g•••.com`. While it is off, only hashes are kept.
- Emails, phones, names and details never go into your stats. Events carry only the random device id and a random customer id.
- Anonymous visitor profiles hold no email, phone, name or IP address: only the random device id, dates, counts, the landing page, sources, country, device and browser.

### Delete a customer or visitor

Open the profile, then **Delete this customer** (or **Delete this visitor**). The profile, its ids and its items are deleted. Its ids are never linked again on this site. Visits and events already recorded cannot be edited; they age out within about 90 days.

### Forget this email

For a data request, use **Forget this email** under **Privacy and data requests**. It deletes the customer with that email, if there is one, and never links that email again on this site.
