全部技能

收入归因

revenue-attribution
付费上线版本 1.0.0

结账时把 UTM 标签和来源写进 Creem 元数据,用按交易记录的 webhook 账本,出一份扣除退款、并与 Creem 对过账的“到底谁付了钱”的分渠道报表。

完整说明(英文)

Shows which channels bring paying customers, not just visits. A first-party cookie records the first and last touch (UTM tags, referral code, referrer host, landing path; no personal data), the checkout route copies it into the Creem checkout metadata, and the webhook writes every payment, renewal, refund and dispute once into a small SQLite ledger with its channel. A report prints checkouts, orders, conversion and net-of-tax revenue per channel, source or campaign, per currency, first or last touch; a reconcile script compares the ledger with Creem's transaction list and finds missed webhooks and refunds. Ships a zero-dependency core, Next.js App Router files, 14 offline tests, a template check and privacy-policy text in English and Chinese. Use when the user asks where buyers come from, which channel or campaign pays, wants UTM tracking tied to revenue, revenue by source, or to check webhook revenue against Creem.

Creem 测试模式下的 Next.js 示例应用:四位访客分别来自 X、邮件通讯、Google 和 Product Hunt,三位用测试卡付款,然后用 Creem CLI 退掉一笔,再拿账本和 Creem 对账。 · 录制于 2026-11-03

  1. 1访客 1 从 X 上的帖子进来,在 Creem 测试收银台按每月 9 美元付款(这段 2 倍速)
  2. 2访客 2 从邮件通讯进来买了 149 美元的终身版,访客 3 从 Google 进来买了 Pro(这段 3 倍速)
  3. 3访客 4 从 Product Hunt 进来,打开收银台后没有付款就离开了
  4. 415 个离线测试通过,报表列出每个渠道的结账数、订单数和收入
  5. 5用 Creem CLI 退掉 Google 那笔付款;退款 webhook 记到了“搜索”渠道上,对账确认账本与 Creem 一致

预览

它能做什么

结账时把 UTM 标签和来源写进 Creem 元数据,用按交易记录的 webhook 账本,出一份扣除退款、并与 Creem 对过账的“到底谁付了钱”的分渠道报表。

  • 一个很小的第一方 Cookie 记住首次触点和最后一次非直接访问的触点:UTM 标签、推荐码、广告点击 ID 和来源域名,归入付费广告、联盟、邮件、社交、社区、搜索、外链或直接访问
  • 不存个人信息,也不存完整网址:邮箱、手机号和长令牌都会被丢弃,只保留路径;还可以按用户同意与否关闭记录
  • 结账接口把触点作为扁平字符串写进 Creem 结账元数据,它们会随 checkout.completed、subscription.paid、refund.created 和 dispute.created 一起回来
  • webhook 账本以 Creem 交易 ID 为键:订阅首付虽然 Creem 发两个事件,也只记一次;续费会单独标出;退款和争议记在原付款的渠道上
  • revenue_report.mjs:按渠道、来源或活动出漏斗和收入,可选首次或最后触点,按币种分开、不含税,支持 CSV 和 JSON
  • reconcile_creem.mjs 把账本和 Creem 交易列表对账(缺失的付款、金额和退款差异),漏掉的 webhook 可以按“未知”渠道补录
试试这句提示词
用 revenue-attribution 技能记录是哪个渠道给我基于 Creem 的 Next.js 应用带来付费用户,并给我一份扣除退款后按渠道统计的收入报表。

购买后可查看完整说明

这是付费技能,可单独购买,也可通过套餐获得全部技能。购买后可在本页或账户页下载。

目录

  1. 01When to use / when not to
  2. 02What you get
  3. 03Steps
  4. 04Rules
  5. 05Done when
  6. 06Troubleshooting

里面有什么

26 个文件:SKILL.md、6 个脚本、8 份参考资料、10 个模板和资源文件、1 个测试。

revenue-attribution/
  • SKILL.md9.3 KB
  • assets/(10)41.2 KB
    • lib/(2)32.1 KB
      • attribution-core.mjs12.3 KB
      • revenue-ledger.mjs19.8 KB
    • nextjs/(8)9.2 KB
      • src/(7)8.9 KB
        • app/(2)3.6 KB
          • api/(2)3.6 KB
            • checkout/(1)2.2 KB
              • route.ts2.2 KB
            • webhooks/(1)1.4 KB
              • creem/(1)1.4 KB
                • route.ts1.4 KB
        • components/(1)798 B
          • Attribution.tsx798 B
        • lib/(4)4.5 KB
          • attribution-core.d.mts1.6 KB
          • current-user.ts222 B
          • revenue-ledger.d.mts1.7 KB
          • revenue.ts1022 B
      • .env.example263 B
  • references/(8)20.3 KB
    • fixtures/(5)12.0 KB
      • checkout.completed.json3.0 KB
      • dispute.created.json2.8 KB
      • README.md375 B
      • refund.created.json3.0 KB
      • subscription.paid.json2.8 KB
    • channel-rules.md3.1 KB
    • creem-attribution.md3.2 KB
    • privacy.md2.0 KB
  • scripts/(7)26.8 KB
    • template-check/(1)3.1 KB
      • routes.test.ts3.1 KB
    • _db.mjs768 B
    • check_nextjs_template.sh2.2 KB
    • reconcile_creem.mjs2.6 KB
    • revenue_report.mjs1.0 KB
    • selftest.mjs15.3 KB
    • send_test_webhook.mjs1.8 KB

常见问题

收入归因 是做什么的?

结账时把 UTM 标签和来源写进 Creem 元数据,用按交易记录的 webhook 账本,出一份扣除退款、并与 Creem 对过账的“到底谁付了钱”的分渠道报表。

支持哪些 AI 工具?

Claude Code、Codex、Cursor,以及其他支持 Agent Skills 格式(带 SKILL.md 的文件夹)的工具。把安装提示词贴给 AI,或者把文件夹解压到它的技能目录即可。

下载包里有什么?

26 个文件:SKILL.md、6 个脚本、8 份参考资料、10 个模板和资源文件、1 个测试。

多少钱?

单独购买 US$6.99,一次性付款,含 12 个月更新。年付和终身版包含所有付费技能。

可以退款吗?

首次付款 14 天内、且没有下载任何付费技能的,可以全额退款。下载之后不退款,除非技能有缺陷且我们无法修复。

怎么获取更新?

一次性购买含 12 个月更新;年付和终身版在有效期内持续更新。在本页或账户页重新下载即可。当前版本:1.0.0。