perf: acortar lookback KPIs y unificar fallback Google warehouse
Quita el suelo de 700 días (basta desde ene-2025) y deja buildGoogleCardsFromDaily solo en ad-creatives-google. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -20,11 +20,9 @@ import { isAgencyRole, serviceHeaders, supabaseUrl, userRole } from '@/lib/agenc
|
||||
|
||||
export const dynamic = 'force-dynamic';
|
||||
|
||||
/** Enough history for YoY from Jan 2025 (inclusive). */
|
||||
const AD_DAILY_LOOKBACK_DAYS = Math.max(
|
||||
700,
|
||||
Math.ceil((Date.now() - Date.UTC(2025, 0, 1)) / 86400000) + 14
|
||||
);
|
||||
/** Enough history for YoY from Jan 2025 (inclusive). No artificial 700d floor. */
|
||||
const AD_DAILY_LOOKBACK_DAYS =
|
||||
Math.ceil((Date.now() - Date.UTC(2025, 0, 1)) / 86400000) + 14;
|
||||
const AD_DAILY_PAGE = 1000;
|
||||
|
||||
async function fetchAdDaily(
|
||||
|
||||
Reference in New Issue
Block a user