t1k:marketing:monetization:mintegral-report
| Field | Value |
|---|---|
| Module | monetization |
| Version | 1.16.9 |
| Effort | medium |
| Tools | — |
How to invoke
Section titled “How to invoke”/t1k:marketing:monetization:mintegral-reportMintegral Daily Report
Section titled “Mintegral Daily Report”Produces a finished, archived daily report combining Mintegral monetization (publisher / IAA) and user-acquisition (advertiser) data into one document, with day-over-day deltas and analyst takeaways.
Sibling to t1k:marketing:monetization:mintegral — that skill is the API/MCP integration + active-management reference; THIS skill is the read-only reporting deliverable built on top of it.
When to use
Section titled “When to use”Activate on: “mintegral daily report”, “mintegral report for
- Default target = yesterday (the last complete UTC+8 day). Use “today” only for an explicit intraday/partial check.
- For a single metric or an ad-hoc pull (not the full report), use the base mintegral skill / MCP tools directly instead.
Prerequisite — credentials
Section titled “Prerequisite — credentials”The report needs all three Mintegral credential families in ~/.claude.json (local scope) — see the base skill’s Credential Setup section. The generator reads them from there automatically (never hardcoded, never from the repo):
| Family | Env vars | Powers report section |
|---|---|---|
| Publisher | MINTEGRAL_PUB_SKEY / MINTEGRAL_PUB_SECRET | revenue, eCPM, fill, geo, apps |
| Advertiser | MINTEGRAL_ADV_USERNAME / MINTEGRAL_ADV_API_KEY | UA spend, installs, CPI, campaigns |
| Developer | MINTEGRAL_DEV_SKEY / MINTEGRAL_DEV_SECRET | app_id → app name mapping |
If a family is missing, the generator prints a WARNING: missing credential … to stderr and that section comes back empty — surface that to the user rather than reporting zeroes as real.
Executed by
Section titled “Executed by”Steps 1–2 (resolve the date, run the generator) are mechanical; step 3, the
analyst notes, is explicitly the judgment part of this skill and stays on a
reasoning tier (routing SSOT: rules/orchestration-rules.md
§ “Task-Type → Agent Routing”):
| Step | Agent |
|---|---|
Run fetch-mintegral-report-data.cjs for the resolved date and report the emitted tables | t1k-fact-fetcher |
| Step 3 — write the 3–6 evidence-based analyst takeaways | stays on a reasoning tier, not delegated |
| Commit + push the archived report | t1k-git-manager (via /t1k:git) |
The generator itself already does the aggregation (7-day trend, platform/geo
split, top apps, UA cross-cut) — a cheap agent’s job is to run it and surface
the printed tables and any WARNING: missing credential line verbatim, not to
re-derive them.
Workflow
Section titled “Workflow”-
Resolve the date. Default to yesterday (UTC+8). Accept
YYYY-MM-DD,YYYYMMDD,yesterday, ortoday. -
Run the generator (deterministic — fetches + renders all data tables, writes the archive file, prints the markdown):
Terminal window node .claude/skills/t1k-marketing-monetization-mintegral-report/scripts/fetch-mintegral-report-data.cjs <date> --write--writesaves todata/mintegral/reports/<YYYY-MM-DD>.md(cwd-relative) and also prints to stdout.- Add
--jsoninstead to get raw facts for custom analysis.
-
Write the analyst notes (the judgment part). The generated file has a
## 8. Analyst notesplaceholder. Read the data and replace it with 3–6 evidence-based takeaways — eCPM/fill direction vs the 7-day trend, platform skew (iOS usually higher eCPM/fill), geo concentration (watch single-country dependency), notable app movers (Δ column), and UA efficiency (CPI vs installs). Flag anomalies (a fill-rate cliff, an eCPM spike, a campaign with runaway spend). Keep each takeaway one line, tied to a number in the report. Edit the file in place. -
Verify partial-day framing. If the report is for
today, the header is marked PARTIAL — make the takeaways treat lower absolute numbers as a partial-day artifact, not a real decline, and note UA data lags. -
Save + commit. The file is already written; commit and push so the daily history accrues (per
CLAUDE.mddata policy):/t1k:git cp → docs(mintegral): daily report <date>(Reports are read artifacts — distinct from the
data/mintegral/changes.jsonlwrite-ledger, which logs mutations.)
Report structure (what the generator emits)
Section titled “Report structure (what the generator emits)”- Headline — revenue, eCPM, fill, impressions, UA spend, installs, CPI vs prev day + 7-day avg.
- 7-day monetization trend — revenue/eCPM/impr/fill/CTR by date.
- Platform split — Android vs iOS revenue/eCPM/fill.
- Top countries — top 12 by revenue with eCPM/fill.
- Top earning apps — top 15 with Δ vs prev day (app names resolved via Developer API).
- User Acquisition — spend/installs/CPI/clicks/impr vs prev day + top 12 campaigns by spend.
- Same-day channel cross-cut — IAA-in vs UA-out, with the hard NOT-ROAS caveat.
- Analyst notes — AI-written (step 3).
Advertiser UA pull — chunk to ≤7-day windows + zero-result guard
Section titled “Advertiser UA pull — chunk to ≤7-day windows + zero-result guard”The advertiser (UA) report has an undeclared date-range cap: a request spanning more than ~7 days returns an empty / $0 payload with no error. The daily report pulls single days, so it is not normally exposed — but any custom/ad-hoc multi-day advertiser pull (and the zero-guard below) MUST follow this procedure:
- Chunk the advertiser pull into ≤7-day segments spanning the full requested window and SUM spend / installs / clicks / impressions across slices; recompute CPI = total spend ÷ total installs at the end (never average per-slice CPIs). ≤7-day windows are one slice.
- Zero-result guard (errors over silent fallbacks). If a window spans >1 day and the advertiser pull returns empty / $0 across the whole window, do NOT render
$0as truth — flag it as suspect (likely a date-range-cap truncation or auth issue) and surface a warning to the user, then re-pull in ≤7-day chunks. A genuine multi-day $0 on a live channel is implausible and looks identical to a capped/empty payload.
This mirrors the publisher surface’s documented 7-day-per-request cap; apply the same chunk-and-sum + zero-guard to the advertiser side. See issue #20 (a 30-day advertiser window returned $0 while a 7-day subset returned real spend).
Gotchas
Section titled “Gotchas”- Advertiser date-range cap → $0 over long windows. A multi-day advertiser window beyond ~7 days silently returns empty/$0 — chunk to ≤7-day slices, SUM, and zero-guard any empty multi-day result (see “Advertiser UA pull” above, issue #20).
- Timezone is UTC+8 (Mintegral default) throughout. Don’t mix with UTC.
- Publisher uses
YYYYMMDD; Advertiser uses Unix-second integers — the generator handles both; don’t hand-pass date strings to the advertiser endpoint (it errorsmust be an integer). - NOT ROAS. The cross-cut (§7) is same-day Mintegral-channel only. Never present it as profit/loss or ROAS — UA monetizes over LTV across all networks. Keep the caveat.
- Today is partial. Same-day monetization undercounts and UA often shows 0 rows until later — always label and never compare a partial day’s absolute totals to a full day as if equivalent.
- Advertiser MCP tool (
mintegral_get_campaign_report) had an auth bug (ads-mcp#13/#14); this skill’s generator calls the advertiser API directly with the correctaccess-keyheader scheme, so it works regardless of the MCP fix state. - The generator is read-only — it never mutates Mintegral. No
confirm:true, no write guard involved.
Reference
Section titled “Reference”- Data generator:
scripts/fetch-mintegral-report-data.cjs - Auth model + API params: base skill
t1k:marketing:monetization:mintegral§Authentication. - Archive location:
data/mintegral/reports/<YYYY-MM-DD>.md.