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

# Find and fix funnel drop-off with your coding agent

> Connect your coding agent to Wendung, let it find the step where users leave, and have it trace the cause to the code behind that step.

Your coding agent already has your codebase open. Connected to the Wendung MCP server, it can also read your funnel data: which step loses users, which segments convert worse, when a drop started, and what individual users did. That lets it relate a drop-off to the code behind the step and propose a change in the same session.

This guide works with any agent that supports remote MCP servers, including Claude Code, Cursor, and Codex.

## What you need

* A funnel with traffic. The steps come from `step()` calls in your app. If you haven't set that up yet, run the [project setup prompt](https://docs.wendung.app/agents.md#add-wendung-to-a-project) first.
* The `wendung` MCP server connected to your agent. The [connection prompt](https://docs.wendung.app/prompt) registers it, or add it yourself as described in [Agent setup](https://docs.wendung.app/agents.md#add-the-mcp-servers). You sign in through OAuth; there are no keys to paste.
* Your agent running in the repository of the app that sends the events, so it can read the code behind each step.

## What your agent can look up

The MCP server gives your agent read access to the same funnel, user, and ingest data you see in the dashboard. You don't need to name tools in your prompts. Your agent picks them from your question.

| Question | Tool |
| - | - |
| Which step loses the most users? | `get_funnel_overview` |
| Which segment converts worse at that step? | `get_segment_overview`, `get_segment_detail` |
| When did conversion change? | `get_funnel_trends` |
| How long do users take between steps? | `get_step_timing` |
| What did individual users do? | `get_project_users`, `get_user_timeline` |
| Are the events arriving at all? | `get_ingest_health`, `get_ingest_logs` |

Segments cover country, city, device type, browser, operating system, plan, and traffic source. Plan comes from the `plan` trait you pass to [`identify()`](https://docs.wendung.app/concepts/identity). User timelines list event names, times, sessions, location, and device. They leave out event properties and traits.

## Investigate a drop-off

Each step below is one prompt. Your agent keeps the context between them, so you can also ask for the whole investigation at once.

**1. Find the step that loses the most users**

```text Prompt theme={null}
Which step of my signup funnel lost the most users in the last 14 days?
```

The overview reports conversion for each step and names the largest drop-off. If the name matches more than one funnel, your agent lists the matches and asks which one you mean.

**2. Check whether a segment explains it**

```text Prompt theme={null}
At that step, which segments convert worst? Compare device types and browsers.
```

A drop that affects one segment points to something specific, such as a layout that breaks on mobile or a payment method missing in one country. A drop that affects every segment evenly points to the step itself, such as copy, pricing, or a required field.

**3. Find out when it started**

```text Prompt theme={null}
Show the daily conversion for that step over the last 30 days.
If it changed on a specific day, list the commits to the code
behind that step around that date.
```

This is where your agent connects data and code. A drop that starts on the day a change shipped is the strongest lead you can get from the data alone.

**4. Look at what users did**

```text Prompt theme={null}
List a few users who reached the step before and never completed it.
Show their timelines and tell me where they stopped.
```

Your agent finds these users by their most recent event: the event of the earlier step. Users who did something else afterwards don't appear. Each timeline is one analytics query, so ask for a few users, not all of them.

Timelines show whether users left right away, came back in a later session, or sent the earlier step several times without completing the next one.

**5. Rule out a tracking problem**

```text Prompt theme={null}
Check whether that step's daily users dropped to zero, and whether
any ingest requests were rejected in the last 7 days.
```

A step that drops to zero overnight is often a `step()` call that a refactor removed or renamed, not users who stopped. Daily trends show the drop for that step. Ingest health and logs cover the whole project: they show whether requests arrive and why rejected ones failed. [Funnel alerts](https://docs.wendung.app/guides/funnel-alerts.md) email workspace owners when this happens.

**6. Change the code and check the result**

Ask your agent to propose a fix in the code behind the step, and review the diff as you would any other change. After it ships, give the funnel enough traffic to compare, then ask:

```text Prompt theme={null}
Compare conversion at that step for the 14 days before and after
the change shipped on <date>.
```

## Start from a link or an alert

Funnel links from the dashboard carry the project ID, funnel ID, and date range, for example `https://dashboard.wendung.app/projects/<projectId>/funnels/<funnelId>?from=...&to=...`. Paste one into your prompt and your agent queries that funnel and period directly.

Funnel alert emails include such a link and a prompt you can paste as it is. See [Investigate with your agent](https://docs.wendung.app/guides/funnel-alerts.md#investigate-with-your-agent).

## Read the results with care

* **Small numbers mislead.** A step that 12 users reached can swing 20 points from one week to the next. Ask your agent for the user counts behind every rate.
* **The data shows when and where, not why.** A drop that lines up with a commit is a lead, not proof. Check it against the code and, where you can, against what users told you.
* **Queries are limited to 90 days.** A single query covers at most 90 days and can't reach past your plan's data retention. Agents split longer periods into several queries.

## How queries count toward your plan

Queries that read event data count toward your plan's monthly MCP queries. Listing workspaces, projects, and funnels doesn't count, and neither does an identical query repeated within 15 minutes. The Free plan includes 50 a month. See [MCP queries](https://docs.wendung.app/help/plans.md#mcp-queries) for every plan's quota.


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