On this page
Every measure in the metric catalog, grouped by data plane: its name, definition, unit, aggregation, grain, source tables and the reconciliation that references it. Built from packages/metrics/src/catalog.ts; do not edit by hand. Regenerate with pnpm tsx scripts/docs/generate-metric-reference.ts, then convert with pnpm exec tsx scripts/docs-to-html.ts --only docs/architecture/reference/metric-dictionary.md. pnpm tsx scripts/docs/generate-metric-reference.ts --check exits 1 when the file differs from the catalog.
Reader: the data and measurement team, and integrators who read a number from the API and need to know what it is. A field the catalog does not declare reads "not declared"; nothing here is inferred.
The three data planes never mix: a number from one plane is never added to or compared as equal with a number from another. Measurement and honest numbers explains why.
How to read the tables#
- Money: unit
vndis integer VND, never a fraction and never another currency. - Period: a day is an Asia/Ho_Chi_Minh calendar day and a week starts on Monday; the day label is never built from a UTC instant.
packages/plugin-host/src/period.tsholds the rule. - Additivity follows the aggregation:
sumandcountadd across days, shops and brands;avg,ratioanddistinct_countdo not, so recompute them from their parts. - Stock versus flow is declared on tenant dataset measures, not in this catalog. See Dataset pack fields.
- Reconciliation lists the check ids a rule maps to a measure, plus the recon scripts that fetch the measure by its literal id. It is not a coverage claim: "not declared" means no such reference exists.
1st-party marketplace#
Orders, items, settlements, creators and inventory from the shops a tenant connects. Money is integer VND.
26 measures.
Definitions
Units, aggregation and sources
| Measure | Unit | Aggregation | Additivity | Default grain | Source tables | Reconciliation |
|---|---|---|---|---|---|---|
actual_ |
vnd (integer VND) |
sum |
additive | day |
payout_ |
#Y15, #Y15b in scripts/audit/data-reconciliation.ts |
aov |
vnd (integer VND) |
ratio |
not additive (ratio) | day |
orders, agg_ |
not declared |
cancellation_ |
ratio_ |
ratio |
not additive (ratio) | day |
orders |
not declared |
cogs |
vnd (integer VND) |
sum |
additive | day |
order_, dim_, agg_ |
not declared |
contribution_ |
ratio_ |
ratio |
not additive (ratio) | day |
orders, order_, agg_ |
not declared |
creator_ |
vnd (integer VND) |
sum |
additive | day |
creator_, agg_ |
not declared |
creator_ |
ratio_ |
ratio |
not additive (ratio) | month |
creator_, creator_, agg_ |
not declared |
days_ |
days |
ratio |
not additive (ratio) | day |
inventory_, order_, agg_ |
not declared |
discount_ |
vnd (integer VND) |
sum |
additive | day |
orders, agg_ |
not declared |
expected_ |
vnd (integer VND) |
sum |
additive | day |
payout_ |
#Y15, #Y15b in scripts/audit/data-reconciliation.ts |
gmv |
vnd (integer VND) |
sum |
additive | day |
orders, agg_ |
looked up in scripts/ |
gross_ |
ratio_ |
ratio |
not additive (ratio) | day |
agg_, order_, dim_, agg_ |
looked up in scripts/ |
inventory_ |
vnd (integer VND) |
sum |
additive | day |
inventory_, dim_ |
not declared |
list_ |
vnd (integer VND) |
avg |
not additive (average) | day |
order_ |
not declared |
new_ |
count |
count |
additive | day |
shoppers, agg_ |
not declared |
nmv |
vnd (integer VND) |
sum |
additive | day |
orders, agg_ |
not declared |
orders_ |
count |
count |
additive | day |
orders, agg_ |
not declared |
payout_ |
vnd (integer VND) |
sum |
additive | day |
payout_ |
#Y15, #Y15b in scripts/audit/data-reconciliation.ts |
platform_ |
vnd (integer VND) |
sum |
additive | day |
payout_ |
#Y15, #Y15b in scripts/audit/data-reconciliation.ts |
repeat_ |
ratio_ |
ratio |
not additive (ratio) | month |
orders, agg_ |
not declared |
return_ |
ratio_ |
ratio |
not additive (ratio) | day |
orders, agg_ |
not declared |
returns_ |
vnd (integer VND) |
sum |
additive | day |
orders, agg_ |
not declared |
sell_ |
ratio_ |
ratio |
not additive (ratio) | week |
order_, inventory_, agg_ |
not declared |
stockout_ |
count |
count |
additive | day |
inventory_, agg_ |
looked up in scripts/ |
unique_ |
count |
distinct_ |
not additive (distinct count) | day |
orders, agg_ |
not declared |
units_ |
count |
sum |
additive | day |
order_, agg_ |
not declared |
Breakdowns and metadata
| Measure | Dimensions | Owner | Category | Comparison | Cube binding | Version |
|---|---|---|---|---|---|---|
actual_ |
platform, day |
finance |
commerce_ |
not declared | PayoutLines. (day=payoutDate, platform=platform) |
1. |
aov |
platform, day |
commerce |
commerce_ |
not declared | none (compiled) | 1. |
cancellation_ |
platform, day |
commerce |
commerce_ |
not declared | none (compiled) | 1. |
cogs |
platform, product, sku, day |
finance |
commerce_ |
not declared | none (compiled) | 1. |
contribution_ |
platform, day |
finance |
commerce_ |
not declared | none (compiled) | 1. |
creator_ |
creator, platform, day |
creator |
creator |
not declared | none (compiled) | 1. |
creator_ |
creator, platform, day |
creator |
creator |
not declared | none (compiled) | 1. |
days_ |
product, sku |
inventory |
inventory |
not declared | none (compiled) | 1. |
discount_ |
platform, day |
marketing |
commerce_ |
not declared | none (compiled) | 1. |
expected_ |
platform, day |
finance |
commerce_ |
not declared | PayoutLines. (day=payoutDate, platform=platform) |
1. |
gmv |
platform, brand, category, product, sku, day |
commerce |
commerce_ |
not declared | none (compiled) | 1. |
gross_ |
platform, product, sku, day |
finance |
commerce_ |
not declared | none (compiled) | 1. |
inventory_ |
product, sku |
inventory |
inventory |
not declared | none (compiled) | 1. |
list_ |
platform, sub_, day |
commerce |
commerce_ |
not declared | none (compiled) | 1. |
new_ |
platform, day |
commerce |
commerce_ |
not declared | none (compiled) | 1. |
nmv |
platform, day |
commerce |
commerce_ |
not declared | none (compiled) | 1. |
orders_ |
platform, day |
commerce |
commerce_ |
not declared | none (compiled) | 1. |
payout_ |
platform, day |
finance |
commerce_ |
not declared | PayoutLines. (day=payoutDate, platform=platform) |
1. |
platform_ |
platform, day |
finance |
commerce_ |
not declared | PayoutLines. (day=payoutDate, platform=platform) |
1. |
repeat_ |
platform, month |
commerce |
commerce_ |
not declared | none (compiled) | 1. |
return_ |
platform, day |
commerce |
commerce_ |
not declared | none (compiled) | 1. |
returns_ |
platform, day |
commerce |
commerce_ |
not declared | none (compiled) | 1. |
sell_ |
product, sku |
inventory |
inventory |
not declared | none (compiled) | 1. |
stockout_ |
product, sku, day |
inventory |
inventory |
not declared | none (compiled) | 1. |
unique_ |
platform, day |
commerce |
commerce_ |
not declared | none (compiled) | 1. |
units_ |
platform, product, sku, day |
commerce |
commerce_ |
not declared | none (compiled) | 1. |
1st-party marketing#
Ad spend, web analytics, search console, email, social pages and CRM leads from the marketing connectors.
54 measures.
Definitions
Units, aggregation and sources
| Measure | Unit | Aggregation | Additivity | Default grain | Source tables | Reconciliation |
|---|---|---|---|---|---|---|
crm_ |
count |
sum |
additive | day |
crm_ |
not declared |
crm_ |
count |
sum |
additive | day |
crm_ |
not declared |
crm_ |
ratio_ |
ratio |
not additive (ratio) | ytd |
kpi_, crm_ |
not declared |
crm_ |
count |
sum |
additive | ytd |
kpi_ |
not declared |
mkt_ |
vnd (integer VND) |
sum |
additive | day |
ad_ |
not declared |
mkt_ |
count |
sum |
additive | day |
ad_ |
not declared |
mkt_ |
vnd (integer VND) |
ratio |
not additive (ratio) | day |
ad_, crm_ |
not declared |
mkt_ |
vnd (integer VND) |
ratio |
not additive (ratio) | day |
ad_ |
not declared |
mkt_ |
vnd (integer VND) |
ratio |
not additive (ratio) | day |
ad_ |
not declared |
mkt_ |
ratio_ |
ratio |
not additive (ratio) | day |
ad_ |
not declared |
mkt_ |
ratio_ |
ratio |
not additive (ratio) | day |
email_ |
not declared |
mkt_ |
count |
sum |
additive | day |
email_ |
not declared |
mkt_ |
ratio_ |
ratio |
not additive (ratio) | day |
email_ |
not declared |
mkt_ |
count |
sum |
additive | day |
email_ |
not declared |
mkt_ |
count |
sum |
additive | day |
email_ |
not declared |
mkt_ |
count |
sum |
additive | day |
email_ |
not declared |
mkt_ |
count |
sum |
additive | day |
email_ |
not declared |
mkt_ |
count |
sum |
additive | day |
email_ |
not declared |
mkt_ |
count |
distinct_ |
not additive (distinct count) | day |
email_ |
not declared |
mkt_ |
count |
sum |
additive | day |
email_ |
not declared |
mkt_ |
count |
sum |
additive | day |
email_ |
not declared |
mkt_ |
count |
sum |
additive | day |
email_ |
not declared |
mkt_ |
count |
sum |
additive | day |
ad_ |
not declared |
mkt_ |
decimal |
avg |
not additive (average) | day |
search_ |
not declared |
mkt_ |
count |
sum |
additive | day |
search_ |
not declared |
mkt_ |
ratio_ |
ratio |
not additive (ratio) | day |
search_ |
not declared |
mkt_ |
count |
sum |
additive | day |
search_ |
not declared |
mkt_ |
count |
sum |
additive | day |
ad_ |
not declared |
mkt_ |
count |
sum |
additive | day |
ad_ |
not declared |
mkt_ |
ratio |
ratio |
not additive (ratio) | day |
ad_, orders |
not declared |
mkt_ |
count |
sum |
additive | month |
social_ |
not declared |
mkt_ |
count |
sum |
additive | month |
social_ |
not declared |
mkt_ |
count |
sum |
additive | month |
social_ |
not declared |
mkt_ |
count |
sum |
additive | month |
social_ |
not declared |
mkt_ |
count |
sum |
additive | month |
social_ |
not declared |
mkt_ |
count |
sum |
additive | month |
social_ |
not declared |
mkt_ |
count |
sum |
additive | month |
social_ |
not declared |
mkt_ |
count |
sum |
additive | day |
ad_ |
not declared |
mkt_ |
ratio_ |
ratio |
not additive (ratio) | month |
web_ |
not declared |
mkt_ |
count |
sum |
additive | day |
web_ |
not declared |
mkt_ |
ratio_ |
ratio |
not additive (ratio) | month |
web_ |
not declared |
mkt_ |
vnd (integer VND) |
sum |
additive | day |
web_ |
not declared |
mkt_ |
count |
sum |
additive | day |
web_ |
not declared |
mkt_ |
count |
sum |
additive | day |
web_ |
not declared |
mkt_ |
count |
sum |
additive | month |
web_ |
not declared |
mkt_ |
count |
sum |
additive | day |
web_ |
not declared |
mkt_ |
count |
sum |
additive | day |
web_ |
not declared |
mkt_ |
count |
sum |
additive | day |
web_ |
not declared |
mkt_ |
count |
sum |
additive | ytd |
web_ |
not declared |
mkt_ |
count |
sum |
additive | day |
web_ |
not declared |
mkt_ |
ratio_ |
ratio |
not additive (ratio) | ytd |
calendar |
not declared |
social_ |
count |
sum |
additive | month |
social_, social_ |
not declared |
social_ |
ratio_ |
ratio |
not additive (ratio) | month |
social_ |
not declared |
social_ |
count |
sum |
additive | day |
social_ |
not declared |
Breakdowns and metadata
| Measure | Dimensions | Owner | Category | Comparison | Cube binding | Version |
|---|---|---|---|---|---|---|
crm_ |
campaign, day |
crm |
lead_ |
not declared | none (compiled) | 1. |
crm_ |
day |
crm |
lead_ |
not declared | none (compiled) | 1. |
crm_ |
not declared | crm |
lead_ |
target_vs_actual, on_pace | none (compiled) | 1. |
crm_ |
not declared | crm |
lead_ |
target_vs_actual, higher_better | none (compiled) | 1. |
mkt_ |
platform, campaign, day |
marketing |
advertising |
none, on_pace | none (compiled) | 1. |
mkt_ |
platform, campaign, day |
marketing |
advertising |
not declared | none (compiled) | 1. |
mkt_ |
not declared | marketing |
lead_ |
period_over_period, lower_better | none (compiled) | 1. |
mkt_ |
platform, campaign |
marketing |
advertising |
period_over_period, lower_better | none (compiled) | 1. |
mkt_ |
platform, campaign, day |
marketing |
advertising |
period_over_period, lower_better | none (compiled) | 1. |
mkt_ |
platform, campaign |
marketing |
advertising |
period_over_period, higher_better | none (compiled) | 1. |
mkt_ |
campaign |
marketing |
email_ |
not declared | none (compiled) | 1. |
mkt_ |
campaign |
marketing |
email_ |
not declared | none (compiled) | 1. |
mkt_ |
campaign |
marketing |
email_ |
not declared | none (compiled) | 1. |
mkt_ |
campaign |
marketing |
email_ |
not declared | none (compiled) | 1. |
mkt_ |
not declared | marketing |
email_ |
not declared | none (compiled) | 1. |
mkt_ |
not declared | marketing |
email_ |
not declared | none (compiled) | 1. |
mkt_ |
not declared | marketing |
email_ |
not declared | none (compiled) | 1. |
mkt_ |
not declared | marketing |
email_ |
not declared | none (compiled) | 1. |
mkt_ |
not declared | marketing |
email_ |
not declared | none (compiled) | 1. |
mkt_ |
campaign |
marketing |
email_ |
not declared | none (compiled) | 1. |
mkt_ |
campaign |
marketing |
email_ |
not declared | none (compiled) | 1. |
mkt_ |
campaign |
marketing |
email_ |
not declared | none (compiled) | 1. |
mkt_ |
platform, campaign |
marketing |
advertising |
not declared | none (compiled) | 1. |
mkt_ |
day |
marketing |
web_ |
not declared | none (compiled) | 1. |
mkt_ |
day |
marketing |
web_ |
not declared | none (compiled) | 1. |
mkt_ |
day |
marketing |
web_ |
not declared | none (compiled) | 1. |
mkt_ |
day |
marketing |
web_ |
not declared | none (compiled) | 1. |
mkt_ |
platform, campaign |
marketing |
advertising |
not declared | none (compiled) | 1. |
mkt_ |
platform, campaign |
marketing |
advertising |
not declared | none (compiled) | 1. |
mkt_ |
day |
marketing |
advertising |
period_over_period, higher_better | none (compiled) | 1. |
mkt_ |
platform |
marketing |
social_ |
not declared | none (compiled) | 1. |
mkt_ |
platform, day |
marketing |
social_ |
not declared | none (compiled) | 1. |
mkt_ |
platform |
marketing |
social_ |
not declared | none (compiled) | 1. |
mkt_ |
platform |
marketing |
social_ |
not declared | none (compiled) | 1. |
mkt_ |
platform |
marketing |
social_ |
not declared | none (compiled) | 1. |
mkt_ |
platform |
marketing |
social_ |
not declared | none (compiled) | 1. |
mkt_ |
platform |
marketing |
social_ |
not declared | none (compiled) | 1. |
mkt_ |
platform, campaign |
marketing |
lead_ |
not declared | none (compiled) | 1. |
mkt_ |
hostname, landing_, traffic_ |
marketing |
web_ |
not declared | none (compiled) | 1. |
mkt_ |
channel |
marketing |
web_ |
not declared | none (compiled) | 1. |
mkt_ |
hostname, landing_, traffic_ |
marketing |
web_ |
not declared | none (compiled) | 1. |
mkt_ |
not declared | marketing |
web_ |
not declared | none (compiled) | 1. |
mkt_ |
channel |
marketing |
web_ |
not declared | none (compiled) | 1. |
mkt_ |
not declared | marketing |
web_ |
not declared | none (compiled) | 1. |
mkt_ |
property |
marketing |
web_ |
not declared | none (compiled) | 1. |
mkt_ |
channel, day |
marketing |
web_ |
not declared | none (compiled) | 1. |
mkt_ |
property, day |
marketing |
web_ |
not declared | none (compiled) | 1. |
mkt_ |
channel |
marketing |
web_ |
not declared | none (compiled) | 1. |
mkt_ |
not declared | marketing |
web_ |
not declared | none (compiled) | 1. |
mkt_ |
property, day |
marketing |
web_ |
not declared | none (compiled) | 1. |
mkt_ |
not declared | marketing |
advertising |
none, on_pace | none (compiled) | 1. |
social_ |
mention_, day |
social |
audience_ |
not declared | none (compiled) | 1. |
social_ |
not declared | social |
audience_ |
not declared | none (compiled) | 1. |
social_ |
trend_, day |
social |
audience_ |
not declared | none (compiled) | 1. |
1st-party audience#
Mention-level social-listening data a client supplies. A first-party pillar, not a fourth plane.
9 measures.
Definitions
Units, aggregation and sources
| Measure | Unit | Aggregation | Additivity | Default grain | Source tables | Reconciliation |
|---|---|---|---|---|---|---|
audience_ |
percent_ |
ratio |
not additive (ratio) | all |
content_, content_, agg_ |
not declared |
audience_ |
count |
count |
additive | all |
content_, content_ |
not declared |
audience_ |
count |
count |
additive | day |
content_ |
not declared |
audience_ |
percent_ |
ratio |
not additive (ratio) | all |
content_ |
not declared |
audience_ |
percent_ |
ratio |
not additive (ratio) | all |
content_ |
not declared |
audience_ |
percent_ |
ratio |
not additive (ratio) | all |
content_ |
not declared |
audience_ |
percent_ |
ratio |
not additive (ratio) | all |
content_ |
not declared |
audience_ |
percent_ |
ratio |
not additive (ratio) | all |
content_ |
not declared |
audience_ |
count |
sum |
additive | day |
content_ |
not declared |
Breakdowns and metadata
| Measure | Dimensions | Owner | Category | Comparison | Cube binding | Version |
|---|---|---|---|---|---|---|
audience_ |
taxonomy |
audience |
audience_ |
not declared | none (compiled) | 1. |
audience_ |
taxonomy |
audience |
audience_ |
not declared | none (compiled) | 1. |
audience_ |
day, mention_ |
audience |
audience_ |
not declared | none (compiled) | 1. |
audience_ |
day |
audience |
audience_ |
not declared | none (compiled) | 1. |
audience_ |
day |
audience |
audience_ |
not declared | none (compiled) | 1. |
audience_ |
day |
audience |
audience_ |
not declared | none (compiled) | 1. |
audience_ |
day |
audience |
audience_ |
not declared | none (compiled) | 1. |
audience_ |
day |
audience |
audience_ |
not declared | none (compiled) | 1. |
audience_ |
day |
audience |
audience_ |
not declared | none (compiled) | 1. |
3rd-party market estimates#
Estimates from a market-intelligence vendor. Never added to, compared as equal with, or used as an input to a first-party number.
5 measures.
Definitions
Units, aggregation and sources
| Measure | Unit | Aggregation | Additivity | Default grain | Source tables | Reconciliation |
|---|---|---|---|---|---|---|
mi_ |
vnd (integer VND) |
sum |
additive | month |
market_ |
not declared |
mi_ |
vnd (integer VND) |
sum |
additive | month |
market_ |
not declared |
mi_ |
ratio_ |
ratio |
not additive (ratio) | month |
market_ |
not declared |
mi_ |
vnd (integer VND) |
sum |
additive | month |
market_ |
not declared |
mi_ |
vnd (integer VND) |
sum |
additive | month |
market_ |
not declared |
Breakdowns and metadata
| Measure | Dimensions | Owner | Category | Comparison | Cube binding | Version |
|---|---|---|---|---|---|---|
mi_ |
month, market_ |
market |
not declared | not declared | none (compiled) | 1. |
mi_ |
month |
market |
not declared | not declared | none (compiled) | 1. |
mi_ |
month |
market |
not declared | not declared | none (compiled) | 1. |
mi_ |
month |
market |
not declared | not declared | none (compiled) | 1. |
mi_ |
month |
market |
not declared | not declared | none (compiled) | 1. |