DEV Community

Cover image for Building Multi-Touch Attribution Models in GA4 Without Burning Your Budget on Third-Party Tools
Drew Madore
Drew Madore

Posted on

Building Multi-Touch Attribution Models in GA4 Without Burning Your Budget on Third-Party Tools

Let me guess: someone in leadership just asked which marketing channels are "really" driving conversions, and you're staring at GA4's attribution reports wondering if they're asking a question the platform can actually answer.

Here's the thing—GA4's default attribution models are fine for basic reporting. But when you need to understand the messy reality of how customers actually find you (spoiler: it's never just one touchpoint), those defaults start feeling pretty inadequate.

The good news? You can build surprisingly sophisticated multi-touch attribution models directly in GA4 without dropping thousands on third-party attribution platforms. The bad news? It requires some actual work and a willingness to get your hands dirty with custom dimensions, Explorations, and BigQuery exports.

I've spent the last year building these models for clients who needed attribution insights but didn't have enterprise budgets. What follows is what actually works—not the theoretical framework that looks great in a presentation deck but falls apart when you try to implement it on a Tuesday afternoon.

Why GA4's Default Attribution Falls Short (And Where It Doesn't)

GA4 gives you seven attribution models out of the box: Data-driven, Last click, First click, Linear, Position-based, Time decay, and Ads-preferred. For many businesses, particularly those with straightforward customer journeys, these work fine.

But here's where they break down:

You can't customize the lookback window beyond Google's preset options. You can't weight specific channels based on your business logic. You can't exclude certain touchpoints that you know are noise (looking at you, direct traffic from employees checking if the site is down). And you definitely can't build models that account for offline touchpoints or integrate data from your CRM.

The data-driven attribution model sounds promising—Google's machine learning analyzing your conversion paths and assigning credit intelligently. In practice, it needs substantial conversion volume to work properly. If you're getting fewer than 400 conversions per month with at least 10,000 total ad interactions, Google won't even generate a data-driven model for you.

So what do you do when the defaults aren't cutting it but you can't justify a $50K annual contract with an attribution platform? You build custom models using GA4's existing infrastructure.

The Foundation: Getting Your Tracking Right First

Before you build anything fancy, your data collection needs to be solid. I've seen too many teams try to build sophisticated attribution models on top of messy tracking. It's like building a house on a foundation of good intentions and hope.

Start with these fundamentals:

Enhanced measurement needs to be configured properly. Yes, GA4 auto-tracks some events, but "some" is doing a lot of work in that sentence. Review what's actually being captured versus what you need for attribution.

UTM parameters must be consistent. Create a naming convention and actually enforce it. When your paid team uses "utm_source=facebook" and your email team uses "utm_source=Facebook_Email" and someone in sales uses "utm_source=fb," your attribution models will be garbage regardless of how sophisticated your methodology is.

Custom channel groupings should reflect your reality. GA4's default channel groupings are fine for some businesses and completely wrong for others. If you're B2B with a heavy partner referral component, "Referral" as a catch-all channel isn't useful. Break it out.

I typically recommend creating a custom dimension for "campaign_type" or "touchpoint_category" that lets you classify interactions in ways that matter to your business. This becomes crucial when you're building custom attribution logic later.

Building a Position-Based Model with Custom Weighting

The simplest custom model to start with is a modified position-based approach. GA4's built-in position-based model gives 40% credit to first and last touch, splitting the remaining 20% among middle touches. That's fine. But what if your business reality suggests different weights?

Here's how to build this in GA4 Explorations:

Create a new Exploration using the "Path exploration" technique. Set your starting point as any user engagement and your ending point as your key conversion event. This shows you the actual paths users take.

Now export this data. Yes, we're leaving the GA4 interface—the native tools will only get you so far. Pull the path data into Google Sheets or Excel.

For each conversion path, you'll assign weights based on your custom logic. Maybe you want to give 50% credit to last touch because you know bottom-funnel intent drives most conversions in your space. Maybe first touch gets 30% because brand awareness is critical. The middle touches split the remaining 20%.

