Custom Attribution Model: How to Set the Weights and Prove They Work

David Lopes

TL;DR

  • A custom attribution model is a credit rule you write yourself: which touchpoints can earn credit, and what share of the order each one gets. It reads the same journeys as every other model. Changing the model moves credit between channels; it does not add information.
  • The weights are one decision out of five. Before any weight is applied you have already chosen which touchpoints are eligible, how far back the lookback window reaches, which date the credit lands on, and whether you split revenue or contribution margin.
  • Crediting contribution margin instead of revenue only changes the ranking across many orders, because margin rates differ by product and each channel sells a different mix. On a single order it changes nothing.
  • In Polar, paid-only, the lookback window and cash or accrual are settings on top of the attribution model, with one exception: Full Impact does not take a lookback window. Since September 2026, a custom rule can be registered for a store and then appears in the model picker next to the standard models. Causal Lift is the check on all of it, since attribution splits observed revenue and cannot tell you what was incremental.

Meta says it drove 40 orders. Google says 32. Shopify says most of the revenue came from Direct. Add up the platform numbers and you get more orders than the store shipped, and the budget meeting is next week. That is usually when someone suggests building a custom attribution model.

Most guides then tell you to “choose weights that reflect your customer journey” and stop.

This one runs a single journey through seven models, shows where the margin question actually bites, and ends with the checks that tell you whether your model describes the business or just the budget you already wanted.

What a custom attribution model is

A custom attribution model is a credit allocation rule you define yourself: which touchpoints in a conversion path are eligible for credit, and what share of the order each one receives.

It does not use different data. First click, last click, linear and a hand-built rule all read the same journeys and return different splits.

A custom model is also not a media mix model, which works from aggregate spend and revenue over time and never looks at an individual journey, and not an incrementality test, which withholds spend from a region or audience and measures what happens.

Those two answer whether the revenue would have arrived anyway. A custom model only answers how to divide revenue you have already observed. If you build one to prove incrementality, you will end up tuning it until it agrees with you.

Why teams outgrow the fixed models

Last click gives everything to the final touch.

In ecommerce that is usually Direct or brand search, the two channels closest to checkout and the least responsible for creating demand.

First click does the opposite and overpays the top of the funnel.

Both are consistent rules, and both have a known bias.

Platform-reported numbers have a different problem: each platform sees only its own touchpoints and claims the whole conversion. Meta, Google and TikTok will each take credit for the same order, so their totals cannot be summed. Any attribution setup has to deduplicate first.

The built-in options are not keeping up either. General-purpose analytics tools have been retiring rule-based models rather than adding them, so the list you can pick from is shorter than it was two years ago, and none of the remaining rules were written with your product mix or buying cycle in mind.

Marketers have noticed: roughly 75% are moving away from last-click attribution, and only about one in five are confident it reflects long-term business impact (source: eMarketer).

The five decisions in a custom attribution model

DecisionWhat you are choosingOptionsWhy it matters
1. EligibilityWhich touchpoints can receive credit at allAll touchpoints, or paid onlyApplied before weights. Orders with no eligible touchpoint fall out of every channel’s total.
2. Lookback windowHow far back a touchpoint can sit and still countA fixed number of days, or unlimitedChanges which touchpoints enter the path, not how credit is split. Short windows push any model toward last click.
3. WeightsWhat share each eligible touchpoint getsFirst, last, linear, position based, time decay, Shapley-based, or your own ruleThe decision every guide covers.
4. Credit dateWhich day the credited revenue lands onCash (day of order) or accrual (day of touchpoint)Barely matters on a two-day buying cycle. Reshapes every month on a three-week one.
5. Credited metricWhat is being splitRevenue, or contribution marginChanges channel rankings when channels sell products with different margins.

Eligibility and weights get confused, so to be precise: a paid-only rule does not move credit from Direct to Meta. It removes non-paid touchpoints from the path before the model runs. If an order has no paid touchpoint at all, it no longer belongs to any channel.

In Polar those orders show up as Undefined rather than disappearing, and they come back as soon as you loosen the setting. People new to the setting often see their attributed total drop and assume the tracking broke.

What counts as "paid" is also less obvious than it sounds. In Polar, a touchpoint is paid if it resolves to an identifiable campaign or an ad-platform channel. That includes Klaviyo flows and campaigns, and any link with a utm_campaign on it, whether or not money was spent.

The one exception is a touchpoint whose source, medium or campaign contains "organic": it is never counted as paid, even with a UTM. The attribution settings article lists the edge cases. Check your tool's definition before reading a paid-only report.

On credit date: a customer clicks an ad on 28 August and buys on 3 September.

