Campaign budgets are detailed about media, creative and management fees. They are almost silent about the four layers that decide whether any of it can be measured or targeted properly. Then, three months in, someone asks why the ad platform reports 340 conversions, the CRM shows 210 and finance can find 160, and the next six weeks go into reconciling numbers instead of improving them.

That gap has a name in most other disciplines: infrastructure. In marketing it usually has no name and no line item, which is exactly why it does not get built.

The four layers, in build order

Every campaign sits on a stack. Skip a layer and the ones above it inherit the defect.

LayerQuestion it answersWhat breaks without it
1. Event trackingWhat happened?No reliable conversion signal; platform optimisation runs blind
2. IdentityWho did it?Behaviour cannot be joined to a person; suppression and personalisation fail
3. Warehouse and modellingWhat does it mean?Every tool reports a different number and none can be audited
4. ActivationWhat do we do about it?Insight stays in dashboards and never reaches a campaign

The order is not negotiable. Activation built on unresolved identity produces confidently wrong audiences. A warehouse built on undocumented events produces beautifully modelled nonsense.

Layer 1: event tracking

The foundational artefact is a tracking plan — a written specification of every event, when it fires, what properties it carries and who owns it. Not a tag manager container. A document, in version control, reviewed like code.

Without one, three things happen reliably. Event names drift as different people implement similar things (signup, sign_up, Signup Completed). Properties disappear silently in a front-end refactor and nobody notices for two months. And nobody can answer whether a metric changed because behaviour changed or because the implementation did.

What good looks like

  • Between 15 and 40 events for most mid-market businesses. If you have 300, you have a logging system, not a tracking plan.
  • Consistent naming — object then past-tense action, applied without exception.
  • Every event carries a stable user or anonymous identifier and a timestamp with timezone.
  • Server-side collection for anything that matters commercially. Client-side tracking loses a meaningful share of events to blockers, browser restrictions and network failures, and the loss is not random — it correlates with the audiences you often most want to measure.
  • An automated test that fails the build when a tracked event stops firing.

Typical cost: USD 8,000 to 25,000 to specify and implement properly, depending on how many surfaces you have. Most of that is engineering time, not tooling.

Layer 2: identity

This is where most stacks quietly fail. The same person is an anonymous visitor with a cookie, a lead in the CRM, a subscriber in the email tool and a user in the product database. Nothing joins them unless you build the join.

The identity spine

Choose one primary key and enforce it. For most mid-market B2B businesses, a normalised lower-cased email is pragmatic; for product-led businesses, a stable internal user identifier is better. Then maintain a mapping table linking anonymous identifiers to resolved identities, so pre-signup behaviour can be attached retrospectively once someone identifies themselves.

Two rules make this work in practice:

  • Measure your match rate and publish it. The share of sessions, leads and events you can attach to a known person. Teams that do not measure this always overestimate it. A match rate below about 60 percent means your behavioural targeting is running on a minority of the evidence.
  • Never resolve identity in more than one place. If the email tool, the ad platform and the CRM each do their own matching with their own logic, you have three identity graphs and three answers.

Typical cost: USD 12,000 to 45,000. This layer is where scope varies most, because it depends entirely on how many systems must agree.

Layer 3: warehouse and modelling

The warehouse is not a reporting tool. It is the place where a definition can be written once and reused. "Qualified opportunity" should exist as a modelled table, not as a filter that four people rebuild slightly differently in four dashboards.

What belongs here

  • Raw event data, retained unmodified, so you can rebuild history when a definition changes.
  • Cleaned and conformed dimensions — one accounts table, one contacts table, one sessions table.
  • A metrics layer holding the definitions everyone argues about: qualified lead, active customer, attributed revenue, churn.
  • Version control and tests on the transformations, because a silently changed definition is worse than a broken one.

The unglamorous benefit is auditability. When someone challenges a number, you can show them the lineage rather than defending a screenshot. That single property ends more disputes than any dashboard redesign.

