Designing an Analytics Stack That Can Support Attribution

Tomer Sharoni 10 min read
Four-layer analytics architecture diagram with data flow paths

Most consumer app analytics stacks do not fail at collection. They fail at the join between spend and post-install behavior. Teams can produce installs per campaign without effort. Day-30 revenue per campaign takes an event pipeline that was never built to carry campaign context from the install through to the purchase.

A stack that supports attribution is not more elaborate than a normal one. It has the same four layers: MMP, event warehouse, attribution layer, BI. What changes is the data contract between them, specifically which identifiers travel from one layer to the next.

The MMP and what it must export

The Mobile Measurement Partner, whether AppsFlyer, Adjust, Branch, or another, connects clicks and installs to campaign attribution. What it exports decides what is possible downstream.

The essentials are raw install events with campaign ID, ad set ID, creative ID, and click timestamp; a click ID for each install as the MMP's unique key for that match; and ideally the raw click log showing what was last clicked before the install. The click ID is the join key between the MMP's attribution record and your warehouse user record. Without it, no downstream system can look up attribution for a user.

Many teams export a summary instead: installs per campaign per day. That is fine for channel reporting and useless for user-level revenue attribution. The downstream layers need event-level rows, one per install, with the click ID and campaign fields attached.

Keep the raw click log too, not just the attributed install. When an install is credited to a view-through or an organic match, the log is what lets you reconstruct why the MMP made that call. Without it, attribution debugging turns into guesswork and a vendor ticket.

The warehouse and the field contract

The event warehouse, whether BigQuery, Snowflake, Redshift, or similar, stores behavioral events: installs, registrations, purchases, subscription activations, engagement. Attribution data from the MMP has to join to user records here so that later events for a user carry their originating campaign.

The join happens at the user record. At registration, or at first install for apps without mandatory registration, the warehouse records the MMP click ID beside the user ID. Every later event inherits campaign context from that record through a join on user ID.

The usual failure is a schema designed for product analytics, full of sessions and feature usage, with no campaign field on the user table. Adding it later means a data migration and a change to the registration pipeline, both harder than getting it right at design time.

One design rule prevents most of this: put attribution fields on the user dimension, not inside individual event payloads. One row per user holding click ID, campaign ID, ad set, creative, and install timestamp gives every downstream event a single source of truth instead of copies that drift apart.

The four layers and their outputs

Layer Function Key output for attribution Common tools
MMP Install attribution to ad campaigns Click ID + campaign ID per install event AppsFlyer, Adjust, Branch
Event warehouse Store all behavioral + revenue events User records with persisted campaign context BigQuery, Snowflake, Redshift
Attribution layer Deduplication + revenue tying Deduplicated conversion counts per campaign Addressable, custom SQL, other
BI reporting Dashboard and ad-hoc analysis ROAS, CAC payback, cohort revenue retention Looker, Mode, Metabase, Tableau

The attribution layer

The attribution layer sits between warehouse and BI and does the two things the warehouse does not: deduplication and revenue tying.

Deduplication removes duplicate claims when one user is attributed to several campaigns. Without it, a user present in both the Meta and Google reports becomes two conversions in your warehouse. The layer applies a rule, usually one conversion per user per event type credited to the highest-quality touchpoint, before anything reaches BI.

Revenue tying joins those deduplicated conversions to downstream revenue events. The output is a campaign-level dataset where each conversion carries campaign ID, event type, and the revenue events for that user within a chosen window, whether 30 days, 90 days, or lifetime.

Write the deduplication policy down. Who wins when Meta and Google both claim the same user: last touch, first touch, or a quality score? That rule shapes every channel comparison you publish, and an undocumented rule is hard to defend when a channel lead objects.

BI reporting

BI reads from the attribution layer and computes what growth teams report: ROAS by channel, CAC payback, Day-30 and Day-90 revenue retention by campaign cohort, and channel contribution to revenue. It should never query raw MMP data or raw installs, because neither has been deduplicated or tied to revenue.

A familiar failure is building dashboards directly on MMP exports. It is quick to set up and reproduces the inflated channel numbers that last-click attribution creates. If BI sits one query away from raw MMP data, the attribution layer is missing.

A quieter BI failure involves dates. Dashboards built on the attribution layer but with a date range in a different time zone from the warehouse drift by a day, and nobody can explain the totals. Pin the reporting zone in the semantic layer once, not in each chart.

Start minimal, keep the contract

No specific tool combination is required. The table lists valid options, not the only ones. The principle is the contract: MMP exports click IDs with installs, the warehouse persists campaign context on user records, the attribution layer deduplicates and ties revenue, and BI reads only from that layer. A small team can implement most of it in BigQuery SQL without buying each layer separately. The flow matters more than the vendor list.

Teams running fewer layers often hit a wall on questions like "which campaigns drove users with Day-90 ROAS above 1.5x," because revenue and campaign data sit in separate systems with no join. Building the path early, while volumes are small, costs far less than retrofitting it later.

Build the contract while schemas are still changeable. Retrofitting it means a migration across every event table, and migrations are exactly when attribution history gets silently rewritten.

Back to Blog

Add the layer your stack is missing

Keep your MMP and warehouse, and put deduplication and revenue tying between them so BI reports what actually happened.