Cash puts the whole order on 3 September. Accrual puts each touchpoint's share on the day it happened, so some of the order lands in August.

For furniture, supplements or anything people research for weeks, accrual shows when the marketing did its work and cash shows when the money came in. Finance usually wants the cash view, media buyers the accrual one.

Decision five gets its own section below, because it only makes sense once you look at more than one order.

How to set the weights

Take one journey and hold it fixed:

A customer clicks a Meta ad on day 0, clicks a Google brand search ad on day 3, clicks a link in a Klaviyo email on day 6, then types the URL on day 9 and buys. The order is $180.

Position based, 40/20/40

40% to the first touch, 40% to the last, and the remaining 20% split across the middle. Meta gets $72, Direct $72, Google $18 and Klaviyo $18.

This is a reasonable default for most stores. The first and last touches are the two you can identify most reliably, so the rule puts most of the credit where the data is strongest.

A 20/40/40 variant

Some teams move weight into the middle: 20% to first touch, 40% to last, 40% split across the middle. Meta gets $36, Direct $72, Google $36 and Klaviyo $36.

Compared with 40/20/40, Direct is unchanged. Meta gives up $36, and that $36 goes to the two middle touchpoints, $18 each.

The argument for it is that retargeting, email and reviews all sit in the middle of an ecommerce journey. The effect is that retention channels look noticeably better, so validate it before you move budget on it.

Time decay

Each touchpoint’s weight halves for every half-life it sits before the order. Polar’s time decay model uses a seven-day half-life: a touch seven days out carries half the weight of one on the day of purchase.

Raw weights on our journey: 2^(-9/7) = 0.410 for Meta, 2^(-6/7) = 0.552 for Google, 2^(-3/7) = 0.743 for Klaviyo, and 1 for Direct. They sum to 2.705. Normalised: Meta 15.2%, Google 20.4%, Klaviyo 27.5%, Direct 37.0%, or $27.29, $36.73, $49.44 and $66.54.

Time decay rewards the touches that moved the customer to checkout. The trade-off is that it underpays the touch that started the journey, simply because it came first, and that cost grows with the length of the buying cycle.

Linear

25% each, $45 per touchpoint. Use it when you do not yet know the shape of your journeys. It makes no claim about which touch matters most, which is its main advantage.

Paid only, position based

Apply eligibility first. Under Polar’s definition, Meta, Google and a named Klaviyo flow are all paid; the direct visit is not. Direct leaves the path, and 40/20/40 runs over the three remaining touchpoints: Meta $72, Google $36, Klaviyo $72.

Direct’s $72 is redistributed: $54 to Klaviyo, which is now the last eligible touch and goes from $18 to $72, and $18 to Google, which goes from $18 to $36. Paid channels always look better under a paid-only model, because the same revenue is split among fewer channels.

It is useful for “of the channels I control, which ones touched this order”, and misleading as a measure of total channel performance.

One journey, seven models

The same customer, the same $180 order:

ModelMeta, day 0Google, day 3Klaviyo, day 6Direct, day 9
First click$180.00$0$0$0
Last click$0$0$0$180.00
Linear$45.00$45.00$45.00$45.00
Position based, 40/20/40$72.00$18.00$18.00$72.00
Custom, 20/40/40$36.00$36.00$36.00$72.00
Time decay, 7-day half-life$27.29$36.73$49.44$66.54
Paid only, position based$72.00$36.00$72.00not eligible

Meta’s credit goes from $0 under last click to $180 under first click, on the same order and the same data. Every channel in the table has a model that gives it nothing and a model that gives it the most.

An attribution number is only meaningful alongside the rule that produced it.

Our guide to the standard attribution models runs the same kind of journey through the fixed set in more detail.

Crediting contribution margin instead of revenue

Go back to the single order. If its contribution margin is 40%, crediting margin instead of revenue multiplies every channel’s share by 0.4. Meta’s $72 becomes $28.80, Direct’s $72 becomes $28.80, and the ranking is identical. On one order, switching the credited metric changes nothing.

The effect appears across many orders, because the margin rate is not constant. It depends on what was bought, and different channels bring in different baskets. Prospecting ads tend to sell the discounted starter bundle, brand search sells the core product at full price, and email sells refills to people who already own it.

Take a store with three products:

ProductPriceContribution margin rateContribution margin per unit
Starter bundle (discounted, heavy to ship)$9015%$13.50
Core product$6045%$27.00
Refill$4065%$26.00

Over a month, under one fixed model, the credited units per channel look like this:

ChannelBundlesCoreRefillsCredited revenueCredited contribution marginBlended margin rate
Meta803010$9,400$2,15022.9%
Google207020$6,800$2,68039.4%
Klaviyo53090$5,850$3,21855.0%

