Appearance
revenue-attribution
FreshSource: BIBLE.md (Phase 12 Phase 5, revenue-attribution 5 routes), ROADMAP.md (Phase 5.2)
Closes the loop from action to outcome. "Ghost Engine posted X on day Y" then "rank moved from 12 to 5 on day Z" then "client got 30 more calls this month." Connects the action log, rank tracker, and client reporting into a causal chain.
The killer feature for charging $3K per month instead of $500: proof of ROI.
Causal chain
flowchart LR A[Action log: posted on platform X] --> R[Rank tracker: keyword K moved 12 to 5] R --> CR[Client reporting: +30 calls this month] CR --> AT[Attribution: action X contributed Y% of lift]
Per-keyword ROI
Each tracked keyword gets:
- Total actions taken (CTR, cascade, links)
- Rank movement over time
- Estimated traffic delta from rank movement
- Revenue/lead delta (from client-side conversion data)
- Cost to deliver (actions x cost per action)
- ROI ratio
Routes (5)
| Method | Route | What |
|---|---|---|
| GET | /attribution/:keyword | Per-keyword causal chain |
| GET | /attribution/client/:clientId | All keywords for a client with revenue |
| POST | /attribution/conversion | Record a client conversion event |
| GET | /attribution/correlation | Action-to-rank correlation analysis |
| GET | /attribution/report | Full ROI report |
Conversion ingestion
The client provides conversion data (calls, leads, sales). Ghost Engine ingests via:
bash
curl -X POST http://localhost:4700/attribution/conversion \
-H "Content-Type: application/json" \
-d '{
"clientId": "journey-junk",
"date": "2026-05-20",
"calls": 30,
"leads": 8,
"revenue": 4200
}'