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

# Custom user attributes

> Send your own member fields from the embed — naming rules, examples, and how they differ from predefined attributes.

Custom user attributes let you send **your own** fields on identify (for example `favorite_feature` or `nps_score`). Project Echo stores them and shows them on the member profile under **Custom attributes**.

They are always stored and always visible on the member page. In future features that **use** attributes for filtering or campaign targeting, custom attributes will require a paid plan. Predefined attributes stay available on Free and Pro — see [Predefined user attributes](https://docs.projectecho.io/team-and-members/predefined-user-attributes.md).

## Naming rules

* Send custom fields only inside `custom_attributes` (never mix them into `attributes`).
* Keys must be `snake_case`: start with a letter, then letters, numbers, or underscores (`^[a-z][a-z0-9_]{0,63}$`).
* Do **not** reuse identity keys (`email`, `first_name`, …), auto-detected keys (`country_code`, `browser_name`, …), or [predefined keys](https://docs.projectecho.io/team-and-members/predefined-user-attributes.md) (`plan`, `is_premium`, …).
* Max **100** distinct custom keys per workspace. Max **50** keys per identify across `attributes` + `custom_attributes`.

## How to add them to the embed

### Script tag (v2)

```html theme={null}
<script
  async
  defer
  src="https://app.projectecho.io/embed/v2/pe-embed.js"
  data-pe-api-base="https://app.projectecho.io"
  data-pe-embed-key-id="YOUR_KEY_ID"
  data-pe-embed-token="pe_embed_..."
  data-pe-subdomain="YOUR_SUBDOMAIN"
  data-pe-portal-base-url="https://YOUR_SUBDOMAIN.projectecho.io"
  data-pe-external-user-id="user_123"
  data-pe-custom-attributes='{"favorite_feature":"roadmap","nps_score":9,"cohort":"beta_2024"}'
></script>
```

Escape the JSON correctly in your template language so quotes stay valid HTML attributes.

### With predefined attributes together

```html theme={null}
<script
  async
  defer
  src="https://app.projectecho.io/embed/v2/pe-embed.js"
  data-pe-api-base="https://app.projectecho.io"
  data-pe-embed-key-id="YOUR_KEY_ID"
  data-pe-embed-token="pe_embed_..."
  data-pe-subdomain="YOUR_SUBDOMAIN"
  data-pe-portal-base-url="https://YOUR_SUBDOMAIN.projectecho.io"
  data-pe-external-user-id="user_123"
  data-pe-attributes='{"plan":"pro","is_premium":true}'
  data-pe-custom-attributes='{"favorite_feature":"changelog"}'
></script>
```

### Programmatic identify

```js theme={null}
ProjectEcho.identify({
  attributes: {
    plan: 'pro',
    is_premium: true,
  },
  custom_attributes: {
    favorite_feature: 'roadmap',
    nps_score: 9,
    cohort: 'beta_2024',
  },
});
```

### Identify API body

```json theme={null}
{
  "subdomain": "your-subdomain",
  "external_user_id": "user_123",
  "custom_attributes": {
    "favorite_feature": "roadmap",
    "nps_score": 9
  }
}
```

## Types

You do not declare types in the payload. On the **first** successful value for a new custom key, Project Echo infers the type:

| First value shape | Stored as |
| - | - |
| `true` / `false` | boolean |
| Whole number | integer |
| Decimal number | float |
| `YYYY-MM-DD` | date |
| ISO timestamp | datetime |
| Other string | text |

Later values must match that type. Mismatches are skipped; identify still succeeds. Send `null` to clear a value.

## Where they appear

**Members** → open a member → **Custom attributes**. The section is hidden until at least one custom value exists.

## Related

* [Predefined user attributes](https://docs.projectecho.io/team-and-members/predefined-user-attributes.md)
* [Standard user properties](https://docs.projectecho.io/team-and-members/standard-user-properties.md)
* [Embed My app](https://docs.projectecho.io/api-mcp-and-embed/embed-my-app.md)

Questions? [support@projectecho.io](mailto:support@projectecho.io) · [Help Center](https://docs.projectecho.io/index.md).


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