Enhance marketing intelligence with AI-integrated data
TALK TO US
AI-fueled marketing dashboards
All
Take full control of all your marketing data

How to Build a Custom Marketing Attribution Model [Guide]

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.

Let's think of a conversion process in which 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.

As the example above shows, 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.

Continue reading to learn how to build a custom attribution model, which approach, Shapley or Markov, to use, and how to automate attribution modeling with a custom attribution solution.

Three Steps to Create a Custom Marketing Attribution Model

Why would someone need to build a custom marketing attribution model? It’s simple. 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, in turn, helps you to:

  • 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, leading to cost savings and improved results;
  •  Tailor your messaging and content, leading to more effective customer engagement and brand loyalty;
  • Monitor and adjust your marketing strategies over time, leading to continuous improvement and sustained growth.

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 with the brand, both converting and not, that occurred during the customer’s journey on your app, website, social media networks, and other platforms. 

Capturing 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 of the URL but pass on information that can be captured by analytics tools. 

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. Everything after ‘?’ is not part of the web address but 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, 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 for your campaigns, 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 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.

A great help in pulling large volumes of data from a CRM is the extract, transform, load (ETL) solution. ETL automatically pulls all your data, applies transformations, for example, unifies disparate naming conventions, and loads the data into a data warehouse, 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, as described in Step #3. 

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 that happened within that period.

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 worth thousands of dollars than to decide on buying an inexpensive t-shirt. Meanwhile, decision-making in a B2B sector can take months and may involve 11 to 20 stakeholders

Analytics tools like Google Analytics help you decide on attribution windows. Google Analytics has a default 30-day conversion window, or as the company calls it a “lookback window”, for acquisition conversion events and a default 90-day window for other events. A user is free to set custom windows for as little as seven days.

What Is the Best Marketing Attribution Model? 

With numerous marketing attribution models available, one of the most widely shared 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 described later, 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 to find the best angle to look at the data. 

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 widely accepted 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.

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. In other words, 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 along the conversion process.

The Shapley value model is also the one used by Google for their own data-driven attribution model in Google Analytics 360. However, by creating a custom attribution model, you will have greater control over your data and will avoid the biases that Google Analytics might have, such as giving more credit to Google Search.

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 since it is the only difference between the two. 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 that occur thanks to each of those channels.

The above table is an example of the output of a custom attribution model compared to a last-click model. Note that the total number of conversions is the same for both models, but what changes is the allocation between the channels. Moreover, 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 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.

How to Run a “Lift Test”

In the models and data mentioned above, we talked about capturing touchpoints via UTM tags. UTM tags occur through clicks, which means that there are channels (mainly social media) that will be underrepresented due to the lack of impressions as a parameter.

This also has a similar impact on display advertising, where visitors mostly convert after viewing your display ads multiple times across different content networks.

In order to incorporate impressions into your model, you should consider running lift tests for channels like Facebook and Instagram as they rely on impressions more than other channels. 

A lift test is a randomized control test where you randomize an audience into a test and control group and only show ads to the test group. The difference in conversions between the two groups is known as lift or incrementality and represents the real impact of a channel’s ads on the audience. Since this is based on the concept of randomized control trials, it also incorporates the concept of causality, meaning that we know that it was the ads that caused the extra conversions.

A good practice is to regularly run lift tests (for example, once a quarter) so that you can see the effect of Facebook, Instagram and other impression-heavy channels on the conversion journey and calibrate your attribution model accordingly.

With and Without Lift Tests

Both attribution models and lift tests are useful and should work in conjunction to give the best possible results. Here are some of the advantages and limitations of both tools. 

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 there might be fluctuations of conversions for different days (e.g., a lot more conversions on weekends compared to weekdays). 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 holistic view of all your marketing efforts by automatically aggregating data from all data sources, transforming it, and associating your leads and purchases with the right 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 to ensure it aligns with your needs and requirements. 

Improvado's marketing attribution solution provides the infrastructure and support that large enterprises need to build and automate attribution modeling. It supports over 500 data sources, including Google Analytics, Mixpanel, Adobe Analytics, Facebook Ads, TikTok for Business, and more, enabling multi-touch attribution models across various marketing channels. Improvado also supports B2B features and can attribute the events of multiple stakeholders to one account. This gives you full visibility of the complex B2B customer journey and helps track associated costs. 

Frequently Asked Questions 

No items found.
Take full control of all your marketing data

500+ data sources under one roof to drive business growth. 👇

​​Unlock 15% YoY Revenue Growth & 30% Higher ROI

Boost your Enterprise with an Improvado-powered attribution model

CONTACT US
Get up to 368% ROI
FREE GUIDE

Unshackling Marketing Insights With Advanced UTM Practices

GET A FREE GUIDE
FREE EBOOK

Harness the AI Power of ChatGPT to Elevate Your Marketing Efforts

Get a free guide

Improvado Labs: experience the latest marketing analytics technology

Be the first one to know about our latest product updates and ways they could shift workflows, performance, and effectiveness in your organization.
Track budget pacing. Our weekly ad spend is $2K per campaign. Show all campaigns that overspent or underspent this week.
Getting data from
Here's a list of campaigns not meeting your budget guidelines:
Take advantage of AI suggestions
Show total ad spend for Google Ads, Bing and LinkedIn for the last 6 months.
Our target CPL is $1,500. Show Google Ads campaigns exceeding target CPL.
Show conversions by campaign name by countries for the last 90 day
More suggestions
What would you like to ask?
No items found.
Calculate how much time your marketing team can allocate from reporting to action 👉
Your data is on the way and we’ll be processed soon by our system. Please check your email in a few minutes.
Oops! Something went wrong while submitting the form.