ds@mcpanalytics.aiEmail your data and your question and get an answer about your own data, with the method shown.Email your data and question. Get an answer.

How Much Credit Does Each Campaign Get?

By MCP Analytics Team | Published , updated

Have spend and conversions by channel? Run multi-touch attribution on your CSV: free, no signup →

You ran five campaigns last year. Your boss wants to know how much credit each one deserves. Last-touch attribution says Campaign 5 did everything. First-touch says Campaign 1 deserves all the credit. Neither rule looks at every combination of campaigns. Shapley value attribution (Shapley 1953) splits credit among the campaigns a customer touched before converting, using cooperative game theory. The split is credit under a stated rule. It is not proof that a campaign caused a sale.

Worked Example: Splitting Credit Among Channels

Question: How can Email, Search, and Social share credit in a small test?

Inputs: Made-up data, seed 2026. The code sets one random flag for each person and channel. The code fixes who converts by hand, so no channel was given any effect.

Method: For each group of channels, value is the share of all people who both converted and got one or more channels in that group. The empty group has value zero. The Shapley method finds the mean value each channel adds across all orders of adding channels. Each channel's share of the total credit is shown.

from itertools import permutations
import numpy as np

seed = 2026
rng = np.random.default_rng(seed)
# Exposures are random flags. Conversions are fixed by hand, so
# no channel was given any effect.
exposure = rng.integers(0, 2, size=(10, 3))
converted = np.array([1, 0, 1, 0, 1, 0, 1, 0, 0, 1])
names = ['Email', 'Search', 'Social']

# Value of a coalition: share of all customers who converted and
# had at least one exposure in it. The empty coalition is 0.
def value(coalition):
    if not coalition:
        return 0.0
    touched = exposure[:, list(coalition)].any(axis=1)
    return float(np.mean(converted * touched))

shapley = np.zeros(len(names))
orders = list(permutations(range(len(names))))
for order in orders:
    coalition = []
    before = value(coalition)
    for campaign in order:
        coalition.append(campaign)
        after = value(coalition)
        shapley[campaign] += after - before
        before = after
shapley /= len(orders)
total = shapley.sum()
all_value = value(tuple(range(len(names))))

print(f'Simulated data, seed {seed}')
print(f'Customers: {len(converted)}; '
      f'conversions: {int(converted.sum())}; '
      f'rate: {converted.mean():.3f}')
print('Inputs (Email, Search, Social, converted):')
for row, outcome in zip(exposure, converted):
    print(f'{row[0]}, {row[1]}, {row[2]}, {outcome}')
print('Value: share of customers who converted and')
print('had at least one campaign in the coalition.')
print('Shapley allocated conversion-rate points:')
for name, amount in zip(names, shapley):
    print(f'{name}: {amount:.3f} '
          f'({amount / total * 100:.1f}% of credit)')
print(f'Total allocated: {total:.3f}; '
      f'all-campaign value: {all_value:.3f}')

Printed output:

Simulated data, seed 2026
Customers: 10; conversions: 5; rate: 0.500
Inputs (Email, Search, Social, converted):
1, 0, 0, 1
1, 0, 0, 0
0, 0, 1, 1
0, 1, 1, 0
1, 1, 1, 1
0, 1, 1, 0
0, 0, 0, 1
1, 1, 1, 0
0, 1, 1, 0
1, 0, 1, 1
Value: share of customers who converted and
had at least one campaign in the coalition.
Shapley allocated conversion-rate points:
Email: 0.183 (45.8% of credit)
Search: 0.033 (8.3% of credit)
Social: 0.183 (45.8% of credit)
Total allocated: 0.400; all-campaign value: 0.400

Result: Email and Social each get 45.8% of the credit. Search gets 8.3%. The total credit is 0.400, the value for all channels together. Five customers converted, and four of them had at least one exposure, so 0.400 is shared and the fifth conversion (customer 7, who saw nothing) gets credit for nobody. Email and Social tie because each reaches 3 of the converters and Search reaches 1. The conversions were a fixed list and the exposures random flags drawn independently of them, so this split is arithmetic on a table of 10 people. One customer can change it by up to 10 points.

