Commit Graph

114 Commits

Author SHA1 Message Date
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
4Ventures
224f060e9d fix: Social FB — Page token + aviso si el Meta token no tiene pages_*
El token de ads no sirve para /posts; intentamos Page Access Token y explicamos los permisos necesarios.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-24 17:26:22 +02:00
4Ventures
04ea6de08a fix: notas Seguimiento Semanal con HTML completo, enlaces y formato
Exporta el Google Doc en HTML, parte por fecha y guarda todo el bloque (listas, negritas, links) sin truncar.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-24 17:20:31 +02:00
4Ventures
751673c341 fix: vídeos en Social y notas Superhuman por día desde Drive
Los docs de seguimiento son Google Docs embebidos: se exportan, se parten por fecha y se acumulan. Social renderiza VIDEO/REELS y trae vídeos de página.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-24 17:09:49 +02:00
4Ventures
06024cf473 feat: auditoría SEO real con histórico y avisos
Crawl técnico (HTTPS/robots/sitemap/on-page) + tabla seo_audits; UI con nota, checks y alertas.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-24 16:55:58 +02:00
4Ventures
4b6f7f1896 feat: Ads KPIs completos, Social feed+analytics, Orgánico por sección
Meta/Google con las mismas métricas que Resumen y solo campañas/ads con actividad en el periodo; Social con insights FB/IG y preview de posts (likes/comentarios/shares); Orgánico con paneles distintos por ítem del menú y prioridades/notas solo en visión general.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-24 16:30:17 +02:00
4Ventures
f4dfc50cc9 feat: calendario bajo Social, SEO/GEO con datos live, Drive = 03-Clientes
Calendario editorial anidado en Social; Orgánico con queries/páginas GSC y landings GA4 + dashboard GEO; Biblioteca enlazada a la carpeta real del cliente bajo 03-Clientes (no carpetas homónimas); previews Ads solo en Meta/Google.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-24 16:12:07 +02:00
4Ventures
3425364b07 feat: periodo global, métricas negocio, seguimiento notas, Drive/Social/Orgánico
Selector de fechas en header (con Personalizado) compartido en el dashboard; Métricas con Ventas/CAC/ROAS CRM, cruce canal y gráficas diarias; Seguimiento solo notas + sync Superhuman; Activos con navegación Drive; Social con métricas IG/FB; Orgánico con prioridades SEO/GEO expertas.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-24 15:45:30 +02:00
4Ventures
ba05626fed feat: menú Ads + Social; Drive por defecto en activos
Renombra Ad Tracker a Ads, añade módulo Social (perfiles RRSS)
y abre Biblioteca en pestaña Drive. Aclara histórico GSC en Orgánico.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-24 13:44:56 +02:00
4Ventures
7ed6e641cb feat: al conectar Google, auto-emparejar Drive/GA4/GSC/Ads en fichas
Bootstrap unificado post-OAuth + botón Emparejar todo. Meta discover
también intenta FB/IG pages con el token system user (API 4V2030).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-24 12:41:51 +02:00
4Ventures
99895fe918 feat: conectar GA4/GSC/Drive desde la ficha (verificar + sync real)
Al guardar ID o URL en el cliente se valida con OAuth de agencia;
Drive acepta URL o folder id; Orgánico se rellena si hay acceso.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-24 12:27:15 +02:00
4Ventures
81ba5df37d fix: ficha no finge sync al guardar IDs; normaliza URL de Drive
«Conectar» en la ficha solo guarda la referencia; last_sync queda
para syncs reales. Drive acepta URL completa → folder id.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-24 12:22:41 +02:00
4Ventures
5501f45a67 fix: guardar OAuth Google con upsert real (PATCH vacío no insertaba)
El callback creía haber guardado el token y fallaba al emparejar Drive
con «no conectado». Upsert on_conflict=provider + match no bloquea OAuth.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-24 12:17:46 +02:00
4Ventures
d137b5796a feat: Orgánico siempre al día (auto-sync al abrir + cron diario)
El botón Sync 28d pasa a «Actualizar ahora»; la vista refresca sola
si faltan datos y hay endpoint /api/cron/organic-sync.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-24 12:10:02 +02:00
4Ventures
aded4c3514 feat: OAuth Google unificado (Drive+GA4+GSC) y sync a Orgánico
Conectar marketing@ con scopes Analytics/GSC; descubrir propiedades,
emparejar fichas y sincronizar organic_daily 28d.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-24 12:04:05 +02:00
4Ventures
81ede58330 feat: suite Orgánico tipo Semrush (SEO + GEO por secciones)
Navegación por visión general, competencia, prompts, percepción,
auditoría, keywords, backlinks y prioridades accionables por cliente.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-24 11:25:32 +02:00
4Ventures
5c90bcf940 feat: vista Orgánico con SEO (GA4/GSC) y GEO (visibilidad IA)
Nueva sección con métricas Search Console/GA4, cimientos SEO y
Share of Model por motor (ChatGPT/Gemini/AI Overviews).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-24 11:18:26 +02:00
4Ventures
dd0e867108 feat: ficha por cliente en portafolio (conexiones, accesos, logo, módulos)
Cada tenant tiene una ficha con plataformas, invitaciones por email,
logo de marca y toggles de módulos visibles en el portal cliente.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-24 10:51:21 +02:00
4Ventures
21051afda9 fix: cohort CAC/ROAS desde deals Clientify y más contraste en dashboards
Los totales de Métricas usaban solo ad_daily (cohort a 0). Ahora suman
deals won; selectores y tipografía ganan contraste sobre fondo blanco.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-24 10:40:12 +02:00
4Ventures
068faa3d25 fix: tema claro blanco, logo 4Ventures y menú original
Fondo blanco en la app; menú con labels/iconos originales; logo en sidebar y login.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-24 09:53:36 +02:00
4Ventures
6d1602bd68 chore: quitar import unused en calendario
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-24 09:44:09 +02:00
4Ventures
bf9a504c40 feat: interfaz clara unificada en Centro de Mando
Shell con nav agrupada y activa, PageHeader común, tipografía y tokens.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-24 09:32:35 +02:00
4Ventures
d05df8c371 fix: previews Meta vía proxy y creatividades Google PMax/RSA
Las imágenes Meta dejan de romperse en el navegador; Google trae assets en vivo.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-23 18:25:48 +02:00
4Ventures
86225a701e feat: previews de creatividades en Ad Tracker (estilo Brava)
Meta Graph en vivo + ficha Google; galería por anuncio en resumen/Meta/Google.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-23 18:16:14 +02:00
4Ventures
be45df300b feat: pestaña CRM con % a cliente por canal y cruce ads vs Clientify
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-23 17:33:41 +02:00
4Ventures
f436276c3e feat: endpoint webhook Clientify para sync en tiempo real
URL pública por tenant (?tenant=slug) para contactos y oportunidades;
middleware permite POST sin sesión.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-23 15:40:41 +02:00
4Ventures
fb313fc38f fix: alinear KPIs con Ad Tracker por días calendario
KPIs filtraba por inicio de semana (omitía días de Sep en la semana
del 31-ago); ahora Mes/7d/30d suman ad_daily día a día como Ad Tracker.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-23 12:38:45 +02:00
4Ventures
fba025da76 fix: mostrar Google Ads desde ad_daily cuando kpi_weekly está vacío
kpi_weekly es una MV de solo lectura sin canales paid; canal/seguimiento
ahora hacen fallback a ad_daily. Bump Google Ads API a v21 en sync.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-23 12:13:41 +02:00
4Ventures
a1a00840d5 feat: sync Meta metrics, objetivos ppto/consecución y simulador por tenant
Rellena ad_daily desde Meta, KPIs con fallback a daily, objetivos de presupuesto vs consecución, y simulador sin TikTok anclado a métricas del cliente.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-23 10:59:15 +02:00
4Ventures
0d286dc66c feat: upload creativos, PMax formats, portada IG/FB y seguimiento con notas
Permite subir media sin URL; previews Google PMax por ratio; calendario anual estilo Miia con filtros IG/FB y LinkedIn; seguimiento con selector de fechas, KPIs y cuadro de notas.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-23 09:33:22 +02:00
4Ventures
a7704567bd feat: preview de placement en pipeline de creatividades
Cada pieza muestra mock Meta/Google Ads o RRSS (feed, Stories, LinkedIn) como el Ad Tracker, con copy, media y canal editables.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-23 03:36:28 +02:00
4Ventures
b4ee23874e feat: RRSS hub estilo Miia + Ad Tracker por cliente
Replica agua-miia/rrss (hub, archivo, octubre 2026 con 27 piezas) y añade Ad Tracker por tenant al estilo Brava (periodos, Meta+Google, CPL/clics, campañas).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-23 02:55:14 +02:00
4Ventures
a1a3c26c30 feat: dual agency/client approval on calendar and assets
Private RRSS calendar with unified + per-network tabs, comments, and
double-check OK. Assets get review drawer with preview/comments. KPIs
gain date presets, North Star strip, channel matrix and per-channel dash.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-23 02:38:44 +02:00
4Ventures
64156383ca feat: interactive seguimiento timeline and channel evolution
Sync Superhuman Docs seguimiento/KPI pages into the portal (never passwords)
and show clients a dynamic timeline plus per-channel kpi_weekly charts.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 21:34:21 +02:00
4Ventures
6607a02bff feat: paste Meta token after App Review; Google-only discover
While Meta review is pending, agency can match Google Ads alone and
paste the system user token later without a redeploy.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 21:11:03 +02:00
4Ventures
c13001c69d feat: auto-discover Meta and Google Ads accounts for tenants
Agency panel lists accessible ad accounts and matches them to
clients by name, same pattern as Drive folders.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 19:24:11 +02:00
4Ventures
eb00256bea feat: add Instagram, Facebook, TikTok and LinkedIn slots
Organic social channels per client in the agency hub, separate from
paid Meta Ads.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 18:58:29 +02:00
4Ventures
670679d09c feat: add WordPress, PrestaShop and Shopify connection slots
Per-client CMS/ecommerce channels in the agency hub with URL/API
placeholders; live sync can come later.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 18:50:25 +02:00
4Ventures
c4c527072f feat: agency control panel for per-client connections
Matrix view of Meta/Google/Drive/Clientify, follow/archive clients,
and per-channel ON/OFF with account IDs in the client hub.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 18:47:29 +02:00
4Ventures
1eb02dac4d feat: Google Drive agency sync with auto folder match
Connect marketing@ once, match Drive folders to tenants by name,
list Drive in Activos, and mirror portal uploads to the linked folder.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 16:27:54 +02:00
4Ventures
31ca77558e fix: keep Activos as file library only
Agent documents (calendar/copy/audit) belong in Calendario/ops, not the asset upload surface.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 15:41:52 +02:00
4Ventures
ce9498e63c feat: upload any validated file to the asset library
Activos now supports multi-file/folder upload to private Storage
(PDF, Excel, CSV, images, ZIP, etc.) with per-tenant folders.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 15:26:33 +02:00
4Ventures
8182402d96 feat: metrics dashboard with WoW/MoM/YoY and creatives pipeline
Rebuild KPIs as a real dashboard (period deltas, tenant zoom), clarify
objetivos/calendario/activos sources, and turn creatives into a status
pipeline with delete.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 13:45:41 +02:00
4Ventures
791976a3d8 feat: agency portfolio with per-client integrations hub
Admin home lists tenants, alerts, and connection health; header
selector enables superadmin context; Meta/GA4/GSC/GTM/CRM/email
slots live per tenant (manual status until OAuth).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 01:31:47 +02:00