# Aa Conversion Funnel Analysis

> >

- **Type:** Skill
- **Install:** `agentstack add skill-adobe-skills-aa-conversion-funnel-analysis`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [adobe](https://agentstack.voostack.com/s/adobe)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [adobe](https://github.com/adobe)
- **Source:** https://github.com/adobe/skills/tree/main/plugins/adobe-analytics/skills/aa-conversion-funnel-analysis
- **Website:** https://www.adobe.com/ai/overview.html

## Install

```sh
agentstack add skill-adobe-skills-aa-conversion-funnel-analysis
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Conversion Funnel Analysis (Adobe Analytics)

Analyze a multi-step conversion funnel to identify where visitors drop off,
which steps have the worst leakage, and what drives visitors to convert or
abandon. Uses AA visit-level segment-based reporting to simulate funnel steps.

> **AA Container Model:** AA funnels use **hit**, **visit**, and **visitor**
> containers — not CJA's event/session/person. Funnel steps are defined as
> visit-level segments (visitors who completed the step during a visit).
>
> **Reporting approach:** AA does not have a native sequential fallout API
> accessible via MCP. This skill approximates fallout by creating or finding
> visit-level segments for each funnel step, then running the metric for
> each step segment to compute pass-through rates.

---

## AA MCP Tools Used

- `findReportSuites` — select report suite
- `setSessionDefaults` — set session context (reportSuiteId + globalCompanyId)
- `findDimensions` — discover page/event dimensions for step definition
- `findMetrics` — find visits or orders as the counting metric
- `searchDimensionItems` — validate page names or event values
- `findSegments` — find existing step segments if available
- `upsertSegment` — create visit-level step segments if not found
- `runReport` — run visits count for each step segment

---

## Phase 0 — Setup

1. Confirm report suite with `findReportSuites` / `setSessionDefaults`.
2. Ask the user about the overall funnel scope (visit or visitor level):
   - **Visit-level funnel:** all steps happen within a single visit
     (typical for checkout funnels)
   - **Visitor-level funnel:** steps can span multiple visits
     (typical for lifecycle funnels)

```
findReportSuites(globalCompanyId: "", page: 0, limit: 10)
setSessionDefaults(globalCompanyId: "", reportSuiteId: "")
```

---

## Phase 1 — Define the Funnel Steps

Ask the user to describe each step of the funnel in plain language.
Prompt for 3–8 steps. Example:

1. Product page viewed
2. Add to cart
3. Checkout started
4. Payment info entered
5. Order confirmed (purchase)

For each step, ask:
- "Is this defined by a page view (page name or URL), a custom event, or
  a combination?"
- "Should this step be at the **hit** level (single page/event) or
  **visit** level (any visit where this happened)?"

---

## Phase 2 — Discover Components

### 2.1 Validate page names

For page-based steps:

```
findDimensions(page: 1, limit: 500)   # returns all available dimensions; look for variables/page
searchDimensionItems(
  dimensionId: "variables/page",
  searchOr: "",   # space-separated keywords OR'd together
  startDate: "",
  endDate: "",
  page: 1,
  limit: 20
)
```

Common page dimension IDs: `variables/page`, `variables/entrypage`, `variables/exitpage`.
Confirm the correct page name value with the user if multiple matches exist.

> **Note:** `searchDimensionItems` uses `searchOr` or `searchAnd` for filtering — not `searchTerm`.
> If no rows return, try a wider date range — some report suites only have historical data.

### 2.2 Validate events/metrics

For event-based steps (add to cart, checkout, purchase):

```
findMetrics(expansions: "componentType,categories", page: 0, limit: 200)
# Filter results locally by name: visits, orders, pageviews, etc.
```

---

## Phase 3 — Find or Create Step Segments

For each funnel step, search for an existing segment:

```
findSegments(searchTerm: "")
```

If an appropriate visit-level segment exists, use it directly.

If not, create a new visit-level segment for each step:

```
upsertSegment(
  definition: {
    "name": "Visit: Checkout Started",
    "description": "Visits where the visitor reached the checkout page",
    "reportSuiteID": "",
    "container": {
      "func": "segment",
      "context": "visits",
      "pred": {
        "func": "streq",
        "val": "/checkout",
        "str": "/checkout",
        "dimension": "variables/page"
      }
    },
    "tags": [{ "name": "funnel" }]
  }
)
```

Create all step segments before running reports. Record each segment `id`.

> **Important:** Only create new segments with explicit user confirmation.
> Present the list of segments to be created and ask: "I need to create N
> visit-level segments to define your funnel steps. Is that OK?"

---

## Phase 4 — Run Funnel Step Reports

For each step segment, run the visits count over the analysis period:

```
runReport(
  dimensionId: "variables/page",    # required by AA runReport
  metricIds: "metrics/visits",      # note: plural field name "metricIds"
  segmentIds: "",  # note: plural field name "segmentIds"
  startDate: "",
  endDate: "",
  limit: 1
)
# summaryData.totals[0] is the total visits for this segment
```

This is 1 call per funnel step. For a 5-step funnel = 5 calls.

Also run total visits (no segment) as the 100% baseline:

```
runReport(
  dimensionId: "variables/page",
  metricIds: "metrics/visits",
  startDate: "",
  endDate: "",
  limit: 1
)
# Use summaryData.totals[0] as the baseline visit count
```

> **AA runReport field names:** Use `metricIds` (not `metricId`) and `segmentIds` (not `segmentId`).
> Use `startDate`/`endDate` (ISO 8601) rather than a `dateRange` object.
> Always read totals from `summaryData.totals[0]`, not from `rows`.

---

## Phase 5 — Compute Funnel Metrics

For each step, compute:

| Metric | Formula |
|---|---|
| Step visits | Raw count from `runReport` |
| Step conversion rate | Step visits / Total visits × 100 |
| Step-to-step rate | Step N visits / Step N-1 visits × 100 |
| Step-to-step drop-off | Step N-1 visits - Step N visits |
| Drop-off rate | 100 - step-to-step rate |

Identify the **biggest leakage step** (highest absolute drop-off count) and
the **weakest conversion step** (lowest step-to-step rate).

---

## Phase 6 — Drill Into the Worst Step

For the step with the highest drop-off, run a dimension breakdown to find
what differentiates visitors who progressed vs. those who dropped:

```
runReport(
  dimensionId: "variables/mobiledevicetype",
  metricIds: "metrics/visits",
  segmentIds: "",
  startDate: "",
  endDate: "",
  limit: 10
)

runReport(
  dimensionId: "variables/mobiledevicetype",
  metricIds: "metrics/visits",
  segmentIds: "",
  startDate: "",
  endDate: "",
  limit: 10
)
```

Compare the device-type mix between visitors who completed the worst step
and those who made it to the next step. Repeat for 1–2 other dimensions
(e.g., traffic source, new vs. returning).

---

## Phase 7 — Generate HTML Report

Build the funnel report inline and write to
`/tmp/aa_funnel_analysis_report_.html`.

### HTML template

```html

Funnel Health &mdash; {ORG_NAME} &mdash; {FUNNEL_NAME}

  * { box-sizing: border-box; margin: 0; padding: 0; }
  :root {
    --bg: #f5f4f1;
    --surface: #ffffff;
    --ink: #1a1a1a;
    --ink-muted: #6b6b6b;
    --border: #e5e2dc;
    --header-bg: #0e0e10;
    --header-warm: #3a1010;
    --accent-red: #c8312f;
    --accent-red-bright: #ff6b68;
    --accent-red-soft: #fdecea;
    --accent-green: #1f7a4d;
    --accent-yellow: #d4a017;
  }
  body { font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
         background: var(--bg); color: var(--ink); line-height: 1.5;
         -webkit-font-smoothing: antialiased; }

  /* === Header === */
  header { background: linear-gradient(120deg, var(--header-bg) 0%, #1a0d0d 55%, var(--header-warm) 100%);
           color: #fff; padding: 56px 56px 44px; position: relative; overflow: hidden; }
  header::after { content: ""; position: absolute; right: -140px; top: -140px;
                  width: 460px; height: 460px;
                  background: radial-gradient(circle, rgba(200,49,47,.35) 0%, transparent 70%);
                  pointer-events: none; }
  .header-inner { max-width: 1080px; margin: 0 auto; position: relative; z-index: 1; }
  .eyebrow { display: inline-flex; align-items: center; gap: 8px;
             padding: 6px 14px; border: 1px solid rgba(255,107,104,.55);
             border-radius: 999px; color: var(--accent-red-bright);
             font-size: 11px; font-weight: 600; letter-spacing: 1.2px;
             text-transform: uppercase; margin-bottom: 24px;
             background: rgba(200,49,47,.10); }
  .eyebrow::before { content: ""; width: 6px; height: 6px;
                     background: var(--accent-red-bright); border-radius: 50%; }
  header h1 { font-family: "Playfair Display", Georgia, serif;
              font-size: 56px; font-weight: 700; letter-spacing: -1.5px;
              line-height: 1.05; margin-bottom: 14px; color: #fff; }
  header .lede { font-size: 16px; max-width: 600px;
                 color: rgba(255,255,255,.80); margin-bottom: 24px;
                 line-height: 1.55; }
  header .meta { display: flex; flex-wrap: wrap; gap: 22px;
                 font-size: 13px; color: rgba(255,255,255,.60); }
  header .meta span { display: inline-flex; align-items: center; gap: 6px; }
  header .meta .icon { opacity: .8; }

  /* === Tabs === */
  nav { background: var(--surface); border-bottom: 1px solid var(--border);
        padding: 0 56px; display: flex; gap: 28px;
        position: sticky; top: 0; z-index: 50; }
  nav a { display: block; padding: 16px 0; font-size: 14px;
          color: var(--ink); text-decoration: none;
          border-bottom: 2px solid transparent;
          transition: border-color .15s ease; }
  nav a:hover { border-bottom-color: var(--accent-red); }

  /* === Container === */
  .container { max-width: 1080px; margin: 0 auto; padding: 36px 56px 60px; }

  /* === Section label === */
  .section-label { font-size: 11px; font-weight: 700;
                   text-transform: uppercase; letter-spacing: 1.4px;
                   color: var(--ink-muted); margin-bottom: 14px;
                   padding-bottom: 10px; border-bottom: 1px solid var(--border); }

  /* === Funnel visualization (horizontal stepped bars) ===
     Bar color is set per step by tier:
       .tier-strong = green  (rate >= 70% pass-through)
       .tier-mid    = yellow (40-69%)
       .tier-weak   = red    (

  
    Funnel Health Report
    {ORG_NAME} Funnel Health
    Step-by-step pass-through for the {FUNNEL_NAME} funnel during {DATE_RANGE}.
    
      &#128197; {DATE_RANGE}
      &#128202; {REPORT_SUITE}
      &#128340; Prepared {GENERATED_DATE}
    
  

  Funnel
  Step Detail
  Leakage Analysis
  Recommendations

  
  Funnel Pass-Through
  
    
  

  
  
    
      Step Detail
      &#9662;
    
    
      
        
          StepVisits% of Total
          Step RateDrop-off
        
        
      
    
  

  
  
    
      Leakage Analysis (Worst Step: {WORST_STEP_NAME})
      &#9662;
    
    
      {LEAKAGE_INSIGHT_TEXT}
      
        
          DimensionEntered StepCompleted Step
          Step Ratevs. Average
        
        
      
    
  

  
  
    
      Recommendations
      &#9662;
    
    
      
    
  

  &#8679;

Funnel Health &mdash; {ORG_NAME} &mdash; Generated {GENERATED_DATE}

function toggle(id) {
  var el = document.getElementById(id);
  var ic = document.getElementById(id + '-icon');
  if (el.style.display === 'none') { el.style.display = ''; ic.textContent = '\u25be'; }
  else { el.style.display = 'none'; ic.textContent = '\u25b8'; }
}

```

**Section titles — no phase prefix**: Section headings in the HTML report must **not** include
the phase number. Use the plain section name only (e.g., "Funnel Overview" not "Phase 2 — Funnel Overview",
"Drop-off Analysis" not "Phase 3 — Drop-off Analysis").

Write to `/tmp/aa_funnel_analysis_report_.html` and open:

```bash
open /tmp/aa_funnel_analysis_report_.html
```

---

## Guardrails

- Always present the list of segments to be created (step 3) and get user
  confirmation before calling `upsertSegment`.
- If the user already has named segments for funnel steps, prefer using those
  rather than creating new ones — check `findSegments` first.
- Limit funnel to 8 steps maximum for practical API call budgets.
- Funnel conversion rates using visit segments are approximations — they
  count visits that touched each step, not strict sequential fallout. Note
  this limitation to the user.

---

## Example Interaction

> "Analyze our checkout funnel — I want to see where visitors drop off."

1. Confirm report suite and date range (last 30 days).
2. Define 5 steps: Product View → Add to Cart → Checkout → Payment →
   Purchase.
3. Validate page names with `searchDimensionItems`.
4. Find existing step segments or create new ones (with user approval).
5. Run 6 reports (5 steps + total).
6. Compute: 100% → 42% (add to cart) → 28% (checkout) → 19% (payment) →
   11% (purchase). Overall conversion: 11%.
7. Worst step: Add-to-Cart to Checkout (33% drop-off rate).
8. Drill in: Mobile users have only 18% checkout rate vs. 31% on Desktop.
9. Generate and open HTML report.
10. Key insight: "Mobile is your funnel's biggest liability. Consider
    simplifying the mobile checkout experience."

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [adobe](https://github.com/adobe)
- **Source:** [adobe/skills](https://github.com/adobe/skills)
- **License:** Apache-2.0
- **Homepage:** https://www.adobe.com/ai/overview.html

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-adobe-skills-aa-conversion-funnel-analysis
- Seller: https://agentstack.voostack.com/s/adobe
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
