Commit Graph

107 Commits

Author SHA1 Message Date
4Ventures
ed275f475a Fix leftover lookback constant so the Ads/Métricas build compiles.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-06 15:37:36 +02:00
4Ventures
a5bfec698b Align Ads and Métricas on the same paginated ad_daily warehouse.
Ad Tracker only loaded 2000 newest rows, so Brava showed 0 € while Métricas summed the full month. Both now page the same table for the selected range.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-06 15:33:06 +02:00
4Ventures
fac9867202 Fix calendar plan merge typing so production build can compile.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-06 15:25:24 +02:00
4Ventures
965a58540e Ship monthly goals, calendar creative zoom, and legal pages.
Editable targets vs actual, pipeline review-only with client reject notes, and published pieces opening from the calendar day.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-06 15:17:15 +02:00
4Ventures
b9ddc7b806 Show every Google PMax text, image and YouTube asset in Ads zoom.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-06 13:38:24 +02:00
4Ventures
81b424bd2f Remove the editorial calendar publish button.
Agency will load new months from files, not a portal CTA that copied another client’s plan.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-06 12:30:54 +02:00
4Ventures
ead310e783 Keep editorial calendars private to each tenant.
Stop seeding Agua Miia’s October plan for every client and restrict the portal publish action to that tenant only.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-06 12:25:47 +02:00
4Ventures
487e2c7a2b Add GoHighLevel CRM sync for tenant locations.
Warehouse leads/deals from GHL contacts and opportunities so Métricas and CRM can use the same scorecard as Clientify.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-06 11:57:02 +02:00
4Ventures
ace73c2699 fix: unify creatives into Pipeline and hide Panel nav
Absorb client approval, month filters and editorial pieces into Pipeline; redirect /panel-cliente and remove duplicate menu entry.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-06 10:16:15 +02:00
4Ventures
ce6dc4e0f0 fix: split Google Ads creatives by Search / PMax / Display
Fetch display/RDA assets, classify Brand vs Generic Search, and group
the Ad Tracker gallery so previews are not a single undifferentiated image.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-05 17:56:05 +02:00
4Ventures
f3380b9650 chore: remove temporary auth debug endpoint after login fix
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-05 17:17:53 +02:00
4Ventures
c82cc32278 fix: add temporary /api/debug/session to diagnose auth cookies
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-05 16:36:51 +02:00
4Ventures
bb5f721b38 fix: restore login by dropping broken Supabase Kong rewrite
Middleware getUser() could not validate the session cookie via the
internal Docker hostname, so auth succeeded in the browser but kept
redirecting back to /login stuck on "Verificando".

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-05 16:14:00 +02:00
4Ventures
a6509bb89c fix: Google Ads via marketing@ OAuth first; harden Clientify webhooks
Prefer agency google_drive+ads token over stale env refresh to avoid
PERMISSION_DENIED, and accept Clientify contact_id/deal_id payload aliases.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-05 12:26:48 +02:00
Marcos Fargas
ec7f1f05de chore: remove 'datos del ... al ...' subtitle from channel headers in KPIs page 2026-10-05 01:13:19 +02:00
Marcos Fargas
821519611d fix: use exact Windsor.ai field names for LinkedIn Pages organic metrics 2026-10-05 01:05:51 +02:00
Marcos Fargas
777c4f9dfa feat: connect Google My Business and LinkedIn metrics via Windsor.ai API 2026-10-05 00:53:10 +02:00
Marcos Fargas
12f9c3cd1e chore: place KPIs tab right after Resumen in navigation menu 2026-10-05 00:44:22 +02:00
Marcos Fargas
36d9e059a3 feat: map instagram and facebook metrics and published posts from integrations social_cache 2026-10-05 00:38:15 +02:00
Marcos Fargas
6e81302c89 fix: use service role for fetching and correct ga4/gsc column mappings 2026-10-04 23:51:28 +02:00
Marcos Fargas
669b9dd056 fix: correct column names for ad_daily query and parsing 2026-10-04 23:36:31 +02:00
Marcos Fargas
d56ba63f17 fix: use dynamic tenant_id from user session for html dashboard 2026-10-04 23:30:30 +02:00
Marcos Fargas
fff5bf1ca2 fix: complete KPI HTML dashboard integration (mock window.claude, add ig.fol, map piezas, pass wData) 2026-10-04 23:18:30 +02:00
Marcos Fargas
630a70c533 fix: add missing fb and li sources to K object for html dashboard 2026-10-04 22:08:32 +02:00
Marcos Fargas
6bfd8a117f feat: add blue parrot static html kpis dashboard connected to windsor data 2026-10-04 21:16:35 +02:00
Marcos Fargas
e07f21c674 feat(kpis): agregar seccion Windsor.ai de blueparrotschool.com debajo de Cruce por canal 2026-10-04 19:58:33 +02:00
Marcos Fargas
e84310ec52 fix(build): carga de fuente sin dependencia externa en docker build 2026-10-04 19:34:02 +02:00
Marcos Fargas
2f6e50d5a7 feat(panel-cliente): soporte de filtrado mensual, histórico instagram ene-sep 2026 y enlaces a publicaciones 2026-10-04 19:31:11 +02:00
Marcos Fargas
a3a2e4b62b fix(build): allow fallback select without link_clicks and ensure unique constraint in creative_pipeline 2026-10-04 01:07:44 +02:00
Claude
ed18c9d318 feat: panel de creatividades (pipeline editorial) en /dashboard/panel-cliente
Nueva tabla creative_pipeline (separada de creatives, que es solo para
anuncios aprobados Meta/Google): Propuesta -> En diseño -> Revisión
interna -> Aprobado/Rechazado -> Publicado, con RLS por tenant.

