GA4's built-in attribution is a starting point, not a destination. Since Google removed the first-click, linear, time-decay and position-based models in 2023, the interface offers data-driven attribution and last-click variants only. Neither is configured for a particular business's sales cycle, channel mix or definition of a conversion, and neither can be inspected step by step. When budget decisions rest on them, nobody can explain why a channel received the credit it did.
Custom attribution starts with owning event-level data. The GA4 BigQuery export is the usual foundation; a server-side collection layer such as Robin Signals adds control over event definitions and data quality. Ad-platform conversion figures belong in the model only as inputs: each platform reports on its own campaigns, so its self-attributed numbers are directional, not evidence.
Production attribution needs more than ad hoc SQL, and dbt provides the structure. Staging models clean the export and extract campaign fields. An intermediate touchpoint model holds one row per user, channel and timestamp, ordered with the LAG() and LEAD() window functions so each touchpoint knows its predecessor and successor. A conversions model holds outcomes and their values. The attribution logic itself, whether a time-decay rule, a Markov chain or Shapley values, lives in a separate model on top, so it can be changed without touching the journey data.
Owning the logic means making explicit the choices GA4 makes silently: the lookback window, which events count as touchpoints, how direct visits are treated, and whether offline and CRM conversions are joined in. Each choice should be a dbt variable or a documented column, and the models should carry tests, for example that the credit assigned to each conversion sums to one.
Statistical rigour comes from validation, not from model complexity. The outputs should be checked against evidence outside the model: holdout or geo experiments, A/B test results and business outcomes, not GA4's own numbers. An attribution model only redistributes observed credit; experiments show whether that credit reflects incremental effect. Survival analysis of time to conversion can also inform the lookback window. The model should be revisited whenever the channel mix or sales cycle changes.
The payoff is attribution that can be explained to finance: every channel weight traces back to version-controlled SQL, and every change to the logic is reviewable. That is the difference between a throwaway script and a maintained business asset.
Viktor Kvant
Senior Web Analyst specialising in data ownership, advanced tracking implementations, and translating data into strategic business value.
Connect on LinkedIn