| name | revenue-attributor |
| description | Revenue attribution specialist that connects Meta Ads, Google Ads, and Stripe revenue to show which campaigns actually pay back. Generates campaign-level ROAS breakdowns with waste detection and budget reallocation recommendations. Use when analyzing ad ROI, finding wasted ad spend, comparing channel performance, or reallocating budget. Triggers: attribution, ROAS, ad spend, campaign performance, channel mix, budget reallocation, ad waste. |
| metadata | {"version":"1.0.0","author":"Humblytics"} |
Revenue Attributor
Purpose
Connect ad spend to actual Stripe revenue using Humblytics multi-touch attribution. Rank campaigns by real ROAS (not clicks, not conversions â revenue), surface ad waste, and generate reallocation recommendations. This skill moves marketing teams from vanity metrics to revenue accountability.
When to Use
- Planning next month's ad budget and need data to reallocate
- Diagnosing why spend is up but revenue is flat
- Comparing paid vs organic vs direct revenue contribution
- Auditing campaign-level ROAS across Meta, Google, TikTok, LinkedIn
- Building a quarterly ad performance review for leadership
- Deciding whether to kill, scale, or hold a specific campaign
Credentials
This skill reads a Humblytics API key from the environment. Never paste API keys directly into chat â they persist in transcripts and logs.
Setup (one time):
cp .env.example .env at the repo root and fill in HUMBLYTICS_API_KEY
source .env in your shell before running the agent (or use direnv, or add the exports to your shell profile)
- Get the key from Humblytics Dashboard > Settings > API
- The skill will ask for your Property ID (also in Dashboard > Settings > API)
- Base URL:
https://app.humblytics.com/api/external/v1
- Docs: https://docs.humblytics.com/api
- Stripe requirement: The Humblytics property must have Stripe connected for revenue attribution to work. No separate Stripe key is needed here â Humblytics handles Stripe ingestion internally.
If HUMBLYTICS_API_KEY is not in the environment, stop and point the user at .env.example â do not accept the key in chat.
Meta Ads and Google Ads spend data
This skill does not call Meta Ads or Google Ads APIs. Ad spend is user-provided â export a CSV or copy the relevant columns from your Ads Manager dashboard, and the skill pairs that with Humblytics-attributed revenue.
Do not give the agent direct Meta Marketing API access through a system user on an unapproved developer app. Routing production API traffic through a draft or unpublished Meta App â regardless of how the access token was issued â is how ad accounts, including long-standing ones with seven-figure spend, are getting permanently banned. Meta is actively enforcing against unapproved-app API traffic.
If you want to automate ad-spend ingestion later, it is out of scope for this skill and requires real platform setup:
- Meta Ads: Create a Meta Developer App, add the Marketing API product, and complete full App Review for the specific permissions you need (e.g.
ads_read). Do not use a draft/unpublished app to pull production data â that is the exact pattern Meta is banning. Budget weeks for review.
- Google Ads: Apply for a Google Ads developer token (Basic for low-volume, Standard for production), set up OAuth on a manager account, and attach the developer token to every request. Basic access ships in days; Standard access requires a usage review.
Neither credential belongs in this repo's .env today. If you add either later, document the app ID / developer token acquisition in your own setup notes â not in this skill.
Before You Start
- Confirm Stripe is connected â Attribution requires Stripe revenue events; without it, you only get click data
- Confirm UTM hygiene â Campaigns without UTM parameters can't be attributed to source
- Time range â Default to last 30 days; 60-90 days for monthly comparison; 12 months for strategic planning
- Attribution model â Default to last-touch; switch to first-touch or linear if specified
- Property ID â Ask which property to analyze
Core Workflow
Step 1: Pull Revenue + Spend Data
Fetch the revenue-to-source breakdown:
GET /properties/{propertyId}/traffic/breakdown â UTM source/medium/campaign breakdown
GET /properties/{propertyId}/forms/breakdown â Conversion events (signups, purchases)
GET /properties/{propertyId}/pages/breakdown?page_group=stripe or revenue endpoints for Stripe-linked revenue
Combine with ad spend data (user provides from Meta Ads Manager, Google Ads, etc.) to calculate true ROAS per campaign.
Step 2: Build the Attribution Table
For each source â campaign â ad level:
| Source | Campaign | Spend | Clicks | Signups | Revenue | ROAS |
|---|
| google/cpc | brand-search | $1,200 | 340 | 28 | $4,200 | 3.5Ă |
| meta/paid | lookalike-v3 | $2,800 | 1,240 | 42 | $1,680 | 0.6Ă |
| organic | seo-longtail | $0 | 860 | 31 | $3,720 | â |
Step 3: ROAS Ranking + Waste Detection
Sort campaigns into four tiers:
| Tier | ROAS | Action |
|---|
| Scale | > 3Ă | Increase budget 20-50% |
| Hold | 1.5-3Ă | Optimize creative/audience; budget stays |
| Fix | 0.5-1.5Ă | Audit targeting, creative, landing page before killing |
| Kill | < 0.5Ă | Reallocate budget immediately |
Waste detection rules:
- Campaign has > $500 spend and < 1Ă ROAS â hard flag
- Ad set has > 100 clicks and 0 conversions â landing page or audience mismatch
- Campaign clicks but no UTMs â invisible to attribution, fix tracking first
Step 4: Channel Mix Analysis
Compare revenue contribution across channels:
- Paid share: % of revenue from paid ads
- Organic share: % from SEO/direct
- Referral share: % from partner/affiliate sources
- Blended CAC: Total ad spend / total acquired customers
Red flags:
- Paid share > 80% â business is dependent on ad spend; diversify
- Paid share < 10% with high spend â attribution is broken, fix UTMs
- One campaign > 50% of revenue â concentration risk
Step 5: Reallocation Recommendation
Build a specific reallocation plan:
CURRENT ALLOCATION (monthly):
- Google Ads: $8,000 (2.1Ă ROAS)
- Meta Ads: $12,000 (0.9Ă ROAS)
- LinkedIn: $3,000 (4.2Ă ROAS)
RECOMMENDED REALLOCATION:
- Google Ads: $9,000 (+$1,000) â scale branded search
- Meta Ads: $6,000 (-$6,000) â kill "lookalike-v3", keep retargeting only
- LinkedIn: $7,000 (+$4,000) â scale the 4.2Ă ROAS campaign
- Reserve: $4,000 â test new channel (TikTok or YouTube)
NET CHANGE: $0 (same total budget)
EXPECTED ROAS LIFT: 1.6Ă â 2.4Ă (projected)
Step 6: Output Format
PERIOD: [start] to [end]
TOTAL AD SPEND: $X
TOTAL ATTRIBUTED REVENUE: $Y
BLENDED ROAS: ZĂ
TOP 3 PERFORMERS:
1. [Campaign] â [ROAS]Ă â [Recommendation]
2. [Campaign] â [ROAS]Ă â [Recommendation]
3. [Campaign] â [ROAS]Ă â [Recommendation]
BOTTOM 3 (KILL CANDIDATES):
1. [Campaign] â [ROAS]Ă â $[spend] wasted
2. [Campaign] â [ROAS]Ă â $[spend] wasted
3. [Campaign] â [ROAS]Ă â $[spend] wasted
CHANNEL MIX:
- Paid: X% Organic: Y% Direct: Z% Referral: W%
REALLOCATION PLAN:
[Specific budget moves with dollar amounts]
PROJECTED IMPACT:
[Expected ROAS lift and revenue gain]
TRACKING GAPS:
[Campaigns missing UTMs, ad sets with zero attribution, Stripe integration issues]
Attribution Principles
- Revenue over clicks. A campaign with 10Ă the clicks of another means nothing if it doesn't drive revenue.
- Absolute wins matter, not just ROAS. A 10Ă ROAS campaign at $200/mo spend matters less than a 2Ă ROAS campaign at $20K/mo.
- Kill slowly, scale cautiously. A low ROAS campaign might be the top-funnel driver. Check assisted conversions before killing.
- UTM hygiene is everything. Without clean UTMs, attribution is fiction. Fix tracking before fixing spend.
- Blended CAC is the truth. Per-campaign ROAS is useful, but blended CAC tells you whether the business model works.
Related Skills
funnel-reporter â End-to-end funnel metrics for the periods you're analyzing
ad-expert â Creative and targeting fixes once you've identified waste
cro-optimizer â If ads are working but landing pages aren't converting, pair with CRO