TEASEDocs
API ReferenceStats & Attribution

Click-funnel and attribution stats

Returns aggregated CTR / click-funnel telemetry plus the revenue-by-source attribution leaderboard and fan economics for the selected window. Requires a read-scoped key. The payload is large; the documented top-level blocks form the stable contract.

Authorization

bearerAuth
AuthorizationBearer <token>

Your al_live_<prefix>_<secret> API key. Mint and manage keys in the dashboard.

In: header

Query Parameters

range?string

Preset window ending now. Ignored when both from_ts and to_ts are supplied; an unknown value falls back to 7d.

Default"7d"

Value in

  • "24h"
  • "7d"
  • "30d"
  • "90d"
from_ts?integer

Custom window start (unix seconds, UTC). Must be paired with to_ts to override range.

Range0 <= value
to_ts?integer

Custom window end (unix seconds, UTC). Clamped to now. Must be paired with from_ts.

Range0 <= value
domain?string

Restrict traffic and click-attributed aggregates to one funnel domain. The account-wide revenue.sources leaderboard and its funnel counters are not narrowed by this filter.

Lengthlength <= 255
source?string

Restrict traffic and click-attributed aggregates to one exact traffic-source label. The account-wide revenue.sources leaderboard and its funnel counters are not narrowed by this filter.

Lengthlength <= 64
scope?string

Aggregate one page, all authorized pages of a creator, or all authorized pages of a tenant. Pair with id; omit both for the caller's current page.

Lengthlength <= 16

Value in

  • "page"
  • "creator"
  • "tenant"
id?string

Identifier for the requested page, creator, or tenant scope. Used only with scope.

Lengthlength <= 64
tz?string

IANA time-zone name used for calendar-day buckets and axes. Missing or invalid values use UTC.

Lengthlength <= 64
Default"UTC"
lifetime?boolean

When true and no complete custom bounds are supplied, totals and grouped aggregates use all-time allowed data and ignore range. Day-based trend axes remain capped to the latest 730 days and are coarsened for long spans. A complete from_ts/to_ts pair takes precedence over lifetime.

Defaultfalse

Response Body

application/json

application/json

application/json

