Google AdSense 付款工具

分别查看已结算的 Google AdSense 和 YouTube 付款,并下载为 Excel。

// about

工具介绍

按账号和服务分别查看已结算的 AdSense 与 YouTube 付款,核对付款日期和金额,换算为其他货币并导出 Excel。

如何使用

  1. 粘贴或输入内容。
  2. 选择所需选项。
  3. 复制或下载结果。

人们为何使用此工具

  • 用于快速转换、清理和批量处理。
  • 有助于调试、分享和内容准备。
  • 当你需要立即得到结果时很有用。
指南 · 收益 · 约 3 分钟

Google AdSense 与 Google Play 的付款机制:预估收入与最终收入、汇率和记账

一旦开始收到 Google 的收入,很快就会出现“为什么后台金额和银行到账对不上?”的疑问。了解收入如何确认和支付,每月对账就会轻松得多。

AdSense 后台实时显示的金额是预估收入。月份结束后,Google 会剔除无效流量并审核数据,最终收入通常在次月月初计入余额。因此预估金额和最终金额可能略有差异。

10 月 1–31 日   产生预估收入(后台)
11 月上旬       10 月收入确认 → 计入余额
11 月 21 日前后  余额 ≥ 门槛时发出付款
数日后          款项到达银行
AdSense 预估收入与最终收入的区别、每月付款时间表与付款门槛、付款被暂停的常见原因,以及外币收入如何记账。
阅读指南 →
用 AI 自己做

用 AI 亲手打造这个工具

想要自己的版本?把下面的任务提示词粘贴到 AI 聊天中,或将技能文件保存到 AI 编程助手。其中包含我们开发此工具时整理的功能、边界情况和测试用例。

提示词和技能以英文提供,AI 工具在任何语言环境下都能很好地理解。

AI 任务提示词

直接粘贴到 Claude、ChatGPT、Gemini 等 AI 聊天中即可。

You are an experienced full-stack web developer. Build a web tool called "Google AdSense 付款记录" that meets the requirements below.

## Goal

Build a web tool that signs in with Google, reads finalised AdSense payments, splits them into AdSense and YouTube, applies exchange rates and exports an Excel report.

## Core features

- Google OAuth sign-in requesting only the adsense.readonly scope
- Read accounts and payments via the AdSense Management API
- Classify payments as AdSense or YouTube
- Apply payment-date exchange rates from a public FX API
- Choose a year range and export to Excel (.xlsx)

## Inputs

- Google sign-in
- Year range and target currency

## Outputs

- Payment table (date, amount, source, converted amount)
- Excel file

## Edge cases and handling rules

- Re-authenticate when tokens expire
- Handle zero or multiple AdSense accounts
- Retry and show a clear error when the FX API fails
- Use the previous business day's rate for weekend payments

## Implementation requirements

- Requires a server-side implementation (e.g. ASP.NET Core or Node.js). Keep the OAuth client secret on the server and never commit it.
- Describe Google user data use in the privacy policy and delete tokens immediately when the user disconnects.
- Make the UI responsive and easy to use on mobile; label every input and keep everything keyboard accessible.
- Add a Copy button for results and show clear, friendly error messages for invalid input.
- Keep the core logic in functions separate from the UI so it can be unit-tested.

## Definition of done (test cases)

- Unit-test classification: YouTube items are classified as YouTube
- Excel contains no rows outside the year range
- Rates are applied by payment date

First outline your implementation plan in at most five lines, then write the complete code, and finally explain how to check the test cases above.

技能 (SKILL.md)

在 Claude Code 等 AI 编程助手中保存为 .claude/skills/build-google-adsense-earning/SKILL.md,以后开发或修改此工具时可重复使用。

---
name: build-google-adsense-earning
description: Use when building or changing a Google AdSense 付款记录 tool. Build a web tool that signs in with Google, reads finalised AdSense payments, splits them into AdSense and YouTube, applies exchange rates and exports an Excel report.
---

# Build: Google AdSense 付款记录

## Goal

Build a web tool that signs in with Google, reads finalised AdSense payments, splits them into AdSense and YouTube, applies exchange rates and exports an Excel report.

## Workflow

1. Review the required features, inputs and outputs below and ask about anything missing first.
2. Implement the core logic as pure functions separate from the UI.
3. Check the logic against the test cases in the verification list.
4. Build a responsive UI with an input form, a result area and a Copy button.
5. Reproduce each edge case listed under Rules and refine the error messages.

## Core features

- Google OAuth sign-in requesting only the adsense.readonly scope
- Read accounts and payments via the AdSense Management API
- Classify payments as AdSense or YouTube
- Apply payment-date exchange rates from a public FX API
- Choose a year range and export to Excel (.xlsx)

## Inputs

- Google sign-in
- Year range and target currency

## Outputs

- Payment table (date, amount, source, converted amount)
- Excel file

## Rules

- Re-authenticate when tokens expire
- Handle zero or multiple AdSense accounts
- Retry and show a clear error when the FX API fails
- Use the previous business day's rate for weekend payments
- Requires a server-side implementation (e.g. ASP.NET Core or Node.js). Keep the OAuth client secret on the server and never commit it.
- Describe Google user data use in the privacy policy and delete tokens immediately when the user disconnects.

## Verification

- [ ] Unit-test classification: YouTube items are classified as YouTube
- [ ] Excel contains no rows outside the year range
- [ ] Rates are applied by payment date

交给 AI 时的小技巧

  • 在第一行写明技术栈(如 React、Vue 或纯 HTML),生成的代码会更贴合你的项目。
  • 在接受代码前,请让 AI 运行列出的测试用例并展示结果。
  • 不要把真实密码、客户数据或 API 密钥粘贴到提示词中,请用示例值代替。