Skip to content

t1k:marketing:analytics:wiring-audit

FieldValue
Moduleanalytics
Version1.21.13
Effortmedium
Tools—
/t1k:marketing:analytics:wiring-audit

Finds apps whose numbers are plumbed wrong, not apps whose numbers are bad.

The failure this catches is quiet by construction: package-level totals stay correct, every report still renders, nothing errors. What breaks is the split — one campaign silently absorbs another’s revenue, or spend lands on a package no report knows about. It surfaces weeks later as a campaign that “has no ad revenue”, or as a title whose ROAS looks great right up until someone adds up the spend properly.

Run it against yesterday, read the findings, act on HIGH.

Terminal window
cd $HOME/.claude/skills/t1k-marketing-crawldata/tool
bun audit-wiring.mjs # last 8 days, ending yesterday
bun audit-wiring.mjs --end 2026-09-14 --days 7
bun audit-wiring.mjs --json ../data/wiring-2026-09-15.json
bun audit-wiring.mjs --fail-on-findings # exit 1 on any HIGH, for CI

Flags: --days (max 8, see Gotchas) · --end · --min-spend (default 5, below which a campaign is noise) · --json · --env (credentials path; defaults to the crawler’s credentials/.env, or $T1K_ADS_ENV) · --fail-on-findings.

Credentials are the crawler’s — no new secrets. Adjust is required; every other source degrades to a skipped section with a printed reason rather than a silent pass.

IDSeverityFires when
A0 source-incompleteHIGHA source failed or was rate-limited. Its campaigns were never fetched, so a clean run below it proves nothing.
A1 missing-campaignHIGHA network campaign spent real money but Adjust has no campaign row for it.
A2 unverified-linkWARNAn app has only ever had ONE campaign on a link-based partner, so the link level can’t be proven. It will fail as A1 on the next offer.
A3 unknown-packageWARNInstalls or revenue landing on store_id = unknown — invisible to every per-title report.
A4 no-spend-connectorWARNA partner delivering installs that no connector crawls spend for, so its cost is missing from Profit/ROAS.
A5 unity-app-map-emptyHIGHA Unity org’s apps list returned 200 with no results — a missing Advertise API Viewer role. Every app maps to unknown while spend still shows in the day total.
M1 revenue-source-gapHIGHMAX reports real revenue for an app but Adjust reports ~nothing — an ad-revenue ingestion break.
M2 spend-no-revenueHIGHAn app spent but reported no revenue from any source.

A1 and A2 are the ones worth building the habit around. The rest are coverage checks that happen to be cheap once the data is already in hand.

This is the root cause the skill exists for. Adjust links have four levels — network → campaign → adgroup → creative — and each level has its own token. A link only creates sublinks below its own token. So on a campaign-level link:

  • campaign={uuid} and campaign_id={uuid} are silently ignored — the campaign is already fixed by the token
  • adgroup= and creative= keep working perfectly, creating hundreds of sublinks

The link therefore looks fully dynamic and is not. Every offer that uses it reports under one campaign name forever.

Why staff pick the wrong link. In Campaign Lab, More options (⋯) → copy the click URL and link token is offered at every level. The campaign row is auto-created by the first offer’s traffic and is named after that offer’s uuid (ss_Foo_AND_ROAS_WW_210826), so when someone sets up offer #2 they see a row named after the campaign they are working on sitting under a generic parent — and copying the specific-looking one is the more careful-seeming choice. The copied URLs are identical apart from eight characters that mean nothing to a human.

The rule: copy from the row named <Title>_<Platform>_<Network> and never expand it. A row whose name starts with ss_ is one level too deep.

Adjust link levels are permanent — a campaign-level link cannot be promoted. The only fix is to point the network at the network-level token.

From the case that produced this skill (com.mystery.dumpling.unbox.asmr, 2026-09-15): a second Mintegral offer ran six days on the campaign-level link, spent $160.95, and never appeared in Adjust’s campaign dimension. Its installs and revenue were absorbed into the first offer’s row. Package-level Profit/ROAS stayed correct throughout — but read at campaign level the old campaign carried two offers’ revenue against one offer’s spend: $199.59 ÷ $139.99 = 143% ROAS, against a true combined 66%. A title well under target read as a winner.

Nothing is recoverable. adgroup is the network’s sub-publisher id and creative is the creative name; neither carries the offer, so days already run cannot be split afterwards. Fixing the link only restores the split going forward.

Adjust’s reporting API exposes the token at each level — these are API dimensions, not Datascape UI columns:

dimensions=store_id,partner,campaign,campaign_token,network_token,adgroup_token,creative_token

The signature of a mis-wire is a single campaign_token that equals the token in the network’s tracking URL, while adgroup_token and creative_token run to hundreds — dynamic creation working normally, one level too low. A correctly wired app shows several campaign_tokens under one network_token.

Cross-check installs: when two offers share a campaign link, Adjust’s installs for that campaign match the sum of both offers on the network side, not the first offer alone.

Findings print grouped by check, HIGH first, with the correct network token inline for A1/A2 so it can be compared against the network’s tracking URL without a second lookup. --json emits the same findings as structured data for a dashboard or a diff against yesterday’s run.

Act on HIGH the same day — that is live spend going unattributed. A2 is a standing to-do list: each entry is an app that will break the next time someone launches a second campaign on it.

  • --days is hard-capped at 8. Mintegral silently returns rows with no spend for a longer range, which would make every offer read as mis-wired. The cap is enforced in code, not left to the operator.
  • iOS packages need normalizing before joining. Adjust returns a bare numeric App Store id (6751266232); the spend networks return id6751266232. Joining raw makes correctly-wired iOS apps look broken — this bit the first run of this very audit and flagged $2,801 of healthy LifeChoice IOS spend as missing.
  • Google Ads is deliberately excluded from A2. It is self-attributing through the partner integration with no tracking link, so the campaign-level-token trap cannot occur; flagging it would be noise. It is still covered by A1.
  • A Unity Service Account missing Advertise API Viewer fails at 200, not 403. The apps list returns {"total":0,"results":[]}, so every app maps to unknown while spend still looks present. The audit prints an explicit warning for this rather than reporting a clean org.
  • Do not chase a few percent between MAX and Adjust. They legitimately differ (different windows, continuous estimate revisions). M1 only fires when MAX reports real money and Adjust reports ~nothing — a break, not a variance.
  • “In Adjust but absent from MAX” is deliberately NOT flagged. It is a portfolio fact, not a defect: those apps use other mediation. MAX also keys iOS by bundle id while Adjust keys it by store id, so every iOS app would read as a false gap. An early build emitted five such warnings and all five were noise.
  • An unconfigured buying account looks exactly like an app with no spend. If a title’s ROAS looks implausibly good, check A4 and the account list before believing it.
  • t1k:marketing:analytics:crawldata — the crawler these credentials and this script live beside; produces the per-package Profit/ROAS report the audit assumes is right.
  • the studio-local quick-optimize skill — the daily ROAS triage. A1 findings invalidate its campaign-level ranking for the affected app until fixed.
  • rules/ad-network-mcp-write-safety.md — this skill is read-only; any fix to a tracking link is a change made by a human in the network’s own dashboard.

Built 2026-09-15 from a live investigation. The runnable script is tool/audit-wiring.mjs in The1Studio/marketing-crawl-ads-spend; this skill is the operator playbook. Deepen it via /t1k:sync-back.