feat: Add Amazon Ads Weekly integration with Dashboard KPIs, Grid summary, and chart lines

- Update AdsRecord interface to support weekly data (year, week, cpc, ctr, acos, conversions)
- Rewrite processAdsExcel to parse multiple sheets (2025, 2026) with 12-column format
- Update mergeSalesAndAdsData to match by ASIN+Country+Year+Week
- Add Advertising Performance section to Dashboard with Ad Spend, Attributed Sales, ACOS, ROAS
- Add Ads toggle button and summary bar to DataGrid
- Add Ad Spend lines (fuchsia dashed) to weekly comparison chart
- Fix import paths in Dashboard.tsx and AdvertisingDashboard.tsx
This commit is contained in:
Christian Vidal Wolf
2026-01-21 09:45:50 +01:00
parent 67951bcac8
commit 1c826c2487
6 changed files with 491 additions and 298 deletions
+9 -4
View File
@@ -127,14 +127,19 @@ export interface ComparisonTimeSeriesPoint {
}
export interface AdsRecord {
country: string;
month: string;
country: string; // Marketplace (Amazon DE, IT, ES, FR, UK)
year: number; // Year extracted from sheet name
week: number; // Week number (1-52)
asin: string;
cost: number;
cost: number; // Ad spend €
clicks: number;
impressions: number;
attributedSales30d: number;
cpc: number; // Cost per click €
ctr: number; // Click-through rate %
acos: number; // Advertising cost of sale %
conversions: number; // Attributed conversions (30d)
attributedUnits30d: number;
attributedSales30d: number;
}
export interface CombinedKPIs {