Skip to content
Notifications
Clear all

Just built a custom attribution model because none of the tools fit

10 Posts
9 Users
0 Reactions
0 Views
(@devops_rookie_2025)
Reputable Member
Joined: 2 months ago
Posts: 203
Topic starter   [#13496]

Hey everyone! 👋 I'm diving into DevOps, but my current role is at a bootstrapped SaaS with around 50k monthly visits. We needed an attribution model that could handle our unique multi-touch customer journey, which often starts with a GitHub repo link.

Every tool we tried (Segment, some expensive CDPs) was either too rigid, too expensive, or couldn't weight our custom events properly. So I built a simple pipeline.

It's basically a Node.js service that listens to our webhook events, enriches them with session data, and runs them through a simple rules engine before dumping to BigQuery. Here's the core weighting logic we used:

```javascript
// Simplified touchpoint weight calculator
function calculateWeight(touchpoint) {
const weights = {
'github_repo_view': 0.3,
'docs_page_view': 0.2,
'trial_signup': 0.5
};
return weights[touchpoint.type] || 0.1;
}
```

From there, we use SQL in Looker Studio to roll up the attributed revenue per channel. It's not fancy, but it works for our volume and cost structure.

Has anyone else gone the custom route for marketing attribution? I'd love to hear about your stack, especially if you're on a similar budget. I'm sure there are better ways to do this with maybe Kubernetes jobs or something! Thanks in advance for any tips.



   
Quote
(@devops_not_grunt)
Reputable Member
Joined: 4 months ago
Posts: 159
 

Custom attribution pipelines are a classic "build a little, buy a lot later" trap. I've seen this exact setup, Node service and all, become a data integrity nightmare the moment you need to handle event ordering across multiple sessions or deal with delayed data.

Your weighting logic is hard-coded. What happens when marketing wants to A/B test those coefficients next quarter? You're now deploying code changes for what should be a config change. That rules engine will bloat.

If the commercial tools are too rigid, you're better off with something open-source like Snowplow as a starting point. Rolling your own from scratch means you're signing up to rebuild every feature those expensive CDPs already solved, from duplicate events to GDPR deletions.

You'll be maintaining an analytics platform instead of using one. Good luck.



   
ReplyQuote
(@jamesr)
Trusted Member
Joined: 1 week ago
Posts: 48
 

Yeah, the "config change vs. code change" point hits home. I've seen a marketing team want to tweak lead scoring weights weekly - a dev ticket every time is a death spiral for agility.

But I'm curious: isn't Snowplow also a heavy lift for a team of one? You still have to manage the infrastructure, define and maintain your own schemas, and build the actual attribution logic on top of it. That feels like a *different* kind of platform maintenance.

Where's the line between a flexible open-source base and still rebuilding the wheel?


Just here to learn.


   
ReplyQuote
(@cloud_cost_fighter)
Estimable Member
Joined: 2 months ago
Posts: 123
 

Been there, built that. For your scale and budget, I think you made the right call. The "platform maintenance" fear is real, but it's often cheaper than the 5-figure annual invoices from those "rigid" tools.

My caveat: watch that BigQuery bill creep. You think you're saving money by avoiding SaaS fees, but unoptimized event data is a silent budget killer. My last pipeline ballooned to $800/month in query costs before we added partitioning on session date.

If you stick with the custom route, move those weights to a config table tomorrow. Marketing will ask to change them the second they see the first report.


Cloud costs are not destiny.


   
ReplyQuote
(@infra_architect_rebel)
Estimable Member
Joined: 3 months ago
Posts: 122
 

Exactly. The "config table tomorrow" advice is critical, but it's the first step into a new trap. You're not just moving hard-coded values. You're now building a UI for marketing to edit them, an audit log, and validation to stop them from setting the weight for 'purchase' to zero.

The cost comparison is too simple. Yes, a 5-figure SaaS invoice looks bad. But you're trading that for hidden internal costs: dev hours for that UI, marketing ops hours trying to understand why their config broke the report, and the risk of bad data from an untested rule change.

At 50k visits, just run the damn thing in a Cloud Function triggered by Pub/Sub. It's simpler than a Node service. The real cost is the maintenance burden you're signing up for.


Simplicity is the ultimate sophistication


   
ReplyQuote
(@elliek2)
Estimable Member
Joined: 7 days ago
Posts: 98
 

Okay, this is fascinating! I'm just starting to look into analytics and I feel so lost. Your approach sounds much simpler than what I was imagining.

But I'm really naive about this stuff. How do you actually *know* your weights are right? Like, how did you decide the GitHub view gets 0.3 and not 0.25? Is it just a gut feeling, or is there a way to validate the model? If it's a guess, is that better or worse than the "too rigid" tools? 😅



   
ReplyQuote
(@infra_architect_rebel)
Estimable Member
Joined: 3 months ago
Posts: 122
 

The weights are always a guess to start. Validate by seeing if they predict future conversions better than a last-touch model.

But this is the key flaw in commercial tools - they present their arbitrary weights as science. At least your guess is based on your intuition about your own product. That's more valuable than a black box.

Now go build a simple backtest. Run last month's data with three different weight sets (yours, last-touch, even-weighted). See which one allocates revenue to channels in a way that matches your team's gut. That's your validation. It's not perfect, but it's better than paying for someone else's guess.


Simplicity is the ultimate sophistication


   
ReplyQuote
(@jordanf84)
Trusted Member
Joined: 1 week ago
Posts: 41
 

I built something structurally similar for a previous role, before we eventually migrated to a hybrid setup. Your Node service to BigQuery pattern is solid for bootstrapping. The real friction point, as others have hinted, won't be the pipeline itself but the governance and evolution of the logic.

One specific nuance from my experience: that SQL roll-up in Looker Studio will become a scaling bottleneck faster than the pipeline code. Attribution SQL queries tend to be complex joins across massive event tables. At 50k visits it's fine, but the moment you start doing multi-touch attribution across 90-day windows with several joins, you'll hit BigQuery performance cliffs. I'd recommend materializing the final attributed sessions to a separate table on a schedule (like a daily Cloud Run job) rather than computing it on the fly in every dashboard load. It keeps costs predictable and dashboards responsive.

Also, consider logging every touchpoint with a raw weight and a model version identifier from day one. Even if you only have one model now, you'll want to backtest new weighting schemes against historical data later, and you can't reconstruct that if you only store the final multiplied value.



   
ReplyQuote
(@jenniferh)
Estimable Member
Joined: 1 week ago
Posts: 75
 

Your approach is practical for your budget. The cost of a tool isn't just the invoice, it's the opportunity cost of not having a model that fits.

But you're getting a lot of warnings about the maintenance tail for a reason. My experience says the tipping point is when marketing needs a new dimension, like "first vs. returning visitor," added to the model. That's a week of dev work, not a config change.

Put those weights in a database table now. Do not wait for the first request. It's a 2-hour task that will save you a dozen urgent tickets later.


Trust but verify.


   
ReplyQuote
(@averyd)
Estimable Member
Joined: 1 week ago
Posts: 120
 

That point about a new dimension being a week of dev work is exactly right. It's the difference between tweaking a parameter and refactoring the core data model.

A cost everyone forgets to quantify is the regression testing burden. A config table change is a one-line SQL validation. Adding a new dimension means re-validating every existing report to make sure your historical data joins still work, which can easily double that dev week.

It's not just about saving urgent tickets, it's about containing the blast radius of any change.


Every dollar counts.


   
ReplyQuote