The formula in Sheets looks something like this:

=IF(COUNTIF(path_column, touchpoint)=1, 1, IF(touchpoint=FIRST_TOUCH, 0.5, IF(touchpoint=LAST_TOUCH, 0.3, 0.2/COUNT(MIDDLE_TOUCHES)))) 
Enter fullscreen mode Exit fullscreen mode

Is this elegant? Not particularly. Does it work? Absolutely.

You can then aggregate this weighted data to see which channels are actually driving value across the full journey, not just getting credit for being last-click.

Using Custom Dimensions for Touchpoint Sequencing

This is where things get more interesting. By creating custom dimensions that capture touchpoint sequences, you can analyze patterns that GA4's standard reports completely miss.

Set up a custom dimension called "user_journey_sequence" that concatenates the channels a user interacted with before converting. When someone comes from Organic Search, then Paid Social, then Direct, you capture that as "organic_social_direct."

You'll need to use Google Tag Manager for this. Create a variable that reads the user's channel history from a cookie or data layer, then appends each new channel as they interact. Push this to GA4 as a custom dimension on your conversion event.

Now you can create audiences based on journey patterns. "Users who touched paid before organic" becomes a segment you can analyze separately from "users who touched organic before paid." The attribution implications are significant—these are fundamentally different user behaviors that probably deserve different credit allocation.

I've found this approach particularly valuable for understanding assist behavior. Which channels are good at introducing people to your brand versus closing the deal? The sequence data tells you.

The BigQuery Export Method (When You Need Real Power)

Look, if you're serious about custom attribution and you have any meaningful traffic volume, you need to be exporting GA4 data to BigQuery. The free tier is generous—you get 10GB of storage and 1TB of query processing per month at no cost.

Once your data is in BigQuery, you can build attribution models that are actually sophisticated:

Time-decay models with custom decay rates. Want touchpoints to lose 15% of their value per day instead of GA4's preset decay? Write a query that does exactly that.

Algorithmic attribution using your own logic. You can build models that weight channels based on conversion rate, average order value, or any other business metric you care about.

Cross-device journey analysis. By querying user_id across sessions, you can see the full picture of how someone interacted with you across devices before converting.

Here's a simplified example of a time-decay query in BigQuery:

WITH user_journeys AS ( SELECT user_pseudo_id, event_timestamp, traffic_source.source, traffic_source.medium, event_name FROM `project.dataset.events_*` WHERE event_name IN ('page_view', 'purchase') ), conversion_paths AS ( SELECT user_pseudo_id, source, medium, TIMESTAMP_DIFF( MAX(CASE WHEN event_name = 'purchase' THEN event_timestamp END), event_timestamp, DAY ) AS days_before_conversion FROM user_journeys GROUP BY user_pseudo_id, source, medium, event_timestamp ) SELECT source, medium, SUM(POW(0.85, days_before_conversion)) AS weighted_conversions FROM conversion_paths WHERE days_before_conversion IS NOT NULL GROUP BY source, medium ORDER BY weighted_conversions DESC 
Enter fullscreen mode Exit fullscreen mode

This applies an 85% daily decay rate (meaning each day back loses 15% value) and aggregates by source/medium. You can modify the decay rate, the lookback window, and the attribution logic to match your business needs.

Is this more complex than clicking a button in the GA4 interface? Yes. Does it give you attribution insights that actually reflect your customer journey? Also yes.

Handling the Offline Attribution Problem

Here's where most attribution models completely fall apart: offline conversions. Someone sees your ad, visits your website, calls your sales team, and converts three weeks later. How do you attribute that?

GA4's Measurement Protocol API lets you send offline conversion data back to GA4, but you need a way to connect the online session to the offline conversion. This typically means:

Capturing a client_id or user_id during the online interaction. When someone fills out a form or calls from your website, grab their GA4 identifier and store it in your CRM.

Sending the conversion event back to GA4 via Measurement Protocol. When they convert offline, you fire an event to GA4 that includes their original client_id and the conversion details.

