Chapter 6
Data Foundations, Integration and Quality
Post Graduate Program in Advertising and Media
Campaign ROI & Analytics
•
Post Graduate
Data Foundations, Integration and Quality
Introduction
Campaign ROI analysis is only as credible as the data on which it is based. A sophisticated attribution model cannot compensate for incorrectly tagged campaigns, duplicated customers, missing conversions, inconsistent revenue definitions, or disconnected media and sales records. Data foundations therefore constitute a strategic capability rather than a purely technical activity.
In advertising and media, relevant information is distributed across demand-side platforms, search and social networks, websites, mobile applications, customer relationship management (CRM) systems, e-commerce platforms, call centres, retail outlets, finance systems and market-research panels. Each source records behaviour at a different level of detail and according to different rules. The central challenge is to create a coherent analytical environment without erasing the distinctions that make each source useful.
This chapter explains the foundations of campaign data integration. It addresses data ownership, tagging, taxonomy, identity resolution, pipelines, quality measurement, missing and duplicate records, governance, privacy and practical implementation.
Learning Objectives
By the end of this chapter, students should be able to:
Distinguish first-, second- and third-party data and evaluate their uses and risks.
Design a practical campaign taxonomy and tagging system.
Explain how data from media, CRM, web, app, sales and offline systems is integrated.
Evaluate identity resolution methods and their limitations.
Diagnose missing data, duplication, inconsistency and pipeline failure.
Apply data-quality metrics and quality-assurance controls.
Assess privacy, consent, security and governance implications.
Recommend an appropriate data foundation for ROI analysis.
1. The Data Ecosystem of Campaign Measurement
A campaign data ecosystem contains sources, identifiers, events, transformations, storage layers and analytical outputs. A useful distinction is between an observation and an entity. An observation is an event or measurement, such as an impression, click, product view, lead, purchase or invoice. An entity is the person, household, account, device, campaign, creative or product associated with that observation.
1.1 First-, second- and third-party data
First-party data is collected directly by an organisation through its own interactions with customers or prospects. Examples include CRM records, website events, app events, loyalty transactions, subscriptions, customer-service contacts and purchase histories. First-party data is often highly relevant and governed by the organisation’s own consent and purpose limitations, but it may be incomplete or biased toward known customers.
Second-party data is another organisation’s first-party data shared through a direct relationship. For example, an airline may share an agreed audience segment with a hotel group. The value of second-party data depends on contractual clarity, provenance, compatibility of consent, matching quality and the commercial purpose of the relationship.
Third-party data is acquired from an external provider that aggregates, models or resells information. It may support demographic, behavioural, contextual or geographic targeting. However, provenance, accuracy, consent, recency and representativeness require careful scrutiny. Regulatory and platform changes have also reduced the reliability of certain forms of third-party identifier-based targeting.
Data class
Typical examples
Strength
Principal risk
First-party
CRM, transactions, web and app events
Direct relevance
Gaps, siloing and consent limitations
Second-party
Partner audiences and co-marketing data
Strategic enrichment
Contractual and governance complexity
Third-party
Aggregated segments and market data
Scale and reach
Uncertain provenance and accuracy
1.2 Source-specific measurement logic
Media platforms commonly report delivery metrics such as impressions, reach, frequency, clicks, spend and platform-attributed conversions. CRM systems record leads, opportunities, customer status and contact history. Web analytics systems record sessions, events, referrers and conversions. Apps may record installs, registrations, sessions, in-app purchases and device-level events. Sales and finance systems provide orders, returns, taxes, discounts, margins and recognised revenue. Offline sources may include point-of-sale systems, call-centre logs, coupon redemptions, QR scans and manual uploads.
These sources should not be treated as interchangeable. A media platform’s reported conversion may use a platform-specific attribution window, whereas finance records may recognise revenue only after fulfilment. A click is not a visit, a lead is not a sale, and a sale is not necessarily profitable revenue. Integration must preserve the original source measure while creating documented harmonised measures for analysis.
2. Data Architecture and the Flow of Information
A campaign measurement architecture commonly includes the following layers:
Collection layer: pixels, software development kits (SDKs), APIs, server-side events, CRM exports, point-of-sale feeds and partner files.
Landing or raw layer: immutable copies of received data, including source metadata and ingestion time.
Standardisation layer: consistent names, types, time zones, currencies, campaign codes and event definitions.
Identity and enrichment layer: approved keys, customer status, product categories, geography and channel classifications.
Curated analytical layer: trusted tables or data marts for media, customers, conversions, costs and outcomes.
Activation and reporting layer: dashboards, modelling datasets, audience exports and decision tools.
A raw layer is important because transformations can introduce errors. Analysts should be able to reproduce a report from the received data and the documented transformation logic. Pipelines may be batch-based, near-real-time or streaming. The choice depends on decision latency, source capability, cost, volume and the consequences of delay.
Campaign data integration architecture
Figure: Campaign data integration architecture
Figure: A simplified flow from heterogeneous sources to ROI analysis.
3. Tagging, Taxonomy and Measurement Design
3.1 Tagging
Tagging attaches structured metadata to a marketing interaction. A web campaign may use URL parameters identifying source, medium, campaign, placement, audience and creative. Website and app event tags identify actions such as product_view, add_to_cart, registration and purchase. Media platforms may use pixels, conversion APIs or SDK events.
A tag specification should define the event name, trigger, parameters, data type, owner, consent requirement, expected frequency and destination. Event names should describe business actions rather than implementation details. For example, purchase_completed is more meaningful than button_7_clicked.
A common URL structure is conceptually represented as:
URL = base ext{ address} + ?source + medium + campaign + content + term
This is a notation for a tagged URL, not an algebraic equation. Values should be controlled through a naming dictionary; free-text entry creates avoidable variation.
3.2 Taxonomy
A taxonomy is a controlled classification system. A campaign taxonomy may contain brand, market, objective, funnel stage, product, audience, channel, placement, format, creative concept and version. A strong taxonomy is:
Specific: it distinguishes decisions that matter.
Stable: definitions do not change without governance.
Hierarchical: broad and narrow levels are connected.
Machine-readable: values are consistent and validated.
Extensible: new markets and formats can be added without redesigning the entire system.
Taxonomy should not encode every possible attribute in one long string. Separate fields are easier to validate and aggregate. For example, channel = paid_social and format = video are preferable to a single opaque label such as PS_VID_Awareness_UK_2025.
3.3 Measurement contracts
A measurement contract is an agreement among marketing, analytics, technology, sales and finance about the meaning and ownership of data. It specifies event definitions, conversion rules, revenue treatment, attribution windows, time zones, refresh schedules, acceptable tolerances and escalation procedures. Without such an agreement, teams may produce numerically precise but conceptually incompatible reports.
4. Identity Resolution
Identity resolution links records that refer to the same entity. A CRM customer may have an email address and account ID; a website event may have a consented login ID; an app event may contain an app instance ID; an offline purchase may contain a loyalty number. These identifiers do not automatically represent the same person.
4.1 Deterministic and probabilistic matching
Deterministic matching uses an exact or controlled relationship, such as a stable customer ID, authenticated login, hashed email used under an approved legal basis, or transaction-linked order ID. It is generally more transparent but reaches only records with a valid shared key.
Probabilistic matching estimates whether records belong to the same entity using features such as geography, device characteristics, timing and behavioural patterns. It can increase coverage but introduces false matches and missed matches. Probabilistic links should be assigned confidence scores and validated against known truth sets.
A simple precision measure for matched links is:
Precision = [?]
Avoiding corrupted notation, use the verbal form: precision equals the number of correctly matched links divided by the total number of links classified as matches. Recall equals correctly matched links divided by all true links in the evaluation set. These measures are meaningful only when a labelled validation sample exists.
Identity graphs should not be treated as literal statements of identity. A household, device and individual can have different relationships, and shared devices can create misleading links. Frequency capping, suppression and ROI analysis must therefore respect the level at which identity is valid.
5. Data Quality: Dimensions and Metrics
Quality is fitness for a defined purpose, not an abstract property. A data set can be complete enough for directional media reporting but inadequate for individual-level attribution.
Important dimensions include:
Completeness: required values are present.
Validity: values conform to permitted formats and ranges.
Accuracy: values represent the real-world observation.
Consistency: the same concept has compatible values across systems.
Uniqueness: an event or entity is not incorrectly repeated.
Timeliness: data arrives within the decision window.
Integrity: relationships and keys remain valid.
Provenance: source, transformation and ownership are documented.
For a field with n records, a basic completeness rate is:
Completeness = (records with a non-missing required value ÷ n) × 100%
For a set of records tested against validity rules:
Validity ext{ rate} = (records passing the rule ÷ records tested) × 100%
A duplication rate can be estimated as:
Duplication ext{ rate} = (total records − distinct records under the defined key) ÷ total records × 100%
The key must be explicitly defined. An impression ID, order ID and customer ID answer different duplication questions. These metrics are descriptive; they do not prove that the remaining records are accurate.
5.1 Missing data
Missingness may be structural, accidental or intentional. A field may be unavailable for a channel, blocked by consent choices, lost through a broken tag, or absent because a customer did not provide it. Analysts should distinguish a true zero from a missing value. Zero purchases means an observed count of none; missing purchase status means the system cannot establish the count.
Missing-data analysis should examine patterns by channel, device, browser, market, date, campaign and consent status. Imputation may be appropriate for modelling under defensible assumptions, but imputed values must be labelled and should not silently replace observed outcomes in financial reporting.
5.2 Duplicate records
Duplicates arise from retries, repeated API delivery, multiple tags, joins at the wrong grain, or legitimate repeated actions being mistaken for duplication. Idempotent pipelines use a stable event ID or a carefully designed composite key so that reprocessing does not create additional events. Deduplication rules must preserve legitimate repeat purchases and multiple impressions.
6. Integration and Quality Assurance in Practice
A robust implementation follows a controlled sequence:
Define business questions and outcome variables.
Inventory sources, owners, identifiers, refresh rates and legal bases.
Establish a canonical data dictionary and taxonomy.
Create source-to-target mappings.
Implement collection with consent and test environments.
Capture raw data before transformation.
Validate schema, volume, ranges, keys and referential integrity.
Standardise time zones, currencies, naming and event granularity.
Resolve identities only for approved purposes.
Reconcile totals with source systems.
Monitor quality continuously and document exceptions.
A reconciliation compares independent totals. For example, order counts in a curated sales table should be compared with the source order system for the same period, after accounting for cancellations and returns. Small differences may be acceptable if documented; unexplained differences should block high-stakes reporting.
Quality assurance should include unit tests for transformation logic, integration tests across systems, end-to-end test transactions, release control and automated alerts. A useful control table records the test, threshold, owner, frequency and action when the threshold fails.
7. Worked Example: Diagnosing a Campaign Data Set
An online retailer receives 100,000 purchase-event records for a month. The business defines a valid purchase event as one with an order ID, transaction value greater than or equal to zero, an allowed currency and a timestamp within the reporting period.
The audit finds:
96,000 records contain an order ID.
98,500 contain a valid currency.
99,000 have timestamps in the period.
4,000 order IDs are repeated, but 1,000 represent legitimate split shipments and should remain separate event records only if the event definition is shipment rather than order.
The first conclusion is that quality cannot be summarised by one number. Order-level reporting requires a clear grain. If the grain is one row per order, repeated order IDs must be consolidated according to documented rules. If the grain is one row per shipment, repetition may be valid.
Suppose 95,000 records pass all required-field checks. Completeness for order ID is:
(96,000 ÷ 100,000) × 100% = 96%
The figure is not an accuracy rate. It says only that the required order ID was present. Before calculating ROI, the analyst must investigate the missing 4,000 IDs, reconcile revenue to finance, verify whether values are gross or net of returns, and determine whether the event stream includes test transactions.
8. Illustrative Case: Aurora Mobile’s Integrated Measurement Foundation
Background. Aurora Mobile, a fictional subscription-app company, runs paid search, social video, influencer activity, email and regional outdoor advertising. Its marketing dashboard reports leads, while finance reports paid subscriptions. The two reports differ substantially.
Problem. The website used inconsistent campaign parameters; the app created a new anonymous identifier after reinstall; CRM contained duplicate leads; and offline promotional codes were uploaded monthly without a common campaign key. Platform conversions were also counted using different attribution windows.
Analysis. The measurement team mapped each system’s grain and definitions. It discovered that one CRM lead could have many website sessions, one customer could use several devices, and one subscription could produce several payment transactions. The team therefore rejected a direct join of all tables, which would have multiplied revenue.
Approach. Aurora introduced a governed campaign taxonomy, a stable campaign ID, a documented event dictionary and a raw data layer. Authenticated app and website activity could be linked to a customer account where consent permitted. Anonymous activity remained anonymous rather than being force-matched. CRM duplicates were merged using deterministic rules, while offline codes were mapped to campaign IDs during ingestion. Finance became the source of truth for recognised subscription revenue, and media-platform conversions were retained as diagnostic metrics rather than treated as final sales.
Automated tests monitored missing campaign IDs, duplicate order IDs, unexpected event volumes, currency errors and delayed feeds. A weekly reconciliation compared subscriptions in the curated table with finance records.
Outcome. The organisation obtained a smaller but more defensible linked dataset. Some media activity could no longer be assigned to named customers, but channel-level analysis became more trustworthy. Managers could distinguish platform-reported conversions from finance-confirmed subscriptions and investigate differences rather than conceal them.
Learning points. Integration is not the same as indiscriminate joining. Data grain, source authority, identity permissions and business definitions must be resolved before modelling ROI.
9. Governance, Privacy and Responsible Use
Data integration creates legal and ethical responsibilities. Organisations should establish purpose limitation, data minimisation, retention schedules, access controls, encryption, audit logs and breach procedures. Consent signals must be respected across collection, activation and analysis. A hashed identifier remains personal data when it can be linked back to an individual; hashing does not automatically make processing anonymous.
Data governance should assign owners for definitions, quality, security and incident response. Role-based access is preferable to universal access. Sensitive attributes should not be used for targeting or measurement merely because they are technically available. Analysts should assess whether a linkage could create unfair exclusion, discriminatory optimisation or intrusive inference.
Privacy-enhancing approaches include aggregation, pseudonymisation, clean rooms, restricted matching and differential privacy in suitable statistical contexts. These methods reduce risk but may reduce granularity and do not remove the need for lawful purpose and governance.
10. Contemporary Developments and Critical Limitations
Server-side collection and conversion APIs can improve resilience against browser restrictions, but they also increase the organisation’s responsibility for consent, security and event deduplication. Data clean rooms enable controlled collaboration between advertisers and platforms, although limited observability and differing definitions may constrain analysis. Machine-learning systems can classify events, detect anomalies and infer missing taxonomy values, but automated classification should be monitored for drift, bias and unjustified certainty.
A data warehouse or customer data platform is not automatically a single customer view. “Single view” may be impossible or inappropriate when customers share devices, operate multiple accounts or refuse linkage. Similarly, more data does not necessarily produce better decisions. Excessive granularity can increase privacy risk, operational cost and false confidence.
Best-Practice Checklist
Define the analytical grain before joining tables.
Preserve raw source data and transformation history.
Use controlled taxonomies and stable campaign IDs.
Test tags before release and monitor after release.
Reconcile media, CRM, sales and finance totals.
Use deterministic identity links where possible and confidence-scored probabilistic links only when justified.
Treat consent, security and retention as design requirements.
Document thresholds, owners, exceptions and decisions.
Chapter Summary
Campaign ROI depends on a defensible data foundation. First-party, second-party and third-party data differ in provenance, relevance and risk. Media, CRM, web, app, sales and offline sources record different events at different grains and must not be joined without explicit definitions. Tagging and taxonomy make campaign activity classifiable; measurement contracts make its meaning governable. Identity resolution may be deterministic or probabilistic, but neither creates certainty where the underlying relationship is unknown. Data quality should be assessed through completeness, validity, accuracy, consistency, uniqueness, timeliness, integrity and provenance. Missing values, duplicates and pipeline failures require diagnosis rather than concealment. Raw data preservation, validation, reconciliation, monitoring and controlled access are essential operational practices. Finally, privacy, consent, security and fairness are integral to measurement design, not post-processing additions.
Key Terms
First-party data: Data collected directly by an organisation through its own interactions.
Second-party data: Another organisation’s first-party data shared through a direct relationship.
Third-party data: Data obtained from an external aggregator or provider.
Taxonomy: A controlled classification system for organising campaign and business information.
Tagging: Attaching structured metadata or event signals to an interaction.
Event: A recorded action or observation, such as a click, purchase or app install.
Data grain: The level represented by one row or record in a data set.
Data dictionary: Documentation of fields, definitions, types and permitted values.
Identity resolution: Linking records that may refer to the same entity.
Deterministic matching: Identity matching based on an exact or controlled key.
Probabilistic matching: Identity matching based on estimated likelihood.
Completeness: The extent to which required values are present.
Validity: Conformity with permitted formats, ranges or rules.
Uniqueness: The absence of unintended duplicate records.
Data pipeline: A process that collects, moves, transforms and delivers data.
Idempotence: The property that repeating a pipeline operation does not create unintended additional results.
Reconciliation: Comparison of independently produced totals or records.
Pseudonymisation: Replacing direct identifiers while retaining a controlled possibility of linkage.
Measurement contract: An agreement defining metrics, ownership, rules and quality expectations.
Review Questions
Short Answer Questions
What distinguishes first-party data from third-party data?
Why is data grain important when integrating sales and media records?
Define deterministic identity matching.
Name four dimensions of data quality.
Why should raw data be preserved before transformation?
Long Answer Questions
Explain how tagging and taxonomy support campaign ROI analysis.
Compare deterministic and probabilistic identity resolution, including their risks.
Describe a complete data-quality assurance process for an integrated campaign dataset.
Discuss why media-platform conversions and finance-confirmed revenue may differ.
Evaluate the privacy and governance requirements of a customer data platform.
Analytical / Application Questions
A retailer’s campaign report contains impressions, clicks, CRM leads and revenue, but campaign names differ across systems. Design a taxonomy and integration plan that preserves source-specific measures while enabling channel analysis.
An app reports 20,000 purchases, while finance reports 17,500 completed orders. Develop a diagnostic framework covering duplicates, cancellations, attribution windows, event definitions and pipeline timing.
A brand wants to link anonymous website visitors to CRM customers using device and behavioural signals. Assess the methodological, ethical and governance conditions that should be satisfied before deployment.
Multiple Choice Questions with Answers
Question 1
Which type of data is collected directly by an organisation through its own customer interactions?
A. First-party data
B. Second-party data
C. Third-party data
D. Synthetic data
Correct Answer: A. First-party data
Question 2
What is the primary purpose of a campaign taxonomy?
A. To increase media spend automatically
B. To classify campaign information consistently
C. To replace finance records
D. To eliminate all missing data
Correct Answer: B. To classify campaign information consistently
Question 3
Which method uses an exact approved customer or account key for matching?
A. Probabilistic matching
B. Deterministic matching
C. Behavioural modelling
D. Random sampling
Correct Answer: B. Deterministic matching
Question 4
A completeness rate measures:
A. Whether values are present in required fields
B. Whether every value is profitable
C. Whether a campaign generated incremental sales
D. Whether a data source is legally compliant
Correct Answer: A. Whether values are present in required fields
Question 5
Why can joining media events directly to transaction rows create an incorrect result?
A. It may multiply revenue because the data grains differ
B. It always removes campaign identifiers
C. It prevents any form of aggregation
D. It converts first-party data into third-party data
Correct Answer: A. It may multiply revenue because the data grains differ
Question 6
Which practice helps prevent duplicate events when a pipeline is reprocessed?
A. Free-text campaign names
B. Idempotent processing using stable event keys
C. Deleting the raw data layer
D. Increasing the attribution window
Correct Answer: B. Idempotent processing using stable event keys
Question 7
A dataset has 100,000 records, and 95,000 contain a required field. What is the completeness rate?
A. 5%
B. 9.5%
C. 95%
D. 105%
Correct Answer: C. 95%
Question 8
Which system is generally the strongest source for recognised financial revenue?
A. A social media platform
B. A browser pixel
C. A finance or accounting system
D. An ad-server estimate
Correct Answer: C. A finance or accounting system
Question 9
Why is a hashed identifier not automatically anonymous?
A. Hashing makes data publicly readable
B. It may still be linked to an identifiable person
C. It always contains a person’s name
D. It cannot be used in a database
Correct Answer: B. It may still be linked to an identifiable person
Question 10
What is the main purpose of reconciliation in campaign data management?
A. To compare independent totals and investigate differences
B. To create new audience segments
C. To replace consent management
D. To guarantee perfect attribution
Correct Answer: A. To compare independent totals and investigate differences