Skip to content

t1k:marketing:monetization:mintegral-report

FieldValue
Modulemonetization
Version1.16.9
Effortmedium
Tools—
/t1k:marketing:monetization:mintegral-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.

Activate on: “mintegral daily report”, “mintegral report for ”, “yesterday’s mintegral numbers/revenue”, “mintegral summary/recap”, “how did mintegral do (today|yesterday|on )”.

  • 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.

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):

FamilyEnv varsPowers report section
PublisherMINTEGRAL_PUB_SKEY / MINTEGRAL_PUB_SECRETrevenue, eCPM, fill, geo, apps
AdvertiserMINTEGRAL_ADV_USERNAME / MINTEGRAL_ADV_API_KEYUA spend, installs, CPI, campaigns
DeveloperMINTEGRAL_DEV_SKEY / MINTEGRAL_DEV_SECRETapp_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.

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”):

StepAgent
Run fetch-mintegral-report-data.cjs for the resolved date and report the emitted tablest1k-fact-fetcher
Step 3 — write the 3–6 evidence-based analyst takeawaysstays on a reasoning tier, not delegated
Commit + push the archived reportt1k-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.

  1. Resolve the date. Default to yesterday (UTC+8). Accept YYYY-MM-DD, YYYYMMDD, yesterday, or today.

  2. 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
    • --write saves to data/mintegral/reports/<YYYY-MM-DD>.md (cwd-relative) and also prints to stdout.
    • Add --json instead to get raw facts for custom analysis.
  3. Write the analyst notes (the judgment part). The generated file has a ## 8. Analyst notes placeholder. 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.

  4. 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.

  5. Save + commit. The file is already written; commit and push so the daily history accrues (per CLAUDE.md data policy):

    /t1k:git cp → docs(mintegral): daily report <date>

    (Reports are read artifacts — distinct from the data/mintegral/changes.jsonl write-ledger, which logs mutations.)

Report structure (what the generator emits)

Section titled “Report structure (what the generator emits)”
  1. Headline — revenue, eCPM, fill, impressions, UA spend, installs, CPI vs prev day + 7-day avg.
  2. 7-day monetization trend — revenue/eCPM/impr/fill/CTR by date.
  3. Platform split — Android vs iOS revenue/eCPM/fill.
  4. Top countries — top 12 by revenue with eCPM/fill.
  5. Top earning apps — top 15 with Δ vs prev day (app names resolved via Developer API).
  6. User Acquisition — spend/installs/CPI/clicks/impr vs prev day + top 12 campaigns by spend.
  7. Same-day channel cross-cut — IAA-in vs UA-out, with the hard NOT-ROAS caveat.
  8. 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:

  1. 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.
  2. 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 $0 as 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).

  • 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 errors must 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 correct access-key header 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.
  • 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.