> ## 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.

# Install the embed

> Add Project Echo to your product with one workspace embed key, an AI install prompt, and domain-bound security.

The **My app** embed identifies your end users in Project Echo, syncs [standard](https://docs.projectecho.io/team-and-members/standard-user-properties.md) and [predefined](https://docs.projectecho.io/team-and-members/predefined-user-attributes.md) attributes, and powers in-app [Campaigns](https://docs.projectecho.io/campaigns/campaigns-overview.md).

Each workspace has **one primary embed key**. You do not create named keys or paste origin allowlists. Instead you set an **app domain** (for example `acme.com`). Identify requests are allowed when the browser `Origin` host is that domain, a subdomain of it, or `localhost` / `127.0.0.1`.

## Install with an AI coding agent (recommended)

1. Sign in at [app.projectecho.io](https://app.projectecho.io).
2. Open **Integrations → My app** (or complete the **Connect your product** step during onboarding).
3. Confirm your **App domain**.
4. Choose your backend / framework.
5. Select **Copy prompt** and paste the prompt into Cursor, Claude Code, or your agent of choice.

The prompt includes your real key id and token, the v2 script tag, identity fields, and guidance for predefined and custom attributes.

Treat the embed token like an API key. If it is exposed, use **Rotate embed key** in My app and update your app.

## What the snippet must include

| Attribute | Required | Purpose |
| - | - | - |
| `data-pe-embed-key-id` | Yes | Workspace embed key id |
| `data-pe-embed-token` | Yes | Secret token (`pe_embed_…`) |
| `data-pe-subdomain` | Yes | Your portal subdomain |
| `data-pe-external-user-id` | Yes | Stable user id from your database |
| `data-pe-email` / name fields | Recommended | Member profile |
| `data-pe-attributes` | Optional | [Predefined attributes](https://docs.projectecho.io/team-and-members/predefined-user-attributes.md) JSON |
| `data-pe-custom-attributes` | Optional | [Custom attributes](https://docs.projectecho.io/team-and-members/custom-user-attributes.md) JSON |

Use embed **v2** (`/embed/v2/pe-embed.js`) for identify + Campaigns. Existing v1 installs keep working.

## Verify the integration

During onboarding, choose **Verify integration**. Project Echo baselines existing members, then checks every few seconds for a **new identify** (new member or updated last seen).

After you deploy the snippet, log in to your product as a test user. That user should appear under **Members**.

You can skip install or skip verification and finish onboarding later from **Integrations → My app**.

## Custom attributes and plans

Custom attributes are stored and shown on member profiles. Using them for campaign targeting and segmentation requires a **paid** Project Echo plan. Predefined attributes are available on Free and Pro.

## Related

* [Embed My app (overview)](https://docs.projectecho.io/api-mcp-and-embed/embed-my-app.md)
* [Predefined user attributes](https://docs.projectecho.io/team-and-members/predefined-user-attributes.md)
* [Custom user attributes](https://docs.projectecho.io/team-and-members/custom-user-attributes.md)
* [Show campaigns with the embed](https://docs.projectecho.io/api-mcp-and-embed/show-campaigns-with-the-embed.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.