Transaction

In web analytics, a transaction is a finalized commercial event with a unique order ID and verifiable money flow: totals, discounts, taxes, shipping, currency, and purchased items. Unlike a Session, which is a time-bounded visit, a transaction is a business event that can happen during a visit or via deferred flows (pay-by-link, invoice).

Why it matters: transactions feed your core commercial metrics. Two staples ride on them: Conversion Rate and Average Order Value (AOV). Revenue analysis also hinges on clean order data (Revenue).

Short formulas

  • Conversion Rate = Transactions ÷ Sessions
  • AOV = Revenue ÷ Transactions

Mini example
If you had 120 transactions and 3,000 sessions, conversion rate = 120 / 3,000 = 4%. With $18,000 revenue, AOV = $18,000 / 120 = $150.

Practical notes (data hygiene)

  • Idempotency: deduplicate by order_id to avoid double counts on retries/refresh.
  • Completeness: revenue_total should equal line items + tax + shipping − discounts.
  • Status changes: post refunds/voids as separate events to compute net revenue cleanly.
  • Attribution: document how transactions are attributed vs. sessions and campaigns.

Typical transaction payload (minimum viable)

FieldDescription
order_idUnique identifier (string/UUID)
revenue_totalFinal paid amount (post-discount)
currencyISO-4217 code (e.g., USD, EUR)
tax, shipping, discountMonetary components (≥ 0)
items[]Array of { sku, name, qty, price }

Distinctions