Autonomous Marketing Operating System — architettura 100% serverless purista progettata per gestire centralmente il marketing di OmniaCoin e VIPTravelScout con supervisione umana garantita.
status: 'pending'. Nessuna chiamata API verso Meta/Google finché l'umano non approva esplicitamente.┌──────────────────────────────────────────────────────────────────┐ │ [CF WORKER] cmo-engine-orchestrator │ │ │ │ INGRESS TRIGGERS │ │ ┌──────────────┐ ┌─────────────────┐ ┌─────────────────┐ │ │ │ Cron /4h │ │ GSC Search API │ │ SST Events │ │ │ └──────┬───────┘ └────────┬────────┘ └────────┬────────┘ │ │ └────────────────────▼───────────────────────┘ │ │ │ │ │ ┌──────────▼──────────┐ │ │ │ DataAggregator() │ ←──── Supabase RPC │ │ │ · KPI storici 30gg │ │ │ │ · Budget spend/ch. │ │ │ │ · Conv rate/ROAS │ │ │ └──────────┬──────────┘ │ │ │ │ │ ┌──────────▼──────────┐ │ │ │ Claude Analyzer() │ ←──── Anthropic API │ │ │ · 3 scenari budget │ │ │ │ · Forecast KPI │ │ │ │ · Ad copy per ch. │ │ │ └──────────┬──────────┘ │ │ │ │ │ ┌──────────▼──────────┐ │ │ │ ProposalWriter() │ ────► Supabase │ │ │ status: pending │ budget_proposals│ │ └──────────┬──────────┘ │ │ │ │ │ ┌──────────▼──────────┐ │ │ │ NotifyAdmin() │ ────► Telegram Bot │ │ └─────────────────────┘ │ └──────────────────────────────────────────────────────────────────┘
// Claude AI Analysis — Modello predittivo 3 scenari async function runClaudeAnalysis(data, tenant, env) { const response = await fetch('https://api.anthropic.com/v1/messages', { method: 'POST', body: JSON.stringify({ model: 'claude-sonnet-4-5', max_tokens: 4096, system: `Sei il CMO AI per ${tenant.portal_name}. Rispondi SOLO con JSON valido. Nessun testo libero.`, messages: [{ role: 'user', content: buildCMOPrompt(data) }] }) }); const result = await response.json(); return JSON.parse(result.content[0].text); // → { scenarios: {low,medium,high} } } // Ogni proposta nasce PAUSED — zero spesa finché status != 'approved' await fetch(`${env.SUPABASE_URL}/rest/v1/budget_proposals`, { method: 'POST', body: JSON.stringify({ tenant_id: tenant.id, scenario_type: 'medium', monthly_budget_eur: 5000, projected_kpis: { roas: 3.2, cpa_eur: 22.5, leads: 450 }, status: 'pending', // ← NESSUNA SPESA expires_at: new Date(Date.now() + 72 * 3600000).toISOString() }) });
budget_proposals con status: 'pending'. Notifica Telegram inviata all'admin con link alla dashboard.PATCH /proposals/:id/approve — JWT verificato via Supabase Auth. Il worker aggiorna lo status e triggera il pipeline in ctx.waitUntil() (non blocca la response)."maldives", "luxury-resort"). Manda a Placid: testo Claude + foto CF Images + template ID → riceve URL immagini on-brand in tutti i formati.status: 'PAUSED'. Zero budget speso. Salva gli ID esterni su Supabase.status: ACTIVE → SOLO ORA inizia la spesa. Status Supabase aggiornato a 'active'.// Campaign creata SEMPRE con status PAUSED — nessuna spesa automatica const campaign = await apiPost(`${baseUrl}/campaigns`, { name: `[OMNISCOUT][DRAFT] ${proposal.tenant_id} - MEDIUM`, objective: 'LEAD_GENERATION', status: 'PAUSED', // ← SEMPRE PAUSED spend_cap: Math.round(proposal.monthly_budget_eur * 0.5 * 100), }); const adSet = await apiPost(`${baseUrl}/adsets`, { campaign_id: campaign.id, status: 'PAUSED', daily_budget: Math.round((proposal.monthly_budget_eur * 0.5 / 30) * 100), targeting: { interests: [{ id: '6003136214740', name: 'Maldives' }], // luxury_travel income: [{ id: '6167250041607' }], // Top 10% income age_min: 35, age_max: 65 } }); // Google Ads: Target CPA automatico in micros const googleCampaign = { status: 'PAUSED', // ← SEMPRE PAUSED biddingStrategyType: 'TARGET_CPA', targetCpa: { targetCpaMicros: 22500000 }, // €22.50 CPA previsto campaignBudget: budgetResourceName };
| Keyword | Score | Intent | Page Type | Traffic Est. | Status |
|---|---|---|---|---|---|
| Soneva Jani vs Velaa Private Island | 87 | commercial | comparison | ~2,400/mo | pending |
| best luxury resorts Maldives 2025 | 81 | commercial | guide | ~5,800/mo | generating |
| Bitcoin price prediction Q4 2025 | 74 | informational | coin_analysis | ~8,200/mo | published |
| Four Seasons Bora Bora overwater bungalow price | 79 | transactional | destination | ~1,600/mo | pending |
| Ethereum staking yield comparison | 68 | commercial | comparison | ~3,100/mo | low priority |
Promise.allSettled() garantisce che il fallimento su un canale non blocchi gli altri. Meta CAPI + Google EC + TikTok Events API in parallelo.// Da includere su ogni portale — no cookie, no dipendenze, no AdBlock (function() { const GATEWAY = 'https://t.omniscout.io/e'; // Session ID effimero: sparisce alla chiusura del tab const sid = sessionStorage.getItem('_os_sid') || (() => { const id = crypto.randomUUID(); sessionStorage.setItem('_os_sid', id); return id; })(); window.OmniScoutTrack = async (eventType, data = {}) => { const payload = { event_type: eventType, event_id: crypto.randomUUID(), // Per dedup server-side session_id: sid, page_url: window.location.href, referrer: document.referrer, fbclid: new URLSearchParams(location.search).get('fbclid'), gclid: new URLSearchParams(location.search).get('gclid'), ...data // { email?, value?, currency?, order_id? } }; await fetch(GATEWAY, { method: 'POST', keepalive: true, headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(payload) }); }; OmniScoutTrack('page_view'); // Auto-fire on load })();