Shopify Ad Attribution
by @mguozhen
Shopify ad attribution agent. Calculates true ROAS per channel by correlating Shopify order UTM data with ad spend — reveals which channels actually drive pr...
clawhub install shopify-ad-attribution📖 About This Skill
name: shopify-ad-attribution description: "Shopify ad attribution agent. Calculates true ROAS per channel by correlating Shopify order UTM data with ad spend — reveals which channels actually drive profit vs. which ones just get credit. Triggers: ad attribution, shopify attribution, roas by channel, true roas, marketing attribution, utm analysis, ad spend analysis, channel performance, meta attribution, google attribution, shopify ads" allowed-tools: Bash metadata: openclaw: homepage: https://github.com/mguozhen/shopify-ad-attribution
Shopify Ad Attribution
Cut through attribution lies — find out which channels actually drive profit, not just which ones take credit.
Paste your Shopify order UTM data and ad spend by channel. The agent calculates true ROAS, profit-adjusted ROAS, and surfaces channels that over- or under-claim credit.
Commands
attribution setup # configure store, COGS%, channels, and spend data
attribution report # full attribution analysis across all channels
attribution by channel # per-channel revenue, spend, and ROAS breakdown
attribution roas # ROAS and profit-adjusted ROAS per channel
attribution ltv # LTV-adjusted attribution (repeat purchase value)
attribution last click vs multi touch # compare last-click vs. linear vs. time-decay models
attribution anomaly # flag channels with unusual credit patterns
attribution save # save setup and latest report to workspace
What Data to Provide
The agent works with:
No integrations needed. Paste exported data directly.
Workspace
Creates ~/shopify-attribution/ containing:
setup.md — store configuration, COGS%, channel mapping, UTM conventionsreports/ — monthly attribution reportsspend-log.md — historical ad spend by channelanomalies.md — flagged attribution anomaliesAnalysis Framework
1. UTM Parameter Mapping
2. Last-Click Attribution Model
3. Linear Attribution Model
4. Time-Decay Attribution Model
5. ROAS Calculation
6. Channel Overlap and LTV Adjustment
7. Attribution Anomaly Detection
Output Format
attribution report delivers:
Channel Summary Table
| Channel | Spend | Revenue (LC) | ROAS (LC) | Profit ROAS | Orders | |---------|-------|-------------|-----------|-------------|--------| | Meta | $X | $X | X.Xx | X.Xx | N | | Google | ... | ... | ... | ... | ... |Attribution Model Comparison
| Channel | Last-Click | Linear | Time-Decay | Difference | |---------|-----------|--------|------------|------------|Key Findings
1. Best true-ROAS channel (profit-adjusted) 2. Most over-credited channel (last-click vs. linear gap) 3. Attribution coverage rate and dark zone estimate 4. Recommended budget reallocationRules
1. Always establish COGS and margin before computing profit-adjusted ROAS — reported ROAS without margin context is misleading
2. Never declare a channel unprofitable based on last-click attribution alone — always show multi-touch comparison
3. Flag UTM coverage rate prominently — if >25% of orders lack UTM data, all channel numbers are understated
4. Apply the correct break-even ROAS threshold for the store's margin — not a generic benchmark
5. Distinguish between revenue attribution and profit attribution — high-AOV channels may look great on revenue but poor on profit
6. Identify the Meta vs. Google credit-stealing dynamic by default — it is the most common misattribution pattern in Shopify stores
7. Save reports to ~/shopify-attribution/reports/ with month-year filename on every attribution save call
🔒 Constraints
1. Always establish COGS and margin before computing profit-adjusted ROAS — reported ROAS without margin context is misleading
2. Never declare a channel unprofitable based on last-click attribution alone — always show multi-touch comparison
3. Flag UTM coverage rate prominently — if >25% of orders lack UTM data, all channel numbers are understated
4. Apply the correct break-even ROAS threshold for the store's margin — not a generic benchmark
5. Distinguish between revenue attribution and profit attribution — high-AOV channels may look great on revenue but poor on profit
6. Identify the Meta vs. Google credit-stealing dynamic by default — it is the most common misattribution pattern in Shopify stores
7. Save reports to ~/shopify-attribution/reports/ with month-year filename on every attribution save call