Allocating a marketing budget efficiently is problematic without knowing the contribution of each channel to the revenue generated and your overall conversions. Analytics and marketing tools credit their own platform for the conversion, failing to detect the efficiency of other marketing channels.
A user first interacts with a Facebook ad, performs a Google search for the product, and then opens the company's newsletter before making a purchase. In this case, the same exact conversion would be reported differently in different tools. Facebook would receive conversion credit in Facebook Ads Manager, while Google Analytics would attribute the conversion to Google as the last paid channel.
Third-party tools won't reveal the whole customer journey and appropriately credit each touchpoint. To fix broken tracking, a marketing team needs a custom data-driven marketing attribution model.
Three Steps to Create a Custom Marketing Attribution Model
Why would someone need to build a custom marketing attribution model? By doing so, you can assign conversion credit where credit is due when it comes to the different marketing channels on your customer journey, which helps you to:
- Collect data from all your data sources Aggregating data on all customer touchpoints
- Pull all your data together Import all the data we described above
- Decide on an attribution window Take into account historical data and business considerations, like the purchase cycle for your products and the norms in your industry
- Better assess the performance of each channel and make data-driven decisions.
- Determine the most effective marketing channels for different customer segments and target users based on their lifetime value.
- Allocate resources and budget more efficiently.
- Tailor your messaging and content.
- Monitor and adjust your marketing strategies over time.
To create a custom attribution model, you will need to complete the following three steps.
Step #1. Collect data from all your data sources
The process starts with aggregating data on all customer touchpoints that occurred during the customer’s journey on your app, website, social media networks, and other platforms.
Attribution models require conversion path data in a specific tabular format. Your data warehouse must contain a table where each row represents one touchpoint in a customer's journey, structured with the following required fields:
| Field Name | Data Type | Purpose | Example Value |
|---|---|---|---|
| user_id | String | Links all touchpoints for one customer | usr_8k2m9n |
| timestamp | Datetime | Orders touchpoints chronologically | 2026-03-15 14:32:18 |
| touchpoint_id | String | Unique identifier for this interaction | tp_fb_ad_12345 |
| channel | String | Marketing channel attribution target | paid_social, organic_search, email |
| conversion_flag | Boolean | 1 if this touchpoint resulted in conversion | 0 or 1 |
| revenue | Decimal | Transaction value (NULL for non-conversions) | 1299.00 |
Capturing Urchin tracking module (UTM) tags
Urchin tracking module tags, or simply UTM tags, are parameters appended in the URLs of marketing campaigns that don’t modify the destination but pass on information.
For example, a URL from a Facebook campaign would look like this:
https://www.example.com/?utm_source=facebook&utm_medium=social&utm_campaign=nameofyourcampaign
This URL directs people to example.com. It passes on parameters to identify information for the origin source of the traffic. These parameters fire when the above URL is loaded.
The parameters used to identify the sources of traffic are:
- utm_source which indicates the channel that brought the traffic, for example, Facebook or LinkedIn.
- utm_medium which shows the type of traffic, whether it’s a newsletter, cost per click (CPC), or something else.
- utm_campaign which tells you the campaign that your URL is part of.
To derive additional information, you can also use parameters like utm_content and utm_term.
If you don’t use UTM tags, the analytics tools will capture the URL of the referrer but will label it as organic instead of paid.
Capturing user-level data
The second thing to consider is user-level data, including in-app events, re-engagements, clicks, logs, etc. The ability to identify users comes from assigning a unique ID to each user, enabled by identity solutions.
Analytics tools like Mixpanel or Heap give you the ability to identify device IDs and user IDs, as well as use the combination of these two dimensions to identify multiple devices for each user across multiple touchpoints.
User-level data is vital for marketing attribution if you intend to use Google Analytics together with a customer relationship management (CRM) system. UTM tags are naturally problematic when used with CRMs. So, to properly track revenue from your CRM, you need to match every visitor to a ClientID through Google Analytics application programming interface (API).
Capturing conversion and revenue data
To complete your marketing attribution model, you will also need to pull data on the conversions and the respective revenue that is likely found in your CRM. These data points will help you calculate each marketing channel's conversions, revenue, and ROI.
One way to pull large volumes of data from a CRM is the extract, transform, load (ETL) solution. ETL automatically pulls all your data, applies transformations and loads the data into a data warehouse, business intelligence (BI) or visualization tool, or another destination.
Step #2. Pull all your data together
To create a custom attribution model, you need to import all the data we described above into one place, ideally a database or marketing data warehouse.