Attributing credit to the original touchpoint sequence. Because you've maintained the connection between the user's online journey and offline conversion, GA4 can now include that conversion in your attribution models.

The implementation requires some development work—you're essentially building a bridge between your CRM and GA4. But for businesses with significant offline conversion components (B2B, high-ticket items, anything with a sales team), this is the difference between attribution that's directionally useful and attribution that's actually accurate.

I won't pretend this is simple. You're dealing with API authentication, data formatting, and the inevitable edge cases where the connection breaks. But the alternative is attributing all offline conversions to "direct" or just excluding them from your models entirely, which makes your attribution insights pretty useless.

Creating Custom Reports That Actually Get Used

You can build the most sophisticated attribution model in the world, but if nobody looks at it, you've just wasted your time. The final piece is creating reports that stakeholders will actually use.

In GA4, this means Explorations that are:

Focused on decisions, not data. Don't show every possible touchpoint combination. Show the insights that change budget allocation or strategy.

Filtered to relevant time periods. Most businesses have seasonal patterns. Your attribution model needs to account for this, not just show all-time data.

Compared to your previous attribution approach. When you switch from last-click to a custom multi-touch model, show the difference. "Paid Social went from 5% of attributed conversions to 18%" is a story people understand.

I typically create three reports:

  1. Executive summary showing channel performance under the new attribution model
  2. Detailed journey analysis showing common conversion paths and their performance
  3. Change analysis comparing the new model to last-click attribution

The third one is crucial. When you change attribution methodology, you're changing how success is measured. People need to understand what changed and why, or they won't trust the new numbers.

What This Approach Can't Do (And When You Actually Need Third-Party Tools)

Let's be honest about limitations. Building custom attribution in GA4 works well for many businesses, but it's not a replacement for enterprise attribution platforms in every scenario.

You probably need a third-party tool if:

You need real-time attribution updates. GA4 data has latency, and BigQuery exports run on a schedule. If you're optimizing campaigns multiple times per day based on attribution data, the lag will hurt you.

You have complex B2B journeys spanning months. While you can technically track long journeys in GA4, the platform isn't optimized for it. Attribution tools built for B2B handle this better.

You need to integrate data from multiple sources beyond GA4's capabilities. Sure, you can send data to GA4 via Measurement Protocol, but there are limits. If you're trying to unify data from a dozen different systems, a dedicated attribution platform might be worth the investment.

You don't have anyone technical on your team. The approaches I've outlined require comfort with Google Tag Manager, BigQuery SQL, and data analysis. If that's not available, the ROI on a third-party tool that does this for you might make sense.

The jury's still out on whether most businesses actually need that level of sophistication. I've seen companies spend six figures on attribution platforms and then only use the basic features that GA4 could have provided. But I've also seen businesses where custom attribution was the difference between profitable growth and throwing money at channels that weren't actually working.

Making This Actually Happen

Here's your practical starting point:

Week 1: Audit your current GA4 tracking. Fix the UTM parameter mess. Set up custom channel groupings that reflect your reality.

Week 2: Build your first custom attribution model in Explorations. Start simple—a modified position-based model that you calculate in Sheets.

Week 3: Set up BigQuery export and run your first attribution query. Even if you just replicate what GA4 already shows you, getting comfortable with the BigQuery interface is valuable.

Week 4: Create the three reports I mentioned above. Share them with stakeholders. Gather feedback on what's useful and what isn't.

Then iterate. Attribution modeling isn't a "set it and forget it" project. Your customer journeys evolve, new channels emerge, and your business priorities shift. The model needs to evolve with them.

The goal isn't perfection—it's having attribution insights that are meaningfully better than last-click while staying within your budget constraints. For most businesses, that's entirely achievable with GA4's native capabilities and a bit of custom work.

Just don't expect it to be as simple as clicking a button and having perfect attribution appear. That's not how any of this works, regardless of what the tool vendors promise in their demo calls.

Top comments (0)