N

Netzhandwerker Agent Tools · Funnel Analyze

by Netzhandwerker Agent Tools

POSTBase

$0.002

per call · USD Coin on Base

Walks the events you pass through the ordered steps you name and reports per step: how many arrived, conversion from the previous step and from the first, drop-off in users and as a rate, and time to the next step as median, p90 and mean. A step counts only if it happened after the one before and inside the window. Where events carry a segment, each is tested against the largest with the same two-proportion test the A/B endpoint uses. Nothing is stored.

Endpoint

POST https://tools.halowerk.com/v1/funnel/analyze

1

Calls / 30d

1

Unique payers / 30d

Aug 19

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPay("https://tools.halowerk.com/v1/funnel/analyze", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "events": [
      {
        "segment": "eu",
        "step": "view",
        "time_unix_s": 1786000000,
        "user_id": "u1"
      },
      {
        "segment": "eu",
        "step": "cart",
        "time_unix_s": 1786000120,
        "user_id": "u1"
      },
      {
        "segment": "eu",
        "step": "checkout",
        "time_unix_s": 1786000420,
        "user_id": "u1"
      },
      {
        "segment": "eu",
        "step": "purchase",
        "time_unix_s": 1786000900,
        "user_id": "u1"
      },
      {
        "segment": "us",
        "step": "view",
        "time_unix_s": 1786000010,
        "user_id": "u2"
      },
      {
        "segment": "us",
        "step": "cart",
        "time_unix_s": 1786000200,
        "user_id": "u2"
      },
      {
        "segment": "us",
        "step": "view",
        "time_unix_s": 1786000020,
        "user_id": "u3"
      }
    ],
    "steps": [
      "view",
      "cart",
      "checkout",
      "purchase"
    ],
    "window_s": 604800
  }),
});
const data = await res.json();
cURL
curl -X POST \
  "https://tools.halowerk.com/v1/funnel/analyze" \
  -H "Content-Type: application/json" \
  -d '{"events":[{"segment":"eu","step":"view","time_unix_s":1786000000,"user_id":"u1"},{"segment":"eu","step":"cart","time_unix_s":1786000120,"user_id":"u1"},{"segment":"eu","step":"checkout","time_unix_s":1786000420,"user_id":"u1"},{"segment":"eu","step":"purchase","time_unix_s":1786000900,"user_id":"u1"},{"segment":"us","step":"view","time_unix_s":1786000010,"user_id":"u2"},{"segment":"us","step":"cart","time_unix_s":1786000200,"user_id":"u2"},{"segment":"us","step":"view","time_unix_s":1786000020,"user_id":"u3"}],"steps":["view","cart","checkout","purchase"],"window_s":604800}' \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "biggest_drop_off": {
    "drop_off": 1,
    "drop_off_rate": 0.5,
    "index": 2,
    "step": "checkout"
  },
  "confidence_level": 0.95,
  "event_count": 7,
  "events_outside_funnel": 0,
  "funnel": [
    {
      "conversion_from_first": 1,
      "conversion_from_previous": 1,
      "drop_off": 0,
      "drop_off_rate": 0,
      "index": 0,
      "reached": 3,
      "step": "view",
      "time_to_next_s": {
        "mean": 155,
        "median": 155,
        "p90": 187,
        "sample": 2
      }
    },
    {
      "conversion_from_first": 0.666667,
      "conversion_from_previous": 0.666667,
      "drop_off": 1,
      "drop_off_rate": 0.333333,
      "index": 1,
      "reached": 2,
      "step": "cart",
      "time_to_next_s": {
        "mean": 300,
        "median": 300,
        "p90": 300,
        "sample": 1
      }
    },
    {
      "conversion_from_first": 0.333333,
      "conversion_from_previous": 0.5,
      "drop_off": 1,
      "drop_off_rate": 0.5,
      "index": 2,
      "reached": 1,
      "step": "checkout",
      "time_to_next_s": {
        "mean": 480,
        "median": 480,
        "p90": 480,
        "sample": 1
      }
    },
    {
      "conversion_from_first": 0.333333,
      "conversion_from_previous": 1,
      "drop_off": 0,
      "drop_off_rate": 0,
      "index": 3,
      "reached": 1,
      "step": "purchase",
      "time_to_next_s": null
    }
  ],
  "overall_conversion_rate": 0.333333,
  "segment_comparisons": [
    {
      "absolute_difference": 1,
      "alpha": 0.05,
      "baseline_rate": 0,
      "baseline_segment": "us",
      "note": null,
      "p_value": 0.0832645167,
      "rate": 1,
      "segment": "eu",
      "significant": false,
      "z": 1.732051
    }
  ],
  "segments": [
    {
      "conversion_rate": 0,
      "segment": "us",
      "steps": [
        {
          "index": 0,
          "reached": 2,
          "step": "view"
        }
      ],
      "users_completed": 0,
      "users_entered": 2
    },
    {
      "conversion_rate": 1,
      "segment": "eu",
      "steps": [
        {
          "index": 0,
          "reached": 1,
          "step": "view"
        }
      ],
      "users_completed": 1,
      "users_entered": 1
    }
  ],
  "stateless": true,
  "steps": [
    "view",
    "cart",
    "checkout",
    "purchase"
  ],
  "strict_order": true,
  "users_completed": 1,
  "users_entered": 3,
  "window_s": 604800
}

Payment details

Pay to0x2880edfff13100677bf97a3cbdf3bc34771c4e5e
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase
Schemesexact

Is this your API?

Pin it to the top of Developer Tools and the homepage with a featured placement.

Get featured →

More from Netzhandwerker Agent Tools & similar services