Once you have all the metrics and dimensions required for the attribution model imported into your database, you should consider a few factors for your model.
Validate that you have sufficient data volume before proceeding to model training.
Step #3. Decide on an attribution window
An attribution window, also called a conversion window or lookback window, is the time frame during which a conversion should be credited to a touchpoint.
Let's say you launch a social ad campaign for your new product. A user seeing this ad may not show an immediate intent action, conversion due to timing, need for a partner's opinion, or general concerns. After two weeks, the user comes across your video ad, looks through it, but still doesn’t purchase a product. But in seven more days, this same user goes directly to the website and completes a purchase. Not considering a conversion window, a company may attribute this conversion to the organic channel. And when the marketing team decides to optimize non-converting touchpoints, video ads will be abolished.
When deciding on an attribution window, take into account historical data and business considerations, like the purchase cycle for your products and the norms in your industry. For example, it takes much longer for a customer to decide on the purchase of a vacation package than to decide on buying an inexpensive t-shirt. Meanwhile, decision-making in a B2B sector can take months.
Analytics tools like Google Analytics help you decide on attribution windows. Google Analytics has a default 30-day lookback window for acquisition key events and a default 90-day window for all other key events. Acquisition key events can switch to 7 days, and other key events can use 30 or 60 days.
Attribution window sensitivity analysis
Before committing to a specific attribution window, test how much credit allocation changes. Vary the window to see the differences. Your attribution model is highly sensitive to this parameter choice. You need a data-driven way to pick the right value. Guessing is not sufficient.
Run this analysis: Calculate channel credit under three different windows (30, 60, 90 days). Use the same attribution model type. Then measure percentage point swings for each channel.
Note: Advanced attribution modeling solutions can acknowledge multiple users within one business account. They follow them as a single unit. This is crucial for tracking B2B buying cycles. The customer is a company, not a single role within it. Improvado marketing attribution solution uses an identity graph data structure. It maps interactions from different stakeholders within a target organization. This allows marketers to better understand the collective decision-making process. It also more accurately attributes credit to marketing efforts. These efforts influence the buying journey of the entire organization. Tailor your marketing strategy to the unique dynamics of B2B sales cycles with Improvado.
The Best Marketing Attribution Model
With numerous marketing attribution models available, one of the concerns among marketing teams is how to find a model that best represents the nature of customer interactions with your business.
A data-driven attribution model, such as the Shapley value model or Markov chain model, is most commonly used by companies with a solid backlog of conversion data. Thus, newer businesses can’t really benefit from it. If you can’t build a custom attribution model, then you can work with any rule-based marketing attribution model.
There are several types of rule-based attribution model:
- First-touch attribution
- Last-touch attribution
- Last non-direct attribution
- Time decay attribution
- Position-based attribution
- Linear attribution
Select a Data-Driven Attribution Model as a Foundation
There are two data-driven models for attribution: Shapley value model and Markov chain model. The inputs needed for both models are the touchpoints and conversions, which, as stated above, are part of the data that you will import into your database.
| Aspect | Shapley value model | Markov chain model |
|---|---|---|
| Inputs needed | Touchpoints and conversions | Touchpoints and conversions |
| Measures | Average marginal contribution across all possible channel combinations | Removal effect |
| Credit to | Tries to assign conversion credit to different parties that contributed to a total value | Marketing channels |
Using the Shapley Value Attribution Model
The Shapley value model, named after the Nobel Prize-winning economist Lloyd Shapley, is a game theory model for cooperative problems. It tries to assign conversion credit to different parties that contributed to a total value. This is also the question we’re trying to answer with a marketing attribution model, namely how much credit each marketing channel should get for making a user convert.
Google Analytics also offers its own data-driven attribution model, which uses machine learning algorithms to evaluate both converting and non-converting paths. By creating a custom attribution model, you will have greater control over your data.
In order to calculate the contribution of a channel under the Shapley value model, we compare all the different permutations of paths and touchpoints that occurred. For example, we take two paths that differ by a single touchpoint and assign the difference in total value to that extra touchpoint. Then we compute all the permutations and assign conversion credit to each channel accordingly. Thus, the model calculates the probability of conversion when a specific channel is present in the conversion path.
Using the Markov Chain Attribution Model
The Markov chain model, named after the mathematician Andrey Markov, describes the sequence of various events and tries to make predictions based on them. Once again, we try to assign the probability of a user converting when exposed to multiple marketing channels.

