mirror of
https://github.com/christianvidalwolf-prog/CrazeAnalytix.git
synced 2026-08-03 11:55:22 +02:00
5dfcdd71c0d1e98dbbdbb48cb08f23af56391553
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>
Run and deploy your AI Studio app
This contains everything you need to run your app locally.
View your app in AI Studio: https://ai.studio/apps/drive/112o4Bbq7Nkh63MALtcroOOBq0Qn1hX9G
Run Locally
Prerequisites: Node.js
- Install dependencies:
npm install - Set the
GEMINI_API_KEYin .env.local to your Gemini API key - Run the app:
npm run dev
Languages
TypeScript
91.2%
HTML
5.9%
Python
2.5%
PLpgSQL
0.2%
JavaScript
0.2%