- sql/creative_pipeline.sql: esquema + políticas RLS
- /api/creative-pipeline: CRUD con transiciones restringidas (el cliente
  solo puede aprobar/rechazar una pieza en revisión interna; el resto de
  movimientos y la creación son solo agencia)
- /api/creative-pipeline/upload + /media: portada y slides de carrusel
  sobre el bucket privado tenant-assets ya existente
- CreativePipelineBoard: tablero agrupado por mes, con subida de imagen
  inline y acciones según rol
- Alta del módulo "Panel de Creatividades" en tenant-modules y sidebar

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WqGTGPznxTp8mwMg6Yv4Ew
2026-10-04 00:22:03 +02:00
4Ventures
e3180ceb51 feat: sync Clientify CRM + botón Sincronizar por pestaña
El CRM solo vivía de webhooks; ahora hay pull Clientify, cron daily-sync incluye CRM, y cada módulo de Agencia tiene sync manual.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-30 15:34:40 +02:00
4Ventures
8c5acb626f feat: columna ad_daily.link_clicks (Meta clics enlace reales)
Persistimos link_clicks en warehouse (con backfill desde __lc), sync escribe la columna y creatividades la leen sin romper si falta.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-29 10:50:55 +02:00
4Ventures
82a910330d 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>
2026-09-29 09:36:41 +02:00
4Ventures
a75f3ae30c perf: creatividades warehouse-first + aviso OAuth Ads Production
Carga métricas desde ad_daily al instante (mode=fast) y enriquece previews en vivo; la UI de Agencia avisa si falta scope Ads o consent Testing.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-29 09:35:45 +02:00
4Ventures
939c4a3131 fix: Meta creatividades nunca fallan — retries, ventanas cortas y fallback silencioso
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-29 02:06:28 +02:00
4Ventures
9270584934 fix: Meta Ads muestra clics todos y clics enlace (y ambos CPC)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-29 01:51:45 +02:00
4Ventures
990915a051 fix: Superhuman sync solo agencia — mensaje claro y botón oculto a cliente
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-28 18:05:17 +02:00
4Ventures
87c887294d fix: Social FB posts sin likes/comments.summary (evita error #10 Meta)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-28 15:15:07 +02:00
4Ventures
aa41594e1e fix: Social — métricas IG total_value, posts en formato original y tamaño
Rellena views/perfil/clics/interacciones con metric_type=total_value y series día a día; carruseles/vídeos/reels con aspect ratio y px originales.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-28 14:31:12 +02:00
4Ventures
530b5ac5ae fix: Social IG/FB con métricas Meta vigentes y creatividades Ad Tracker
Quita copy "Paid ads en Ads", migra Page Insights a page_media_view/page_follows y resuelve creatividades Meta a nivel anuncio.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-28 14:19:58 +02:00
4Ventures
4a9c2139f7 fix: KPIs leen ad_daily desde ene 2025 para YoY completo
El lookback fijo de 420 días cortaba el histórico; ahora cubre desde 2025-01-01.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-28 13:02:40 +02:00
4Ventures
062c43325d fix: ventas KPI = Online Clientify (89) y atribución por fuente real
Excluye Málaga del cohort; enriquece source desde lead/Clientify para que el cruce ads vs CRM deje de volcar todo en sin-atribuir.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-28 12:19:57 +02:00
4Ventures
48fb31d247 fix: alinear KPIs BPS al milímetro con Ads Manager y Clientify Online
Meta solo cuenta registration leads; Google guarda fracciones y redondea al sumar; ventas CRM usan pipeline Online con importe > 0.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-28 12:10:09 +02:00
4Ventures
4c8042aa23 fix: KPIs — ocultar WoW >7d, YoY con histórico completo, ventas en nº
Pagina ad_daily (~420d) para que YoY no quede vacío; Ventas muestra
conteo de deals (importe Clientify en hint/columna Importe).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-28 11:05:21 +02:00
4Ventures
dff9c46747 fix: excluir scripts del typecheck de Next para desbloquear el build
El deploy fallaba tipando scripts/sync_* (dotenv). También tipa el
fallback de select leads en KPIs/CRM.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-28 10:41:52 +02:00
4Ventures
cf27eba74d feat: KPIs con totales absolutos, backfill ads y ventas en cruce canal
Comparativas WoW/MoM/YoY muestran prev/Δ además del %; sync ads admite
histórico desde 2025; tabla ads↔CRM añade cierres, ventas y ROAS.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-28 10:23:36 +02:00
4Ventures
dd50251de2 feat: editor enriquecido en notas de Seguimiento
Barra tipo Docs (negrita, color, resaltado, listas, enlaces, tamaño) al crear notas.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-24 17:35:42 +02:00
4Ventures
9f30aa6820 fix: narrowing de posts en Social API
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-24 17:31:36 +02:00
4Ventures
b0d19e4da5 fix: tipado Social al mezclar posts FB/IG
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-24 17:31:02 +02:00
4Ventures
5e5fc87710 feat: Social con gráficas diarias por periodo y token Meta 4V2030
Series IG/FB (alcance, impresiones, clics, engagement, fans) según el rango del header; Meta y Google quedan como tokens separados.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-24 17:30:44 +02:00