Limit: This small test uses made-up data. It links channels with people who convert. It does not show that a channel caused anyone to convert or tell us what real people do.

Sources

  • Shapley LS (1953). A value for n-person games. Contributions to the Theory of Games (AM-28), Volume II. doi:10.1515/9781400881970-018. Covers: the Shapley value, a way to split a joint total among players.
  • Shao X, Li L (2011). Data-driven multi-touch attribution models. Proceedings of the 17th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. doi:10.1145/2020408.2020453. Covers: data-driven multi-touch attribution models.

The Attribution Problem Every Marketing Team Faces

A customer sees your Facebook ad on Monday, clicks a Google search result on Wednesday, opens your email campaign on Friday, and buys on Saturday through a direct visit. Which channel gets the credit? First-touch says Facebook. Last-touch says direct. Linear attribution splits credit equally, which feels democratic but ignores the reality that not every touchpoint matters the same amount.

This is not an academic debate. The answer determines where your budget goes next quarter. If you credit the wrong channel, you may pour money into a campaign that was along for the ride. Last-touch is simple, but it gives all the credit to the final interaction and none to anything that came earlier.

Shapley value attribution, borrowed from cooperative game theory, solves this by asking: for every possible combination of campaigns a customer could have been exposed to, how much did adding this particular campaign change the outcome? It considers every permutation, calculates the marginal contribution of each campaign, and averages across all orderings. If each campaign's share is scaled to the model's total value, the shares add to 100%. That follows from the chosen value rule and base. It does not prove cause.

What This Analysis Covers

The report produces output cards on campaign and channel performance. Each card answers a specific question that marketing teams ask during budget planning.

Campaign Attribution (Shapley Values)

The centerpiece of the report. This card ranks each campaign by its Shapley value: the credit it earned under the model. With this value rule and a zero-value base, a share of 0.28 means 28% of the model's total credit once shares are scaled. It does not mean the campaign caused 28% of all people to convert. If Campaign 3 sits at 0.30 while Campaign 2 sits at 0.05, Campaign 3 gets more of the credit under this model, which is a place to start asking questions.

This is fundamentally different from looking at raw conversion rates. A campaign might have a high acceptance rate but low attribution because the customers who accepted it also saw other campaigns. Shapley splits model value among campaigns under the chosen value rule and base. A credit split alone does not show that a campaign caused an action.

Channel Revenue Attribution

Beyond campaigns, the report breaks down revenue by purchase channel: web, catalog, in-store, and deals. For each channel, you see total revenue contribution, revenue per transaction, and the percentage of customers who used that channel. This answers the perennial question: is our catalog investment paying off compared to digital?

Campaign Performance Summary Table

A detailed table showing each campaign's acceptance rate, conversion rate among acceptors, average spend of responders, and Shapley attribution value side by side. This is the table you put in front of the CMO. It compresses everything into one view, which makes the budget conversation concrete.

Channel Performance Summary Table

The channel equivalent: purchase count, total revenue, revenue per purchase, and customer reach for each channel. Web purchases can account for a larger share of transactions than of revenue when deal-based purchases pull down the average order value. These ratios can inform channel investment decisions.

Segment Response Patterns

When income data is available, the report segments campaign acceptance rates by customer income bracket. This reveals whether your campaigns are reaching the right customers. A common finding: high-income customers respond to different campaigns than mid-income customers. Campaign 5 might show a 15% acceptance rate among high-income segments but only 3% among lower segments, suggesting it works as a premium positioning play, not a broad acquisition tool.

Spend Category Breakdown

Revenue decomposed by product category (or spend type). This connects campaign attribution to what customers actually buy. If Campaign 3 is credited with conversions primarily in high-margin categories like premium products, its true value exceeds what the raw Shapley number suggests. If Campaign 2 drives volume in low-margin deal categories, its contribution looks worse when you factor in profitability.

What Data Do You Need?

