Skip to content

t1k:marketing:ua:avg-roas-d0

FieldValue
Moduleua
Version1.13.11
Effortlow
Tools—

Keywords: avg roas d0, d0 threshold page, min roas d0, ngưỡng roas d0, roas d0 threshold, ua d0 thresholds, ua thresholds

/t1k:marketing:ua:avg-roas-d0
[--out PATH] [--today YYYY-MM-DD]

Runs the bundled crawler, regenerates the page, opens it in a browser. Analysis-only: it reads Adjust + MAX and writes one local HTML file. It never changes a campaign.

Terminal window
python3 -I "$HOME/.claude/skills/t1k-marketing-ua-avg-roas-d0/scripts/ua_thresholds.py" --out ~/ua-d0-thresholds.html

Then open it — flatpak run com.google.Chrome --new-tab file://<abs-out> when that app is installed, else xdg-open <abs-out>. Report the output path and the page’s date range (the script prints them; the header line carries the “gần đây” and “nền” windows).

Python stdlib only — no pip install, no venv. Credentials come from ~/.config/t1k/ads.env (ADJUST_API_TOKEN, APPLOVIN_REPORT_KEY by name; never print the values). If a name is missing the script exits with missing <NAME> in <path> — say which one, do not invent a fallback.

FlagEffect
--out PATHOutput HTML. Default ~/ua-d0-thresholds.html. latest.json is written next to the HTML, not next to the script (an installed skill dir is overwritten on t1k modules update).
--today YYYY-MM-DDOverride “today” for a deterministic rerun. Everything else derives from it.

A full run takes minutes (one Adjust cohort query per title, plus MAX and source queries, at 8-way concurrency). Do not re-run it to “refresh” a page that is already current.

SectionWhat it answers
Máy tính (calculator)Pick a title, drag budget + ROAS D0 per network → revenue at D0/D7/D14, ROAS paid vs ROAS including organic, and profit/loss per day.
1 · Min ROAS D0 by budgetThe number to beat. For each budget column, the ROAS D0 a title needs for two targets: break-even after 7 days, and 120% (config.json target) after 7 days.
2 · Status & capsCurrent budget → ROAS D0, D7/D14 growth multiples, organic base/day, the MAX-vs-Adjust gap (“Adjust thiếu”), the max budget the recent ROAS still supports at each target, and a verdict (scale / thin / losing / wait for the S-game fix).
3 · Per networkThe same min-ROAS-D0 read per network, with the organic base split by that network’s budget share.
FiltersMulti-select title and network; they hide rows in tables 1–3 (network applies to table 3 only) and persist in localStorage.
Nguồn doanh thuPage-wide switch between MAX and Adjust revenue basis — it flips which table rows are shown.
ROAS D7 = ROAS D0 × growth(Dn)
Lời/ngày = Budget × ROAS D0 × growth(Dn) + Nền − Budget
  • Nền (base) = revenue per day that arrives with no UA spend at all — organic installs plus returning/old users. It is computed as recent Adjust revenue/day − (D7 revenue/day × the D30 growth multiple), floored at 0, so it never goes negative on a bugged title. A smaller budget therefore needs a lower ROAS D0 to break even.
  • Growth multiples (M, M14) are medians of revenue(Dn) / revenue(D0) over days with cost > MIN_DAY_COST ($10) and at least MIN_SAMPLES (5) days, cut at D7/D14 maturity. Fewer samples → the code falls back to 1.25 / earlier multiples rather than guessing.
  • Revenue basis MAX — Adjust under-records full-screen MAX revenue on builds from August. For each day: take Adjust total revenue, remove the “AppLovin MAX SDK” source share, add MAX’s own estimated_revenue for that day. The per-day ratio is then applied to every D0/D7/ D14/D30 cohort of that day. Switch to Adjust to match the dashboard numbers.
  • MAX API lookback is 45 days (MAX_LOOKBACK_DAYS = 44 to stay inside it). Older cohorts use the ratio of the earliest week still available.

The 21 titles live in scripts/config.json — edit it in the skill dir, not a copy:

"apps": [ ["<adjust_app_token>", "<Display Name (AND|iOS)>", ["<flag>"]] ]
  • maxOverride — { "<app_token>": ["<package_name>", "ios"|"android"] }, for the two iOS apps whose MAX package name does not match the Adjust store_id.
  • networks — which networks get their own table-3 row (Mintegral, Google Ads).
  • budgets — table 1’s columns. target — the ROAS goal (1.2 = 120%).

Add a title → rerun → the new row appears in every table. No code change.

  • The Adjust campaign dimension drops organic. A query grouped by campaign silently returns only attributed traffic, so its totals are lower than a day-only query. This skill never uses campaign; if you add a query, do not use it to compute Nền.
  • MAX API refuses ranges older than 45 days and returns an error, not empty rows.
  • Flags are hand-declared per title in config.json, not detected. They gate the verdict: S-game bug → the title is parked as “Chờ fix bug S-game” whatever its numbers say; iOS/SKAN → the organic base may be inflated (SKAN-reported revenue is partial); Revenue sai → Adjust was historically wrong for this title; không có MAX is added automatically when MAX returned no rows for the token.
  • Caps assume ROAS D0 does not move when budget rises. The table says so; it is optimistic, and a very high cap is a “no cap found”, not a forecast.
  • Google Ads dashboard reads ~20–25% below Adjust; Mintegral’s API exposes no ROAS. Compare like with like before acting on either.
  • latest.json is a debugging sidecar next to the HTML — safe to delete, never read by the page.

The crawl, the table math and rendering are deterministic — the bundled script does all of it.

StepAgent
Run scripts/ua_thresholds.py, open the HTML, report path + date ranget1k-metrics-reporter — a script run plus reading its printed summary, no judgment
Read the page’s tables and answer a question about one titlestays reasoning-tier — the choice of basis (MAX vs Adjust) and the flags are judgment
  • t1k-marketing-ua-adjust — the Adjust RS-API this crawler talks to.
  • t1k-marketing-analytics-crawldata — the sibling spend-vs-revenue crawl.