More screenshots

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Markov Multi-Touch Attribution & Budget Reallocation

    1

    Turn a CSV of customer touchpoints into channel attribution: Markov vs journey-filter vs last-click credit, plus CPA, ROI and a suggested budget split. Cleans bots first and flags where the methods disagree.

    Free

    Security scanned
    Markov Multi-Touch Attribution & Budget Reallocation

    Markov Multi-Touch Attribution & Budget Reallocation

    Example session with this skill installed

    Run an attribution analysis on assets/sample/sample_touchpoints.csv and sample_campaign_spend.csv. Conversion value is 50,000 and the conversion event is Purchase. Which channels deserve credit, and how should I reallocate the budget?

    • Read your context and instructions
    • Compiled the markov multi-touch attribution

    I ran the attribution on the sample files (2 brands, 5 channels, synthetic data). Last-click gives YouTube 27.5% of the credit, but the journey-filter method gives it only 5.2%, while Influencer Blog jumps from 14.9% (last-click) to 43.2%.

    Credit by channel (all brands, weighted by conversions)

    ChannelLast-clickMarkovFilter
    Google Search22.8%21.1%26.5%
    Influencer Blog14.9%15.5%43.2%
    Instagram20.9%22.5%13.6%
    Marketplace13.9%15.5%11.5%
    YouTube27.5%25.4%5.2%

    Key findings

    Methods disagree: in both brands Markov and filter name a different top channel (Markov: YouTube; filter: Google Search for B01, Influencer Blog for B02), so treat those rankings as uncertain.

    Efficiency: in brand B01, YouTube gets the largest Markov share but takes 40% of the spend (3,000,000 of 7,500,000), so it has the highest CPA.

    • Bot filtering: removed 125 of 3,280 users (3.8%) flagged by the behavior rules.

    Brand B01: CPA and ROI (conversion value 50,000, Markov credit)

    ChannelSpendCPAROI
    Google Search1,000,00028,494+75.5%
    Influencer Blog800,00036,470+37.1%
    Instagram1,500,00041,698+19.9%
    Marketplace1,200,00045,189+10.6%
    YouTube3,000,00070,687-29.3%

    Brand B01: suggested budget (1/CPA weighting, 60% cap, 5% floor)

    ChannelCurrentSuggestedChange
    Google Search1,000,0002,143,879+1,143,879
    Influencer Blog800,0001,675,026+875,026
    Instagram1,500,0001,465,036-34,964
    Marketplace1,200,0001,351,846+151,846
    YouTube3,000,000864,214-2,135,786

    Next steps
    1.

    Test the shift: move part of YouTube's budget to Google Search and Influencer Blog for a few weeks and compare CPA.
    2. Holdout, not a hard cut: pause YouTube in one region and check whether sales really drop.
    3. Review bot rules: if 3.8% seems high for your data, adjust --bot-fast-seconds or --bot-click-rate.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Marketing teams often rely on last-click attribution, which overvalues the final touchpoint and ignores the channels that actually started the customer journey. This leads to inefficient budget allocation and inflated CPA.

    What it does

    • Multi-method attribution calculates credit using Markov chains, a journey-filter method, and traditional last-click for comparison.
    • Bot filtering cleans your event logs using rule-based behavior thresholds so non-human traffic doesn't skew ROI.
    • CPA and ROI calculation maps attributed conversions against actual spend to find the true cost of acquisition per channel.
    • Budget reallocation generates a data-driven spending plan using 1/CPA weighting with configurable caps and floors.
    • Cross-method validation flags discrepancies between the Markov and filter models to show where channel value is uncertain.

    How it works

    1. Data ingestion reads your touchpoint and spend CSVs, mapping custom columns for users, channels, timestamps, and brand IDs.
    2. Path processing identifies conversion events, filters bots, and builds transition matrices for the Markov model.
    3. Execution runs the attribution.py script to generate CSV and JSON results including credit shares and budget shifts.
    4. Synthesis compares the methods to find where last-click is most misleading and produces a reallocation table.

    Frameworks & tools

    Runs on Python 3 using pandas and numpy for the matrix calculations. It processes local CSV files and can optionally generate charts via matplotlib.

    Why this beats prompting it yourself

    Attribution maths is easy to get wrong when an LLM improvises it. This skill runs a fixed Python script, so results are repeatable on every run. It also builds in guardrails a generic prompt would likely miss, such as flagging where two methods disagree and never recommending a channel cut to zero without a holdout test.

    Use cases

    • Identify top-of-funnel channels that drive awareness but get little credit in last-click models.
    • Rebalance a monthly ad spend across 5+ channels based on conversion efficiency.
    • Audit event logs for bot activity that might be inflating performance numbers.
    • Check a new channel's performance using a data-backed CPA instead of anecdotal evidence.

    Works best with

    A few hundred conversions per brand or more. Treat the budget plan as a data-backed starting point, and confirm big moves with a small spend shift before committing.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Marketing & SEO.

    Ignores market saturation and seasonality. Requires Python environment with pandas/numpy. Results are noisy for datasets with very few conversions.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 4 days ago

    • Free with an Agensi account

    Software
    Python 3.9+ with pandas and numpy
    Optional
    matplotlib and seaborn.

    Permissions

    Terminal / Shell
    Read Files
    Write Files

    File Scopes

    *.csv

    Runs a local Python script on your CSV files and writes result tables to an output folder. No network access.

    Listed4 days ago

    What's inside

    Frequently Asked Questions

    It compares credit under last-click, a Markov-chain model and a journey-filter method, so you can see which channels last-click may be over- or under-crediting. It then estimates CPA and ROI per channel and suggests a budget split to test.

    The skill requires two CSV files: one for touchpoint event logs (User ID, Channel, Timestamp) and one for spend data (Channel, Spend Amount). It includes a flexible mapping feature to accommodate your specific column naming conventions.

    It uses the open SKILL.md format. Your agent needs to run shell commands and Python 3 with pandas and numpy installed and for visual charts matplotlib and seaborn should be installed.

    A SKILL.md with the agent instructions, the attribution.py script, a method reference, and a small synthetic sample dataset to try it on.

    A touchpoint CSV with user ID, channel, event type (such as Impression, Click, Purchase) and timestamp; brand and campaign are optional. An optional spend CSV with channel and amount, plus brand or campaign if you have them. Column names can be mapped with options.

    New in Marketing & SEO

    Free