2 Metrics, Data, and Privacy
Metrics become useful when their definitions are stable and connected to a decision. Data becomes useful when its collection process is understood.
2.1 Build a metric tree
Start with a business outcome such as contribution profit, then decompose it:
\[ \text{Contribution profit} = \text{orders} \times \text{margin per order} - \text{marketing cost} \]
Orders may be decomposed into eligible users, exposure rate, response rate, and purchase rate. This makes assumptions visible and helps distinguish a true business improvement from a reporting change.
Useful metric groups include:
- Delivery: spend, reach, frequency, impressions.
- Engagement: clicks, qualified visits, content completion.
- Conversion: orders, leads, conversion rate, cost per acquisition.
- Value: revenue, margin, average order value, repeat purchases.
- Customer: retention, churn, lifetime value.
2.2 Compute rates defensibly
The example below uses synthetic campaign data. It makes zero denominators explicit instead of silently producing infinite values.
campaign <- data.frame(
channel = c("search", "social", "video", "new_test"),
spend = c(12000, 9000, 15000, 0),
impressions = c(400000, 700000, 900000, 0),
clicks = c(16000, 10500, 7200, 0),
orders = c(960, 420, 270, 0),
revenue = c(76800, 35700, 25650, 0)
)
safe_ratio <- function(numerator, denominator) {
ifelse(denominator > 0, numerator / denominator, NA_real_)
}
campaign$ctr <- safe_ratio(campaign$clicks, campaign$impressions)
campaign$cvr <- safe_ratio(campaign$orders, campaign$clicks)
campaign$cpa <- safe_ratio(campaign$spend, campaign$orders)
campaign$roas <- safe_ratio(campaign$revenue, campaign$spend)
campaign[, c("channel", "ctr", "cvr", "cpa", "roas")]## channel ctr cvr cpa roas
## 1 search 0.040 0.0600 12.50000 6.400000
## 2 social 0.015 0.0400 21.42857 3.966667
## 3 video 0.008 0.0375 55.55556 1.710000
## 4 new_test NA NA NA NA
Before comparing rows, confirm that attribution windows, customer eligibility, conversion definitions, and revenue adjustments are equivalent.
2.3 Data sources
Common sources include:
- transaction and point-of-sale systems;
- customer relationship management systems;
- web and app event logs;
- advertising-platform delivery and cost data;
- surveys, panels, and brand studies; and
- product, pricing, inventory, promotion, and geographic data.
First-party data is collected through a direct relationship with the customer or user. Second-party data usually means another organization’s first-party data shared through an agreement. Third-party data is assembled by an entity without the same direct relationship. These labels do not by themselves establish consent, accuracy, legality, or fitness for a purpose.
2.4 Identity is imperfect
Cookies, login identifiers, device identifiers, and clean-room matches observe different slices of behavior. A login can improve cross-device linkage, but a login may be shared, missing, or incorrectly joined. Hashed identifiers are pseudonymous, not automatically anonymous; consistent hashes can still enable linkage.
Report match rates and unmatched populations. Ask whether missing identity is related to geography, device, browser, consent choice, or customer behavior.
2.5 Privacy and platform change
Privacy requirements depend on jurisdiction, purpose, consent, contractual terms, and organizational policy. Consult qualified legal and privacy teams for specific decisions.
Browser behavior is also time-sensitive. Google announced in April 2025 that Chrome would maintain user choice for third-party cookies rather than introduce a new standalone prompt. Third-party cookies can still be blocked by browser design, user settings, enterprise policy, or private browsing. See the official Privacy Sandbox update and third-party cookie guidance.
Practical principles remain stable:
- collect only what has a defined purpose;
- minimize retention and access;
- separate identifiers from analytical features where practical;
- honor consent and deletion requirements;
- prevent sensitive attributes from leaking through proxies; and
- document how measurement changes when users cannot be linked.
2.6 Data-quality checklist
Check:
- duplicate events and retries;
- missing or impossible timestamps;
- timezone and currency consistency;
- bot, employee, and test traffic;
- campaign-name and channel taxonomy drift;
- late conversions and changing attribution windows;
- refunds, cancellations, and chargebacks; and
- breaks caused by tag or application releases.