Ranked by revenue: Meta, Google, Klaviyo. Ranked by contribution margin: Klaviyo, Google, Meta.

The weights did not change. The order-by-order margin varies with the product mix, and each channel's mix is different, so the two metrics rank the channels in reverse.

Add spend and the gap matters for budget. If Meta cost $3,000 and Google $1,500, Meta shows a 3.1 ROAS and Google 4.5. After ad spend, Meta is $850 below zero on contribution margin and Google is $1,180 above. Contribution margin after ad spend is what Polar calls CM3 (net sales minus total costs minus ad spend).

A revenue-credited model would tell you to scale Meta. A margin-credited one would tell you Meta is buying revenue at a loss, unless those bundle buyers come back for refills, which is a retention question the attribution model cannot answer on its own.

Two practical notes.

First, the credit has to be split order by order: each order's own margin is split across its touchpoints by the weights, then summed per channel. Applying a store-wide average margin to each channel's revenue gives you the revenue ranking again.

Second, this only works if cost of goods is loaded at product level. With a single store-wide COGS percentage, every order has the same margin rate and you are back to multiplying by a constant.

In Polar, contribution margin (CM1 to CM4) can be broken down by channel and campaign through Polar Pixel attribution once COGS are connected, and the attribution model and settings (paid-only, lookback window, cash or accrual) apply to it exactly as they do to purchases.

A custom rule in practice

Custom weights do not have to follow a textbook shape. Here is the rule Valabasas asked for:

  1. Split the touchpoints inside the lookback window into marketing touches (any known channel: paid, organic, email, referral) and Direct/Undefined.
  2. If there are no marketing touches, the order goes to Direct or Undefined.
  3. Otherwise, sort the marketing touches by date. The first gets the largest share and each later touch gets half the weight of the one before it: one touch gets 100%, two get 66.7% and 33.3%, three get 57.1%, 28.6% and 14.3%. Direct and Unknown get nothing.

It is a reverse time decay that ignores the direct visit, built for a brand whose leadership believed the first marketing touch did most of the work.

On our journey it gives Meta $102.86, Google $51.43, Klaviyo $25.71 and Direct $0. Whether that belief is right is for the next section to test.

A rule can also read more than the touchpoints. Anything recorded on the order can feed it, as long as it can be matched to the order ID: the discount code, the post-purchase survey answer, the sales channel, or touchpoints imported from a CTV provider. Two examples:

  • If the discount code matches an affiliate pattern, give part of the credit to Affiliates, even when no affiliate click was tracked.
  • If the survey answer names a channel, give it 50% of the credit. If that channel is also the first touch in the path, raise it to 90%.

This is where a custom rule goes further than reweighting: it brings in evidence the click path does not contain.

How to validate a custom attribution model

A model you built has no outside reference. You have to add one.

Reconcile the total. Sum attributed orders across all channels, add Undefined, and compare with orders placed. Under a full-credit model the two should match. If they do not, look for double counting or an eligibility filter you forgot about. Participation models are the exception: in Polar, Full Paid Overlap and Full Impact inflate totals on purpose and are meant for participation analysis, not ROAS, so their totals will be higher than orders placed.

Expect fractional conversions. Under linear, our order counts as 0.25 conversions for each of four channels. A channel with 12.5 conversions is correct. Only single-touch models produce whole numbers.

Watch the total when you switch. Moving between two full-credit models should leave total orders unchanged and only move credit between channels. Turning on paid-only should grow Undefined by exactly the orders that had no paid touch. If a plain model change moves the total, the two models are not reading the same set of journeys and you cannot compare them.

Test against a holdout. This is the only check that measures causation. Turn a channel off in a set of regions and measure what happened to revenue against comparable regions where it stayed on. Then compare with what the model credited. If your model gives Meta 30% of revenue and switching Meta off in the holdout regions costs you 5%, the weights are wrong, however consistent they look. Polar’s Causal Lift runs this as a geo test, comparing holdout regions with a synthetic control. Audience holdouts, run inside the ad platforms, are another option but are not part of Causal Lift.

Re-run a period you already know. Apply the model to last quarter, one where you know what happened: the launch that worked, the channel that stalled. If the model contradicts what you saw, the weights need another look.

Where custom models go wrong

Tuning the weights until they agree with you. You try 40/20/40, retargeting looks weak, you try 20/40/40, it looks better, you keep it. No single step was dishonest, but the result can no longer be proven wrong. Write down your thesis about the journey before choosing weights, and check the model against a holdout rather than against expectations.

