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

# Cello + Codex integration

> How to add user referrals to your app using Cello with Codex

Codex can implement Cello user referrals end-to-end if you give it the **right guidance** and force it to create a plan before coding. The Cello plugin for ChatGPT and Codex gives it both in one install.

> [card] [Install the Cello plugin](https://chatgpt.com/plugins/cello)
>
> Cello MCP server plus the integration guide, health check, and program performance skills.

![Cello plugin for ChatGPT and Codex](https://mintcdn.com/cello/X9r1IKT5c5ilptad/coding-apps/codex_cello_plugin.png?fit=max\&auto=format\&n=X9r1IKT5c5ilptad\&q=85\&s=af5cae6200c14df0c5469f488fea92a4)

## Prerequisites

Before integrating Cello, ensure the following prerequisites are met:

* Signup and authentication flow with a database to store user records is functional.
* Stripe or Chargebee subscription flow is functional.
* You have a Cello account and API keys at hand.

> [!NOTE]
>
> You can integrate directly on production - your account stays in **pre-launch phase** until you launch, so all events are recorded as test data and nothing is paid out. A sandbox is optional if you prefer a separate environment.

## Install the Cello plugin

The [Cello plugin](https://chatgpt.com/plugins/cello) bundles the [Cello MCP server](https://docs.cello.so/mcp/introduction.md) and three skills. The MCP server gives Codex direct access to Cello's documentation, your integration status, your incoming events, and best-practice recommendations. The skills tell Codex how to use them:

| Skill | What it does |
| - | - |
| `cello-get-integration-guide` | Analyzes your app and builds a tailored integration plan |
| `cello-integration-health-check` | Checks each integration component and explains what is failing |
| `cello-get-program-performance` | Summarizes program health, trends, benchmarks, and top referrers |

> [tab] ChatGPT desktop app
>
> 1. Open the [Cello plugin page](https://chatgpt.com/plugins/cello), or open **Plugins** in the ChatGPT desktop app and search for **Cello**.
> 2. Select **Install plugin**.
> 3. Sign in with your Cello account when prompted. There's no token to generate or paste.
> 4. Start a new Codex chat. Type `@` and check that **Cello** and its skills are listed.

> [tab] Codex CLI
>
> 1. Start Codex and open the plugin browser:
>
>    ```text theme={null}
>    codex
>    /plugins
>    ```
>
> 2. Find **Cello** and install it.
>
> 3. Sign in with your Cello account when prompted. There's no token to generate or paste.
>
> 4. Start a new Codex session so the plugin's skills and tools are loaded. In `/plugins`, Cello should show as installed and turned on.

> [!NOTE]
>
> The Codex IDE extension doesn't support plugins. Install the plugin from the ChatGPT desktop app or Codex CLI, or use the manual setup below.

> [accordion] Manual setup without the plugin
>
> Add the Cello MCP server from the terminal:
>
> ```bash theme={null}
> codex mcp add cello-so --url https://mcp.cello.so/mcp
> ```
>
> Authenticate via the Cello Portal when prompted. You can also turn the server on under **My account → MCP Server** in the [Cello Portal](https://app.cello.so/mcp) and follow [Connect your client](https://docs.cello.so/mcp/connect.md).
>
> Then download the integration guide skill into your repo's skills folder:
>
> ```bash theme={null}
> mkdir -p .agents/skills/cello-get-integration-guide
> curl -o .agents/skills/cello-get-integration-guide/SKILL.md \
>   https://raw.githubusercontent.com/getcello/cello-cursor-plugin/main/skills/cello-get-integration-guide/SKILL.md
> ```
>
> Restart Codex so it picks up the new skill. You can also install it at the user level (`$HOME/.agents/skills`) so it's available across all your projects, or at the admin level (`/etc/codex/skills`) for your whole org.

## Cello user referrals integration (Coding-agent flow)

**1. Create the integration plan**

Ask Codex to plan the integration with the integration guide skill:

*"Use cello-get-integration-guide to create a Cello integration plan for this app."*

Codex analyzes your frontend, signup flow, and payment gateway, and asks you the questions it can't answer from the code.

**2. Confirm executing the plan**

Review the plan carefully. It should cover:

* Cello JS SDK initialization and user authentication
* Referral component placement and configuration
* Attribution setup for tracking referred signups
* Webhook integration for conversion tracking

If it looks correct, tell Codex to proceed and start implementing it.

**3. Verify each component as you go**

Don't wait until the end. As Codex finishes each part, ask it to run the health check skill on that part before moving on:

*"Use cello-integration-health-check to check my integration - is the attribution library connected yet?"*

The four things the plan covers are the same four the health check reports on, and the same four you'll test later in the [pre-launch testbook](https://docs.cello.so/guides/integration/pre-launch-testbook.md#test-by-area):

| What you just built | In the health report | Testbook section |
| - | - | - |
| SDK initialization and referral component placement | Referral component | [Referral component](https://docs.cello.so/guides/integration/pre-launch-testbook.md#referral-component) |
| Attribution setup | Attribution library | [Capturing the referral code](https://docs.cello.so/guides/integration/pre-launch-testbook.md#capturing-the-referral-code) |
| Signup tracking | Signups tracking | [Signup tracking](https://docs.cello.so/guides/integration/pre-launch-testbook.md#signup-tracking) |
| Purchase and conversion tracking | Purchases tracking | [Purchase tracking](https://docs.cello.so/guides/integration/pre-launch-testbook.md#purchase-tracking) |

Two things to expect, so a partial result doesn't look like a failure:

* **All four components are reported every time.** The ones you haven't built yet read **Not connected**, which is correct at this stage. Only judge the one you just finished.
* **Status lags behind your code.** A component turns **Connected** once a successful event reaches Cello within the health window, which can take up to \~10 minutes. Re-check before concluding anything is broken.

If a component comes back with a warning, ask for the events behind it. The health check tells you *which* component is failing; the events tell you *why*:

*"Show me my recent Cello events and tell me which fields are failing validation."*

**4. Work through the pre-launch testbook**

The [Pre-launch Testbook](https://docs.cello.so/guides/integration/pre-launch-testbook.md) covers the manual, front-end checks no automated tool can see for you: whether the referral component sits well in your UI, whether the new-user banner reads correctly, and whether the discount math is right on both monthly and yearly plans.

Codex can fetch it and walk you through it, because the testbook is part of the documentation the plugin's MCP server searches:

*"Pull the Cello pre-launch testbook and walk me through the signup tracking section."*

> [card] [Pre-launch Testbook](https://docs.cello.so/guides/integration/pre-launch-testbook.md)

**5. Publish & Test**

Run your app and test the end-to-end flow. If everything was implemented correctly, you should see events coming in to the [Cello Dashboard](https://app.cello.so/performance/referrer-activity), marked as testing until you launch your program.

Events reach **Developers → Events** within a few minutes, but dashboards refresh hourly - see [when each surface updates](https://docs.cello.so/guides/integration/pre-launch-testbook.md#when-each-surface-updates) before assuming something is missing.

## After you're live

The Cello plugin continues to be useful after the initial integration:

| Prompt | What happens |
| - | - |
| *"Is my Cello integration working?"* | Checks all four integration components and reports which are connected or broken |
| *"Why aren't referral rewards being triggered?"* | Inspects recent events to find missing or malformed fields preventing attribution |
| *"How is my referral program performing?"* | Runs `cello-get-program-performance`: health, trends, industry benchmarks, and top referrers in one readout |
| *"How can I improve my referral program?"* | Returns a prioritized list of recommendations across activation, sharing, and conversion |
| *"Which recommendations need code changes?"* | Separates the optional enhancements that need dev work from the ones that are only portal configuration |
| *"How do I set up a custom referral launcher?"* | Searches the docs for custom launcher implementation guides |

### Use the plugin in ChatGPT

The same plugin works in ChatGPT, so people who don't use Codex can ask about the program too. Install it once from the [plugin page](https://chatgpt.com/plugins/cello), then ask in any chat, for example *"Analyze my Cello referral program performance."* ChatGPT uses `cello-get-program-performance` to answer.

> [!NOTE]
>
> For a step-by-step technical implementation (source of truth + acceptance criteria), follow the detailed guide:
>
> * [React + Node.js Integration Guide](https://docs.cello.so/resources/react-nodejs-integration)
>
> The guide uses React + Node.js as an example, but it can be any other combination - the steps stay the same.


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