marketing

Shapley Attribution: Measure Channel Impact

Get true marginal conversion contributions with Shapley Attribution, a library for startup founders and marketers, using Shapley values.
42 stars13 forksPythonGuide quality 8/10Updated 4/20/2026100% free · open source
What it does

Shapley Attribution measures the true marginal contribution of each marketing channel to conversions using Shapley values, providing a nuanced understanding of channel effectiveness

When to use it
  • When evaluating the effectiveness of multiple marketing channels on a conversion goal
  • When trying to optimize marketing budget allocation across different channels
  • When needing to account for interactions and synergies between marketing channels
Ready-to-paste prompt
From the ShapleyAttribution example, `model = ShapleyAttribution(df, target='conversion', channels=['email', 'social', 'paid_search']); results = model.fit()`
Heads up: Make sure to handle missing values and categorical encoding in the input DataFrame, as ShapleyAttribution expects numerical data
Saves to your device
Use with Claude
New

Skip the builder — one click puts this in Claude, Cursor, Antigravity and more.

✅ Light setup

Installs with a command or two; your AI agent can do it for you.

Try it instantly — no install
Claude Code
mkdir -p ~/.claude/skills/shapley-attribution && curl -fsSL https://workflowstacks.com/api/skills/shapley-attribution/claude-skill -o ~/.claude/skills/shapley-attribution/SKILL.md
Open in another AI app

Opens the app with this repo with the prompt ready to go — no copy-paste needed.

Connect the whole catalog (MCP)
claude mcp add --transport http workflowstacks https://workflowstacks.com/api/mcp

Adds a WorkflowStacks connector to Claude Code: search and load any skill here by chatting.

Quick Actions
Details
Creator
ianchute
Language
Python
Category
marketing
Published
12/2/2019

Are you the creator of this tool? Claim your listing → and earn 85% of every sale.

Ready-to-run pack · one-time $29

Rank Tracker

A weekly email of where you actually rank on Google.

Includes the tested workflow and a written setup playbook. Needs: SerpAPI key (free tier).

See what you get