Skip to content
tezvyn:

Describe the architecture for multi-touch attribution with time-decay

Source: gitnexa.comHardHow cards are made

Describe the architecture for multi-touch attribution with time-decay
Summary

Architecture for identity resolution and multitouch attribution.

Key points

Stitch IDs, stream events to warehouse, sessionize journeys, then apply decay weights in SQL.

What's really being asked

This question tests whether you can design a distributed data pipeline that solves the identity resolution problem and supports incremental attribution modeling. Interviewers want to see that you understand event tracking at scale, the difference between anonymous and authenticated user states, and how to transform raw clickstream data into business-level metrics without collapsing everything into a single last-touch report.

The full answer

First, identity stitching across channels. You need a unified identity graph that links anonymous device IDs, email hashes, and logged-in user IDs through deterministic matching and probabilistic fuzzy matching. Second, event collection and ingestion. Use a first-party event stream like Segment, Rudderstack, or a custom Kafka pipeline that captures every touchpoint with a canonical timestamp, channel source, campaign ID, and cost data. Third, data modeling in the warehouse. Load raw events into Snowflake or BigQuery, then use window functions to sessionize journeys and build a user-level funnel table. Fourth, the attribution model itself. For time-decay, apply a half-life function in SQL or a Python model so that touchpoints closer to conversion receive exponentially more credit; a common default is a seven-day half-life. Fifth, serving and validation. Expose the model through dbt marts or BI tools and validate it against holdout experiments to ensure the incremental credit assigned to each channel aligns with lift tests.

The mistakes people make

A red flag is suggesting that GA4 or Adobe Analytics alone can solve multi-touch attribution at the user level, because these tools sample data and rely on device graphs you do not control. Another red flag is proposing nightly CSV dumps from ad platforms into Excel; this breaks identity resolution, lacks sessionization, and cannot scale past a few million rows. A third red flag is ignoring the distinction between correlation and causation by building a decay model but never running incrementality experiments to validate it.

What usually comes next

The interviewer may ask how you handle the deprecation of third-party cookies and mobile device IDs. They may also ask how to attribute offline touchpoints like TV or direct mail, which requires probabilistic matching or geo-lift experiments. Another common follow-up is how to update the model in near real time rather than batch, which pushes you toward streaming warehouses like Materialize or Flink. They might also ask how you would allocate a fixed marketing budget given fractional attribution output, which tests your ability to connect data science to financial optimization.

A concrete example

Imagine a user sees a Facebook ad on day one, clicks a Google branded search ad on day three, and converts after a promotional email on day seven. In a last-touch model, email receives one hundred percent of the credit. In a time-decay model with a seven-day half-life, the email might receive roughly fifty percent of the credit, the Google click roughly twenty-five percent, and the Facebook impression roughly twelve percent, with the remainder distributed to any minor touchpoints. The SQL implementation would join the conversion event to all prior touchpoints in a thirty-day lookback window, compute the age of each touchpoint in days, and apply the decay formula credit equals two raised to the power of negative age divided by half life.

Interview question

When building a time-decay attribution pipeline in a cloud warehouse, which practice distinguishes a model that measures true incremental impact from one that only captures correlation?

  • a.Applying the half-life decay function directly to raw event streams before identity stitching
  • b.Sessionizing clickstream data with SQL window functions immediately upon ingestion
  • c.Comparing the model's fractional credit allocations against holdout experiments that test channel liftCorrect
  • d.Using deterministic and probabilistic matching to unify anonymous and authenticated user IDs
Why?

Holdout experiments validate that attributed credit reflects causal incrementality rather than mere correlation. Identity stitching is essential for resolving users across touchpoints, yet it does not prove that a specific channel caused the conversion.

Just read this? Test yourself on what you have been reading.

Read the original → gitnexa.com

You just looked this up. Could you explain it out loud?

That is the part interviews actually test. Tezvyn takes questions like this one and gives you what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.

The iPhone app is on the way

We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.

Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.

Get it on Google PlayiPhone app coming soon

We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.

See open roles