mirror of
https://github.com/christianvidalwolf-prog/CrazeAnalytix.git
synced 2026-08-03 12:25:22 +02:00
The generic regex /sale/i in ads column detection was matching "Advertising Cost of Sales" (the ACOS % column) before reaching "7 day total sales" (the actual attributed sales amount). This caused attributedSales30d to receive the ACOS percentage instead of the real sales value, making experiment ACOS = 0 or 100%. - Replace /sale/i with specific regexes: /\d+\s*day.*sale/i, /total\s+sale/i, etc. - Replace /cost/i with regexes that exclude "cost of sales" columns - Replace /unit/i with specific regexes for unit columns - Add diagnostic logging for ads Excel column headers and first-row values - Revert ACOS 100% fallback (root cause now fixed) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>