The Markov chain model assigns credit to marketing channels by calculating the removal effect. The removal effect depicts what happens when we remove a marketing channel from a path and see how many conversions occur without that channel.
By calculating all the different permutations of paths and the removal effects for every touchpoint, we end up with a probability of converting for each marketing channel.
Shapley Value and Markov Chain vs. Rule-Based Attribution Models
In both the Shapley and the Markov models, the output is a matrix of all marketing channels and a probability or credit for all conversions.
| Channel | Last-click conversions | Data-driven model conversions |
|---|---|---|
| Paid search | 5 | 3.7 |
| Social media | 3 | 4.4 |
| Newsletter | 2 | 1.9 |
| Total | 10 | 10 |
The above table is an example of the output of a custom attribution model compared to a last-click model. The total number of conversions is the same for both models, but what changes is the allocation between the channels. The custom attribution models can have fractional conversions, since credit for a conversion is given to multiple channels.
You can also calculate the revenue and return on investment (ROI) for each of the channels since you have conversions, revenue and marketing cost in your database. This will help you allocate your marketing budget across channels.
- →Account-level B2B attribution that tracks 11-20 stakeholders across devices and maps them to closed deals
- →Multiple attribution models (Markov, Shapley, W-shaped, linear) with side-by-side comparison and audit trails
- →Full SQL access for custom analysis - export raw path data, verify calculations, build proprietary weighting rules
When Attribution Models Fail: Common Failure Modes and Fixes
Failure Mode: Seasonality Distortion
- Black Friday, Cyber Monday, or holiday shopping periods show a spike in conversion volume. Channels that drove this spike get over-credited in annual models.
- Data-driven models weight all conversions equally.
- How to detect: plot monthly conversion volume and check for spikes.
- Train separate attribution models for high-season and normal-season periods. Apply the appropriate model when forecasting or optimizing budgets for each period.
Failure Mode: Attribution Window Too Short for Purchase Cycle
- A 30-day window only captures bottom-funnel conversions and systematically excludes top-of-funnel touchpoints.
- To detect it, query your CRM for average time from first touchpoint to closed-won deal.
- Extend attribution window for B2B. Run sensitivity analysis to find the window that captures the pre-conversion touchpoints.
Model Conflict Resolution: When Attribution Models Disagree
Different attribution approaches can produce conflicting channel credit. This happens because each method measures a different aspect of channel influence:
- Shapley value measures average marginal contribution across all possible channel combinations
- Markov chain measures removal effect, how many conversions disappear if you eliminate this channel from paths
- Lift tests measure true causal incrementality via randomized experiment
Randomized experiments measure causality. Attribution models measure correlation. When in doubt, use attribution models as directional signals. Don't treat them as absolute truth. Avoid false precision.
How to Incorporate Offline Activities into Your Marketing Attribution Model
For offline activities like TV ads and billboards, it's recommended to run matched market tests, where you take two similar geographic areas and use them as a test and control group to measure the impact of particular marketing efforts.

An alternative is to employ before-after tests, where you compare two periods of time with different marketing activities.
Something you must consider when running all sorts of tests is duration and seasonality. A rule of thumb is that tests should last for at least one week (ideally four weeks or more) since conversions fluctuate for different days. You should avoid running tests on periods when you experience significant increases or decreases (e.g., Christmas, Black Friday).
Setting up a Custom Attribution Model
When a company decides to build a custom attribution model, it ultimately has three options:
- Build an attribution model in-house. A reliable attribution modeling solution covers the tracking, modeling, and analysis of data across all customer touchpoints and marketing channels. A project of this complexity takes months of work, enormous development and analytics resources, and continuous investment in tool maintenance and development.
- Rely on tool-based analytics or a combination of attribution solutions. It takes a lot of jiggling and tweaking of data silos and the implementation of multiple tools to cover all of your data sources and custom attribution needs.
- Implement a comprehensive marketing attribution modeling tool. Such solutions provide a full view of all your marketing efforts by automatically aggregating data from all data sources.
If you're opting for a third-party attribution modeling solution, take into account aspects like scalability, integration capabilities, data accuracy, reliability, ease of use and implementation, and customization.
Frequently Asked Questions
What is a custom attribution model?
A custom marketing attribution model, unlike rule-based attribution models, is a tailored approach to measuring the effectiveness and impact of your marketing channels, taking into account the unique goals, scale, and complexity of your enterprise. This data-driven model goes beyond the limitations of rule-based models like first-touch, last-touch, or linear attribution by accurately attributing conversion credit to each customer touchpoint. By doing so, custom attribution models let decision-makers allocate budgets precisely, optimize campaigns, and identify the most valuable customer touchpoints.
How to build a custom attribution model?
Building a custom marketing attribution model for a large enterprise involves several key steps. First, centralize all your marketing data, including multiple touchpoints, conversions, and customer journey information, by using advanced ETL solutions. Next, determine the specific attribution model framework that aligns with your business goals, taking into account factors such as sales cycles, customer behavior patterns, and industry norms. Use advanced analytics tools and techniques to process and analyze the data, developing custom credit rules that accurately reflect the contribution of each touchpoint in the conversion process. Finally, continually refine and adjust the custom attribution model based on new data insights and changing business objectives.
Which attribution model is most accurate?
No single attribution model is universally perfect for every business. However, the most accurate marketing attribution model for your company would likely be a custom data-driven attribution model. Custom models adapt to your company's specific context, take into account the unique behavior patterns of your customers and the specific dynamics of your marketing channels, and can be fine-tuned to reflect your unique marketing strategies and goals. The accuracy of a data-driven model relies on the quality and quantity of your data. Therefore, it's important to invest in data collection and management practices to maximize the accuracy and effectiveness of your custom marketing attribution model.