Typical cost: USD 15,000 to 60,000 to stand up and model, plus roughly USD 300 to 2,000 a month in warehouse and pipeline costs at mid-market volumes.

Layer 4: activation

Insight that stays in a dashboard changes nothing. Activation is the layer that pushes modelled audiences back into the tools that act — ad platforms, email, CRM, in-product messaging.

Two credible architectures:

Warehouse + reverse ETLCustomer Data Platform
Source of truthYour warehouseThe CDP
Who builds audiencesAnalytics or data teamMarketing, self-serve
Typical annual cost$8,000–$30,000$25,000–$120,000
Best whenYou already have a warehouse and engineering capacityMarketing needs independence and there is no warehouse team
Main riskMarketing waits in an engineering queueA second source of truth that drifts from the warehouse

The decision rule we use: if a warehouse already exists and someone owns it, add reverse ETL. If not, and marketing genuinely cannot get engineering time, a CDP buys independence — but budget for the governance work to stop it becoming a parallel truth.

What the whole foundation costs

ScopeBuild (one-off)Run (annual)Suits
Minimum viable
Tracking plan, identity key, managed warehouse, basic models
$40,000–$70,000$11,000–$30,000Under ~$20M revenue, one main product
Standard
Server-side tracking, identity mapping table, modelled metrics layer, reverse ETL
$70,000–$120,000$25,000–$60,000$20M–$100M revenue, multiple channels
Full
All of the above plus CDP, consent management, real-time activation
$120,000–$180,000$60,000–$160,000Multi-product, multi-region, regulated

For context, the standard tier costs roughly what a mid-market business spends on paid media in two to three months. It is not a large number relative to the spend it makes measurable — it just arrives at an awkward time, before any campaign has produced anything to point at.

Six signs you skipped this layer

  1. Two teams present different numbers for the same metric in the same meeting, routinely.
  2. Nobody can produce a list of customers who did a specific thing last month without an export and a spreadsheet.
  3. Your suppression lists do not fully suppress.
  4. Attribution changes materially when someone edits a dashboard filter.
  5. The answer to "why did that number move?" takes more than a day.
  6. Your ad platforms are optimising toward form fills because that is the only conversion you can send them.

That last one is expensive and under-recognised. Modern ad platforms optimise against whatever signal you feed them. Feed them form fills and they will find you people who fill in forms. Feed them qualified opportunities or revenue and the same budget buys materially different traffic. Sending better signals is often the single highest-return output of the whole foundation.

The minimum viable foundation, in six weeks

If a full build is not fundable right now, this sequence delivers most of the value and does not need rebuilding later.

  1. Week 1 — Tracking plan. Specify 15 to 25 events covering your core conversion path only. Write it down. Get engineering to agree to it.
  2. Week 2 — Identity key. Choose it, normalise it, enforce it at every capture point. Measure the current match rate so you have a baseline.
  3. Week 3 — Server-side collection for the five events that carry commercial meaning.
  4. Week 4 — Managed warehouse plus off-the-shelf connectors for CRM, ads and email. Do not build custom pipelines yet.
  5. Week 5 — Three modelled tables: contacts, sessions, conversions. One agreed definition each, written down.
  6. Week 6 — One activation path. Push one modelled audience back to one ad platform and one email tool. Prove the loop closes.

That is roughly USD 40,000 to 60,000 of work, and it converts most of the arguments in your weekly meeting into questions with answers.

Who should own it

This is the question that decides whether the foundation survives. Marketing owns the definitions — what qualified means, what counts as active. Engineering owns the collection and the pipelines. Somebody must own the join, and in mid-market companies that role frequently does not exist.

Where it exists, it is usually called marketing operations or analytics engineering, and it is one of the highest-leverage roles you can fund. Where it does not exist, the layer degrades within two quarters no matter how well it was built — the same ownership failure described in why marketing automation projects fail at implementation.

If you would rather have this built than staffed, it is the work our business automation and enterprise software teams do most often. Related reading: a martech stack consolidation, before and after.