{
 "round": "r1",
 "question": "On a real public ecommerce event export, where in the funnel does each traffic source lose buyers, how much of that is real and how much is tracking, how far do sessions by source forecast next month's orders, and what breaks when tagging is wrong?",
 "data": {
  "dataset": "bigquery-public-data.ga4_obfuscated_sample_ecommerce",
  "tables": 92,
  "first_day": "20201101",
  "last_day": "20210131",
  "read_with": "tabledata.list, selected columns, no query job",
  "size_guard_gb_from_table_metadata": 50,
  "redistribute_raw_rows": false
 },
 "sessions": {
  "key": ["user_pseudo_id", "ga_session_id"],
  "source_medium": "earliest event in the session carrying a source or medium parameter",
  "device": "device.category on the first event",
  "placeholders": [null, "", "<Other>", "(data deleted)", "(not set)"],
  "inactivity_gap_rebuild_minutes": 30
 },
 "channels": [
  {"name": "unknown", "rule": "source or medium is a placeholder"},
  {"name": "direct", "rule": "source is (direct) and medium is (none)"},
  {"name": "organic search", "rule": "medium is organic"},
  {"name": "paid search", "rule": "medium in cpc, ppc, paid, paidsearch"},
  {"name": "referral", "rule": "medium is referral"},
  {"name": "email", "rule": "medium in email, e-mail, e_mail"},
  {"name": "other tagged", "rule": "anything else"}
 ],
 "audit_checks": [
  {"id": "A1", "name": "event missing ga_session_id", "denominator": "all events"},
  {"id": "A2", "name": "event missing ga_session_number", "denominator": "all events"},
  {"id": "A3", "name": "event missing page_location", "denominator": "all events"},
  {"id": "A4", "name": "session with no session_start event", "denominator": "sessions"},
  {"id": "A5", "name": "session with no usable source or medium (null or placeholder)", "denominator": "sessions", "split": "no parameter at all; placeholder"},
  {"id": "A6", "name": "user-level traffic_source source or medium is a placeholder", "denominator": "users"},
  {"id": "A7", "name": "ecommerce event with an empty items array", "denominator": "view_item, add_to_cart, begin_checkout and purchase events, each reported"},
  {"id": "A8", "name": "purchase with a missing or placeholder transaction id", "denominator": "purchase events"},
  {"id": "A9", "name": "purchase event sharing a transaction id with an earlier purchase event", "denominator": "purchase events"},
  {"id": "A10", "name": "purchase with no value parameter, no currency, or null or zero revenue", "denominator": "purchase events, each reported"},
  {"id": "A11", "name": "purchase whose items total differs from revenue by more than 1%", "denominator": "purchase events with both"},
  {"id": "A12", "name": "funnel order broken inside a session: purchase with no begin_checkout, begin_checkout with no add_to_cart, add_to_cart with no view_item", "denominator": "sessions reaching the later stage, each reported"},
  {"id": "A13", "name": "funnel event outage: a day under 10% of the trailing 14-day median for that event", "denominator": "days with a full trailing window, per funnel event"}
 ],
 "session_rebuilds": ["count of session_start events", "distinct user_pseudo_id plus ga_session_id", "per user, a new session after 30 minutes of inactivity, ignoring ga_session_id"],
 "funnel": {
  "stages": ["session", "view_item", "add_to_cart", "begin_checkout", "purchase"],
  "reach": "a session reaches a stage if it holds at least one such event",
  "interval": "95% percentile, Poisson bootstrap over users",
  "bootstrap_replicates": 1000,
  "bootstrap_seed": 4,
  "min_sessions_for_a_reading": 200
 },
 "reads": {
  "A": "all events as exported",
  "B": "removes ecommerce events with empty items; purchases with a missing or placeholder transaction id; purchases with no value or revenue; second and later purchase events sharing a transaction id"
 },
 "attribution_rules": {
  "user_first_touch": "traffic_source source and medium on the event",
  "session_scope": "the session's own channel",
  "last_non_direct": "the session's channel, or if direct or unknown, the user's latest earlier session within the previous 30 days with a known non-direct channel"
 },
 "forecast": {
  "orders": "Read B purchase events per day",
  "sessions": "sessions per channel by the date of the session's first event",
  "month_ahead": {"horizon_days": 28, "origins_day_index": [28, 35, 42, 49, 56, 63], "non_overlapping_origins": [28, 56]},
  "week_ahead": {"horizon_days": 7, "origins_day_index": [28, 35, 42, 49, 56, 63, 70, 77, 84], "test": "two-sided sign test"},
  "models": {
   "N28": "orders over the last 28 days",
   "N7": "4 times orders over the last 7 days",
   "S": "per channel, 4 times sessions over the last 7 days times the channel's orders per session over the last 28 days, summed",
   "N7w": "orders over the last 7 days",
   "S7": "per channel, sessions over the last 7 days times the channel's orders per session over the last 28 days, summed"
  },
  "bridge": "miss of S per channel: traffic = (actual sessions minus forecast sessions) times forecast rate; conversion = actual sessions times (actual rate minus forecast rate); closes by construction",
  "regression": "left out in advance: too few origins"
 },
 "faults": {
  "selection": "deterministic hash of the row's key and the fault id",
  "fired_rule": "a check fires when its rate rises by at least 0.5 points and at least 20% of its baseline",
  "list": [
   {"id": "T1", "name": "a redirect strips campaign values", "rule": "50% of paid search sessions: every event's source and medium become (direct) and (none)"},
   {"id": "T2", "name": "purchase tag fires twice", "rule": "20% of purchases gain a copy 1 second later with the same transaction id"},
   {"id": "T3", "name": "transaction id lost", "rule": "30% of purchases: transaction id null"},
   {"id": "T4", "name": "value sent as a string", "rule": "30% of purchases: value parameter not numeric, revenue null"},
   {"id": "T5", "name": "session id lost on phones", "rule": "50% of mobile events: ga_session_id null"},
   {"id": "T6", "name": "payment page self-referral", "rule": "30% of purchases: moved to a new session whose source is a payment host and medium is referral"},
   {"id": "T7", "name": "add to cart tag gone on phones", "rule": "every mobile add_to_cart event removed"},
   {"id": "T8", "name": "product view loses items", "rule": "30% of view_item events: items empty"},
   {"id": "T9", "name": "consent banner delays tags", "rule": "20% of sessions lose every event in their first 10 seconds"}
  ]
 },
 "reporting": {
  "main_chart_rule": "the funnel chart shows every channel with at least 1,000 sessions in Read A",
  "worked_example_rule": "the fault with the largest channel-share move that no audit check catches; if none, the largest channel-share move overall",
  "public_money_rule": "money figures come only from assumptions.json and are labelled as assumptions"
 },
 "public_files": "README.md, predictions-r1.json, assumptions.json, results/, tools/, tests/, site/, vendor/, this protocol and the design"
}