GET
/api/admin/stats
curl -X GET "https://example.com/api/admin/stats"
{  "range": "7d",  "from_ts": 1719446400,  "to_ts": 1720051200,  "totals": {    "clicks": 4210,    "uniques": 3380,    "visitors": 5102,    "clickers": 3290,    "ctr": 0.6449  },  "by_day": [    {      "day": "2026-06-30",      "clicks": 612,      "uniques": 498,      "impressions": 940,      "visitors": 760    }  ],  "by_country": [    {      "country": "US",      "clicks": 1820,      "uniques": 1500,      "visitors": 2100,      "clickers": 1420,      "ctr": 0.6762    }  ],  "by_country_day": {    "days": [      "2026-06-30"    ],    "series": [      {        "country": "US",        "points": [          760        ]      }    ]  },  "by_button": [    {      "domain": "links.example.com",      "tier": "s_e5e8eef7",      "button_id": "b_91ac20",      "clicks": 980,      "label": "Subscribe now",      "segment_name": "German"    }  ],  "by_domain": [    {      "domain": "links.example.com",      "clicks": 4210,      "impressions": 6800,      "visitors": 5102,      "clickers": 3290,      "ctr": 0.6449    }  ],  "by_tier": [    {      "segment": "s_e5e8eef7",      "name": "German",      "impressions": 3400,      "visitors": 2600,      "clicks": 1800,      "clickers": 1400,      "ctr": 0.5384    }  ],  "by_source": [    {      "source": "ig_main",      "impressions": 2200,      "visitors": 1700,      "clicks": 1300,      "clickers": 980,      "ctr": 0.5764    }  ],  "by_network": [    {      "network": "ig",      "impressions": 2900,      "visitors": 2200,      "clicks": 1700,      "clickers": 1300,      "ctr": 0.5909    }  ],  "by_referrer": [    {      "ref_host": "instagram.com",      "visits": 1900,      "visitors": 1450    }  ],  "by_variant": [    {      "domain": "links.example.com",      "tier": "s_e5e8eef7",      "button_id": "b_91ac20",      "variant": "paid",      "clicks": 520,      "uniques": 430,      "label": "Subscribe now",      "segment_name": "German"    }  ],  "revenue": {    "totals": {      "revenue_cents": 184250,      "conversions": 142,      "clicks": 1300,      "rpm_cents": 141730,      "new_subscribers": 142    },    "by_page": [      {        "domain": "links.example.com",        "clicks": 1300,        "conversions": 142,        "revenue_cents": 184250,        "rpm_cents": 141730      }    ],    "by_button_money": [      {        "domain": "links.example.com",        "tier": "s_e5e8eef7",        "button_id": "b_91ac20",        "revenue_cents": 90000,        "conversions": 60      }    ],    "by_country": [      {        "country": "US",        "clicks": 600,        "conversions": 71,        "revenue_cents": 96000,        "rpm_cents": 160000      }    ],    "by_placement": [      {        "placement": "buttons",        "clicks": 1100,        "conversions": 120,        "revenue_cents": 160000,        "rpm_cents": 145454      }    ],    "ab": [      {        "domain": "links.example.com",        "tier": "s_e5e8eef7",        "variant": "paid",        "segment_name": "German",        "segment_countries": [          "DE",          "AT",          "CH"        ],        "clicks": 520,        "conversions": 60,        "revenue_cents": 90000,        "rpm_cents": 173076,        "conversion_rate": 0.1153      }    ],    "by_day": [      {        "day": "2026-06-30",        "revenue_cents": 26000,        "cumulative_cents": 184250,        "conversions": 20,        "new_subscribers": 20      }    ],    "smartlinks": {      "scope": "account_alltime",      "total_revenue_cents": 5200000,      "total_subscribers": 4100,      "total_clicks": 88000,      "by_link": [        {          "smart_link_id": "lnk_8821",          "offer": "paid",          "name": "Main paid",          "clicks": 52000,          "subscribers": 3100,          "revenue_cents": 4100000,          "spenders": 1800        }      ]    },    "sources": {      "sources": [        {          "domain_source": "links.example.com",          "source_label": "Main IG",          "channel": "instagram",          "subs": 142,          "spenders": 100,          "new_fans": 100,          "returning_fans": 42,          "trial_subs": 20,          "trial_to_paid": 12,          "funnel": {            "new": 80,            "old": 12,            "ftl": 20,            "paid": 70,            "paid_after": 35,            "ftl_paid": 12,            "entered": 102          },          "revenue_net_cents": 184250,          "revenue_gross_cents": 220000,          "refunds_net_cents": 0,          "pct": 1,          "by_kind": [            {              "kind": "subscription",              "net_cents": 90000,              "count": 60            },            {              "kind": "rebill",              "net_cents": 40000,              "count": 30            },            {              "kind": "ppv",              "net_cents": 50000,              "count": 40            },            {              "kind": "tips",              "net_cents": 4250,              "count": 12            },            {              "kind": "other",              "net_cents": 0,              "count": 0            }          ],          "countries": [            {              "country": "US",              "subs": 100,              "spenders": 70,              "revenue_net_cents": 130000,              "revenue_gross_cents": 155000            }          ],          "links": [            {              "link_ref": "lnk_8821",              "name": "Main paid",              "arm": "paid",              "subs": 90,              "spenders": 60,              "revenue_net_cents": 110000,              "revenue_gross_cents": 132000,              "users": []            }          ],          "users": [            {              "fan_id": "fan_4102",              "name": "sample_fan",              "revenue_net_cents": 50000,              "revenue_gross_cents": 60000,              "spender": true,              "country": "US",              "last_ts": 1720051100,              "is_returning": true,              "is_old": false,              "is_trial": false,              "profile": {                "lifecycle": "Активный",                "value_tier": "whale",                "value_label": "$500",                "recency_token": "3д",                "rfm_segment": "Чемпион"              }            }          ],          "traffer_cut_cents": 18425,          "model_net_cents": 165825,          "ad_spend_cents": 30000,          "profit_cents": 135825,          "costs_exceed_gross": false,          "contractor": "acme-traffic",          "payout_kind": "percent",          "percent_bps": 1000,          "fixed_cents": 0,          "fixed_exceeds_gross": false        }      ],      "organic": {        "domain_source": "__organic__",        "channel": "",        "subs": 0,        "spenders": 0,        "new_fans": 0,        "returning_fans": 0,        "trial_subs": 0,        "trial_to_paid": 0,        "funnel": {          "new": 0,          "old": 0,          "ftl": 0,          "paid": 0,          "paid_after": 0,          "ftl_paid": 0,          "entered": 0        },        "revenue_net_cents": 0,        "revenue_gross_cents": 0,        "refunds_net_cents": 0,        "pct": 0,        "by_kind": [          {            "kind": "subscription",            "net_cents": 0,            "count": 0          },          {            "kind": "rebill",            "net_cents": 0,            "count": 0          },          {            "kind": "ppv",            "net_cents": 0,            "count": 0          },          {            "kind": "tips",            "net_cents": 0,            "count": 0          },          {            "kind": "other",            "net_cents": 0,            "count": 0          }        ],        "countries": [],        "links": [],        "users": []      },      "pending": {        "domain_source": "__pending__",        "channel": "",        "subs": 0,        "spenders": 0,        "new_fans": 0,        "returning_fans": 0,        "trial_subs": 0,        "trial_to_paid": 0,        "funnel": {          "new": 0,          "old": 0,          "ftl": 0,          "paid": 0,          "paid_after": 0,          "ftl_paid": 0,          "entered": 0        },        "revenue_net_cents": 0,        "revenue_gross_cents": 0,        "refunds_net_cents": 0,        "pct": 0,        "by_kind": [          {            "kind": "subscription",            "net_cents": 0,            "count": 0          },          {            "kind": "rebill",            "net_cents": 0,            "count": 0          },          {            "kind": "ppv",            "net_cents": 0,            "count": 0          },          {            "kind": "tips",            "net_cents": 0,            "count": 0          },          {            "kind": "other",            "net_cents": 0,            "count": 0          }        ],        "countries": [],        "links": [],        "users": []      },      "total_net_cents": 184250,      "total_gross_cents": 220000,      "total_refund_net_cents": 0,      "by_kind": [        {          "kind": "subscription",          "net_cents": 90000,          "count": 60        },        {          "kind": "rebill",          "net_cents": 40000,          "count": 30        },        {          "kind": "ppv",          "net_cents": 50000,          "count": 40        },        {          "kind": "tips",          "net_cents": 4250,          "count": 12        },        {          "kind": "other",          "net_cents": 0,          "count": 0        }      ],      "coverage": {        "attributed_subs": 142,        "organic_subs": 0,        "pending_subs": 0,        "trial_unknown_subs": 0      },      "trial_subs": 20,      "trial_to_paid": 12,      "reconciliation": {        "sources_net_cents": 184250,        "organic_net_cents": 0,        "pending_net_cents": 0,        "total_net_cents": 184250,        "balanced": true      },      "since": "2026-06-01"    },    "reconciliation": {      "balanced": true    },    "fans": {},    "fans_account": {},    "platforms": [      {        "id": "of",        "label": "OnlyFans",        "has_funnel": true,        "net_cents": 184250      },      {        "id": "tg",        "label": "Telegram",        "has_funnel": false,        "net_cents": 12000      }    ]  }}
{  "detail": "Invalid or missing API key"}
{  "detail": {    "code": "engine_not_connected",    "message": "Connect your engine to access this data."  }}