You need customer-level marketing data in a CSV. Each row represents one customer. The required columns are:

Campaign acceptance flags: binary columns (0 or 1) indicating whether each customer accepted or responded to each campaign. You need at least one campaign column, and the split is more informative with more than one campaign. Map these to cmp1_accepted through cmp5_accepted.

Purchase channel counts: how many purchases each customer made through each channel (web, catalog, store, deals). These are counts, not revenue. Map them to web_purchases, catalog_purchases, store_purchases, and deals_purchases.

Final conversion flag: a binary column indicating whether the customer ultimately converted (purchased, subscribed, responded to the final campaign). This is the outcome variable that Shapley values are computed against.

Optional but valuable: customer income (enables segment analysis), recency in days (how recently they purchased), web visits (engagement indicator), and spend columns by category (enables the spend breakdown card). The more context you provide, the richer the report.

With few customers or very few acceptors for a campaign, the credit split can swing on one customer, as the worked example shows.

How to Read the Report

Start with the Shapley value chart. The campaigns are ranked from highest to lowest attribution. If a few campaigns take most of the Shapley credit, the credit is concentrated in them. If all campaigns cluster near equal values, the model found little difference between them, and you can look at whether your campaigns reach different audiences.

Next, cross-reference with the campaign summary table. A campaign can have high attribution despite a low acceptance rate if the customers who accepted it were disproportionately likely to convert. Conversely, a campaign with a high acceptance rate might show low attribution if those customers would have converted anyway. The gap between acceptance rate and Shapley value is where the insight lives.

The channel cards show where revenue per purchase and reach differ. If catalog generates the highest revenue per purchase but reaches only 15% of customers, expanding catalog distribution could be a growth lever. If deals drive volume but depress average order value, you may be training customers to wait for discounts.

The segment card shows you whether your campaigns are well-targeted. If high-income customers respond strongly to Campaign 4 but ignore Campaign 2, while mid-income customers do the opposite, you have evidence for segmented campaign delivery. Run different campaigns for different segments instead of blasting the entire list with everything.

When to Use Something Else

If you want to measure the return on ad spend for specific paid channels, a ROAS analysis is more direct. It takes your ad platform export and calculates cost per conversion, return per dollar spent, and break-even points. Attribution analysis shows how credit is split among campaigns; ROAS tells you whether each dollar of spend was profitable.

If you need to model the relationship between overall marketing spend and business outcomes across multiple channels simultaneously, media mix modeling (MMM) is the right tool. MMM uses regression on aggregate time-series data, weekly spend by channel versus weekly revenue, to estimate the contribution and diminishing returns of each channel. It works with aggregate data and handles saturation effects that Shapley attribution does not.

If you need to prove that a specific campaign change caused a lift in conversions (not just correlated with it), run a controlled A/B test with a holdout group. Attribution analysis shows association (customers who accepted Campaign 3 may be more likely to convert) but cannot distinguish whether Campaign 3 caused the conversion or whether conversion-prone customers were simply more likely to accept Campaign 3. A randomized holdout gives you causal evidence.

If you want to understand which customer characteristics predict campaign response (income, recency, purchase history), a logistic regression on campaign acceptance can identify the profile of likely responders. Use it alongside attribution: attribution shows how credit is split, logistic regression tells you who to target with each campaign.

The R Code Behind the Analysis

Every report names its method and includes the R code that produced it, so you can reproduce, audit and cite it. The method code is fixed, not rewritten for each run, so the same data gives the same analysis every time.

The Shapley value calculation uses combinatorial enumeration of campaign subsets to compute each campaign's marginal contribution to conversions. Channel revenue attribution uses base R aggregation functions. Income segmentation uses cut() for binning and tapply() for group-level acceptance rates. Every step is visible in the code tab of your report, so you or an analyst can verify exactly what was done and reproduce it independently.

Your turn

Bring your own data and the question you actually need answered.

MCP AnalyticsData science by email Send us your data and your question, and we will reply. ds@mcpanalytics.ai

Working on this for your business? See the marketing analytics tools.