Working code, real datasets, statistical methods that hold up. We publish what we'd want our junior analysts to read.
Step-by-step Markov-chain attribution model in BigQuery SQL using real anonymized data. With removal-effect calculation, channel grouping, and quarterly retraining script.
attribution bigquery markovWhy fixed-horizon A/B tests inflate false positive rates by 5-15x. With Python implementations of mSPRT and Always Valid Inference.
statistics ab-testing sprtCost notes (~฿8K/mo), latency profile, deployment scripts. Cheaper than Cloud Run for most Thai-traffic sites.
ga4 server-side cloudflareConversion patterns for Thai payment methods from scraped data across 200+ TH e-commerce sites. Defaults, ordering, copy patterns that work.
thai-market checkout-ux paymentsMost Bangkok agencies still ignore PDPA. We walk through what's required, what's optional, what's overkill — with sample consent strings.
pdpa thailand privacy1. Build the path. Aggregate all touchpoints per converting + non-converting user from GA4 raw export in BigQuery. Order by timestamp. Include non-converting paths — they're load-bearing for the math.
2. Build the transition matrix. Compute P(channel_j | channel_i) for every pair, including a special start and conversion node.
3. Compute removal effect. For each channel, recompute conversion probability with that channel's transitions zeroed. The drop in conversion probability is the channel's true attribution weight.
4. Normalize and reallocate. Sum removal effects to 1. Multiply by total conversions. That's your data-driven channel attribution.
5. Retrain quarterly. Channel mix and seasonality drift. A 12-month-old model is just a guess.
~1 long-form per month. With code.