Impressions on the big social platforms stay mostly invisible. Meta and TikTok do not share view data at the individual order level. Polar’s Full Paid Overlap + Facebook Views model adds Meta’s view-through conversions in aggregate, but because they are not tied to specific orders they cannot enter a per-touchpoint split. A click-based custom model will underrate any channel whose job is to be seen, and reweighting will not fix that.

Channels with no touchpoint get zero. Any channel that never enters the journey gets 0%, and the model still looks internally consistent. Some of these can be brought in: Polar ingests view-through and third-party touchpoints from TV and CTV (TV Scientific, MNTN, Tatari), podcast (Podscribe) and direct mail (PebblePost, LS Direct, Cohere One), and they enter the path like any click, so first click, last click, linear and multi-touch models can credit them. Word of mouth and creator recommendations still leave nothing to ingest. Post-purchase survey answers are the usual proxy for those. In Polar, a survey answer is added to the journey as the last touchpoint, so the last click model is the view that puts it first, and a custom attribution function can give it whatever weight you choose.

Too many models. One agency describes combining more than 25 models for a single ecommerce client. That can work with a team of analysts. An in-house team is better served by two models it can explain.

Optimizing to the model. A model is a way to allocate budget. Once the team starts targeting the model’s output instead of profit, the reported number improves while the business does not.

Build it yourself or configure it

Build it in a warehouse when your journey logic is unusual: offline touchpoints, custom channel groupings, or a subscription where the second order matters more than the first.

You need touchpoint-level journey data, and you write the credit rule as SQL over each order’s path. The first version is the easy part. Every new channel, pixel change or lookback adjustment afterwards is a code change, and often only the author can make it.

Use a platform when your journeys are standard and you want to change the rule and compare results quickly. Polar has eight attribution models, plus settings and custom functions on top:

  • Standard models: first click, last click, linear, U-shaped (40/20/40) and time decay.
  • Two overlap models for paid participation: Full Paid Overlap, which gives every paid channel in the path full credit, and Full Paid Overlap + Facebook Views, the closest comparison to Meta’s own attribution. Both inflate totals by design.
  • Full Impact, which weights channel groups by estimated marginal contribution using Shapley values over observed paths, so no one has to hand-pick the weights. Like the overlap models, it is meant for participation analysis rather than ROAS.
  • Paid-only, a lookback window (a set number of days or unlimited) and cash or accrual credit dates, applied on top of the model. Full Impact is the exception on lookback: it always uses every touchpoint. Paid-only changes nothing on Full Paid Overlap, which is paid by definition.
  • Custom attribution functions: a rule of your own, like the Valabasas one above, is registered for your store by Polar’s team and then appears in the model picker next to the standard models. The rule can use order-level data such as discount codes, survey answers or sales channel, not only the touchpoints. For now it is available in custom reports, not yet on the Acquisition page.
  • Deduplication across platforms is handled underneath, so platform-reported and attributed totals can be compared side by side.

Whichever route you take, check journey coverage before arguing about weights. A model that splits credit across a path missing half its touchpoints will give a precise and wrong answer under any weighting.

More on that in our piece on multi-touch attribution for ecommerce.

FAQ

The position-based model: 40% of the order to the first touchpoint, 40% to the last, and 20% shared across the middle. On a $180 order with four touchpoints, that is $72 to the first channel, $72 to the last, and $18 to each of the two in between. Every attribution model is a rule of this kind; only the percentages change.
Make five decisions in order: which touchpoints are eligible, how far back the lookback window reaches, what share each eligible touchpoint gets, which date the credit lands on, and whether you split revenue or contribution margin. Write down why you chose the weights before you see the results, then check the model against a holdout test.
The unit of analysis. Multi-touch attribution reads individual conversion paths and splits credit between the touchpoints it can see. Marketing mix modelling ignores individual journeys and estimates channel contribution from aggregate spend and revenue over time. MTA suits weekly channel decisions, MMM handles channels that leave no click, and neither measures incrementality on its own.
An ad platform attribution window: a conversion counts if it follows a click within seven days or an impression within one day. Each platform sets its own window, which is one reason platform numbers do not reconcile with each other or with your store. A custom attribution model replaces those with one lookback window across every channel.
No. GA4 offers three models and no editable weights. The workarounds are exporting event data to a warehouse and writing the rule in SQL, or using an attribution tool that exposes eligibility, lookback and credit date as settings.

Table of contents

Make strategic decisions in minutes

See every metric that matters, in one place.

Book a demo

Ecommerce Benchmark

4,000+ brands, refreshed weekly.

See the benchmark

Frequently asked questions

Ready to stop guessing and start growing?

Make strategic decisions in minutes, not weeks.

Book a demo