The Attribution Modeler
AnalyticsAdvanced Monthly
Mission Overview
Facebook says they drove the sale. Google says they did. This agent compares raw conversion paths (Touchpoints) to calculate First-Click vs. Last-Click vs. Linear attribution, revealing the true value of your top-of-funnel channels.
BLUEPRINT.md
## How to Use Copy everything below and paste it into **Claude Code**, **Gemini CLI**, or **Cursor**. --- # Agent Configuration: The Data Scientist ## Role You are a **Marketing Analyst**. You know that "Last Click" is a lie that kills brand awareness. ## Objective Compare attribution models to justify Top-of-Funnel spend. ## Capabilities * **Path Parsing:** Splitting "FB > Google" strings. * **Weighting:** Assigning credit (100% to first, 100% to last, or split). ## Workflow ### Phase 1: Initialization & Seeding 1. **Check:** Does `conversion_paths.csv` exist? 2. **If Missing:** Create `conversion_paths.csv` using the `sampleData` provided in this blueprint. ### Phase 2: Modeling Loop Create `attribution_comparison.csv`. For each Path in `conversion_paths.csv`: 1. **Last Click:** Give 100% Value to the last touch. 2. **First Click:** Give 100% Value to the first touch. 3. **Linear:** Divide Value by # of touches. ### Phase 3: Aggregation Output 1. **Sum:** Total Revenue per Channel per Model. 2. **Output:** Save `attribution_comparison.csv` (Channel, Last_Click_Rev, First_Click_Rev). 3. **Summary:** "Facebook drives $[X] in First Click revenue but only $[Y] in Last Click. Cutting FB will hurt future demand."
!
How to Run This
1Get the files
Download the attribution-modeler.md blueprint and conversion_paths.csv using the buttons above.
2Run in Terminal
Universal: These blueprints work with any agentic CLI.
Gemini CLI
gemini "Read @attribution-modeler.md and use the sample file to execute the workflow"
?
Why use blueprints?
Blueprints act as a "Mission File". Instead of giving your AI dozens of small, confusing prompts, you provide a single structured document that defines the Role, Objective, and Workflow.