cdp-edge 2.5.6 → 2.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -8
- package/contracts/agent-versions.json +2 -2
- package/contracts/api-versions.json +8 -8
- package/extracted-skill/tracking-events-generator/INSTALACAO-CDPEDGE.md +2 -2
- package/extracted-skill/tracking-events-generator/INTEGRACAO-COMPLETA.md +3 -3
- package/extracted-skill/tracking-events-generator/Premium-Tracking-Intelligence-Resumo.md +1 -1
- package/extracted-skill/tracking-events-generator/SKILL.md +4 -4
- package/extracted-skill/tracking-events-generator/advanced-matching.js +1 -1
- package/extracted-skill/tracking-events-generator/agents/attribution-agent.md +3 -3
- package/extracted-skill/tracking-events-generator/agents/browser-tracking.md +2 -2
- package/extracted-skill/tracking-events-generator/agents/code-guardian-agent.md +2 -2
- package/extracted-skill/tracking-events-generator/agents/debug-agent.md +1 -1
- package/extracted-skill/tracking-events-generator/agents/intelligence-agent.md +6 -6
- package/extracted-skill/tracking-events-generator/agents/master-orchestrator.md +12 -12
- package/extracted-skill/tracking-events-generator/agents/match-quality-agent.md +1 -1
- package/extracted-skill/tracking-events-generator/agents/memory-agent.md +8 -8
- package/extracted-skill/tracking-events-generator/agents/meta-agent.md +8 -8
- package/extracted-skill/tracking-events-generator/agents/page-analyzer.md +1 -1
- package/extracted-skill/tracking-events-generator/agents/premium-tracking-intelligence-agent.md +1 -1
- package/extracted-skill/tracking-events-generator/agents/security-enterprise-agent.md +1 -1
- package/extracted-skill/tracking-events-generator/agents/server-tracking.md +9 -9
- package/extracted-skill/tracking-events-generator/agents/spotify-agent.md +1 -1
- package/extracted-skill/tracking-events-generator/agents/tracking-plan-agent.md +5 -5
- package/extracted-skill/tracking-events-generator/agents/validator-agent.md +8 -8
- package/extracted-skill/tracking-events-generator/agents/webhook-agent.md +4 -4
- package/extracted-skill/tracking-events-generator/agents/whatsapp-agent.md +7 -7
- package/extracted-skill/tracking-events-generator/agents/whatsapp-ctwa-setup-agent.md +16 -16
- package/extracted-skill/tracking-events-generator/agents/zapman-agent.md +189 -0
- package/extracted-skill/tracking-events-generator/cdpTrack.js +1 -1
- package/extracted-skill/tracking-events-generator/contracts/api-versions.json +8 -8
- package/extracted-skill/tracking-events-generator/docs/guia-cloudflare-iniciante.md +2 -2
- package/extracted-skill/tracking-events-generator/evals/evals.json +5 -5
- package/extracted-skill/tracking-events-generator/knowledge-base.md +5 -5
- package/extracted-skill/tracking-events-generator/models/captura-de-lead.md +1 -1
- package/extracted-skill/tracking-events-generator/models/checkout-proprio.md +1 -1
- package/extracted-skill/tracking-events-generator/models/lancamento-imobiliario.md +1 -1
- package/extracted-skill/tracking-events-generator/models/multi-step-checkout.md +5 -5
- package/extracted-skill/tracking-events-generator/models/pagina-obrigado.md +1 -1
- package/extracted-skill/tracking-events-generator/models/trafego-direto.md +4 -4
- package/extracted-skill/tracking-events-generator/models/webinar-registration.md +1 -1
- package/package.json +1 -1
- package/server-edge-tracker/INSTALAR.md +3 -3
- package/server-edge-tracker/index.ts +37 -36
- package/server-edge-tracker/modules/db.ts +1 -1
- package/server-edge-tracker/modules/dispatch/crm.ts +26 -363
- package/server-edge-tracker/modules/dispatch/meta.ts +2 -2
- package/server-edge-tracker/modules/dispatch/whatsapp.ts +7 -18
- package/server-edge-tracker/modules/intelligence.ts +4 -4
- package/server-edge-tracker/modules/nurture.ts +1 -1
- package/server-edge-tracker/schema.sql +1 -1
- package/server-edge-tracker/types.ts +6 -8
- package/server-edge-tracker/wrangler.toml +143 -140
- package/templates/captura-de-lead.md +1 -1
- package/templates/checkout-proprio.md +1 -1
- package/templates/lancamento-imobiliario.md +1 -1
- package/templates/multi-step-checkout.md +5 -5
- package/templates/pagina-obrigado.md +1 -1
- package/templates/trafego-direto.md +4 -4
- package/templates/webinar-registration.md +1 -1
- package/extracted-skill/tracking-events-generator/agents/evo-crm-agent.md +0 -253
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# 🚀 CDP Edge — Quantum Tracking Enterprise
|
|
2
2
|
**Padrão Quantum Tracking: 100% Cloudflare Edge.** Sem GTM. Sem Stape. Sem cookies de terceiros.
|
|
3
3
|
|
|
4
|
-
> **v2.5.
|
|
4
|
+
> **v2.5.7** — Fraud Gate parametrizável: geo-fence + datacenter kill-switch + threshold configurável (30 de Abril de 2026) 🛡️
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -41,7 +41,7 @@ POST /track (QuizComplete)
|
|
|
41
41
|
├─ [3] 🔮 A/B LTV Sorting (KV cache ~0ms)
|
|
42
42
|
├─ [4] 🧮 LTV Prediction (Granite 4.0 Micro) — intent qualificado → High LTV
|
|
43
43
|
├─ [5] 💾 D1 Writes background (quiz_sessions + leads + nurture_sequences)
|
|
44
|
-
└─ [6] 📡 CAPI paralelo (Meta
|
|
44
|
+
└─ [6] 📡 CAPI paralelo (Meta v25.0 + GA4 + TikTok v1.3)
|
|
45
45
|
|
|
46
46
|
Cron semanal (Intelligence Agent):
|
|
47
47
|
├─ ROAS Feedback — cruza leads × purchases por campanha → bid recommendation
|
|
@@ -110,7 +110,7 @@ v_leads_segmented v_ltv_feedback
|
|
|
110
110
|
| Enterprise | `bidding-agent.md` | Bids ML por segmento |
|
|
111
111
|
| Enterprise | `ab-ltv-agent.md` | A/B testing de prompts LTV |
|
|
112
112
|
| Enterprise | `fraud-detection-agent.md` | Detecção de fraude na borda |
|
|
113
|
-
| Infraestrutura | `
|
|
113
|
+
| Infraestrutura | `zapman-agent.md` | Roteamento de leads p/ ZapMan SDR (Kanban + webhook IA) |
|
|
114
114
|
| Monitoramento | `intelligence-agent.md` | Cron — ROAS, Nurture, Lookalike, LTV training |
|
|
115
115
|
|
|
116
116
|
---
|
|
@@ -123,7 +123,7 @@ v_leads_segmented v_ltv_feedback
|
|
|
123
123
|
| `/track` | POST | Evento principal — Fraud Gate → Quiz Scoring → LTV → CAPI |
|
|
124
124
|
| `/health` | GET | Smoke test D1 + KV + AI |
|
|
125
125
|
| `/webhook/ticto` | POST | Purchase webhook (HMAC) |
|
|
126
|
-
| `/webhook/whatsapp` | POST | Webhook Meta WhatsApp →
|
|
126
|
+
| `/webhook/whatsapp` | POST | Webhook Meta WhatsApp → ZapMan SDR |
|
|
127
127
|
| `/export/customer-match` | GET | Export leads para Google Ads |
|
|
128
128
|
| `/validate-install` | GET | Diagnóstico pós-deploy |
|
|
129
129
|
|
|
@@ -184,10 +184,7 @@ wrangler d1 execute cdp-edge-db --file=schema-sales-engine.sql --remote
|
|
|
184
184
|
wrangler secret put META_ACCESS_TOKEN
|
|
185
185
|
wrangler secret put GA4_API_SECRET
|
|
186
186
|
wrangler secret put TIKTOK_ACCESS_TOKEN
|
|
187
|
-
wrangler secret put
|
|
188
|
-
wrangler secret put EVO_CRM_CLIENT_ID
|
|
189
|
-
wrangler secret put EVO_CRM_CLIENT_SECRET
|
|
190
|
-
wrangler secret put EVO_CRM_INBOX_ID
|
|
187
|
+
wrangler secret put ZAPMAN_API_KEY
|
|
191
188
|
|
|
192
189
|
# Deploy
|
|
193
190
|
wrangler deploy
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_comment": "Fonte de verdade para versões dos agent files. Atualizar quando modules/ ou index.ts mudarem. Use scripts/validate-agents.js para detectar drifts.",
|
|
3
|
-
"worker_version": "2.5.
|
|
3
|
+
"worker_version": "2.5.7",
|
|
4
4
|
"worker_hash_date": "2026-04-30",
|
|
5
5
|
"agents": {
|
|
6
6
|
"master-orchestrator": {
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"contracts/api-versions.json:meta"
|
|
45
45
|
],
|
|
46
46
|
"critical_sections": [
|
|
47
|
-
"Meta CAPI version
|
|
47
|
+
"Meta CAPI version v25.0",
|
|
48
48
|
"endpoint pattern",
|
|
49
49
|
"event names"
|
|
50
50
|
],
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
|
|
16
16
|
"versions": {
|
|
17
17
|
"pixel": {
|
|
18
|
-
"current": "
|
|
18
|
+
"current": "v25.0",
|
|
19
19
|
"minimum_supported": "v21.0",
|
|
20
|
-
"recommended": "
|
|
20
|
+
"recommended": "v25.0",
|
|
21
21
|
"deprecated": ["v20.0", "v21.0"],
|
|
22
22
|
"deprecated_cutoff": {
|
|
23
23
|
"v20.0": "2024-01-01T00:00:00.000Z",
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
},
|
|
27
27
|
|
|
28
28
|
"capi": {
|
|
29
|
-
"current": "
|
|
29
|
+
"current": "v25.0",
|
|
30
30
|
"minimum_supported": "v21.0",
|
|
31
|
-
"recommended": "
|
|
31
|
+
"recommended": "v25.0",
|
|
32
32
|
"endpoint_pattern": "https://graph.facebook.com/{VERSION}/{PIXEL_ID}/events",
|
|
33
33
|
"authentication": "Bearer token (META_ACCESS_TOKEN)",
|
|
34
34
|
"rate_limits": {
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
},
|
|
40
40
|
|
|
41
41
|
"messenger": {
|
|
42
|
-
"current": "
|
|
42
|
+
"current": "v25.0",
|
|
43
43
|
"minimum_supported": "v21.0",
|
|
44
|
-
"recommended": "
|
|
45
|
-
"whatsapp_cloud_api": "
|
|
44
|
+
"recommended": "v25.0",
|
|
45
|
+
"whatsapp_cloud_api": "v25.0"
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
},
|
|
@@ -322,7 +322,7 @@
|
|
|
322
322
|
"new_parameters": [],
|
|
323
323
|
"deprecated_parameters": [],
|
|
324
324
|
"migration_steps": [
|
|
325
|
-
"Atualizar endpoint de /v20.0/ para /
|
|
325
|
+
"Atualizar endpoint de /v20.0/ para /v25.0/",
|
|
326
326
|
"Verificar novos parâmetros obrigatórios",
|
|
327
327
|
"Testar em ambiente de sandbox"
|
|
328
328
|
]
|
|
@@ -28,12 +28,12 @@ O **CDP Edge** é um sistema de tracking digital completo que opera de forma nat
|
|
|
28
28
|
| **cdpTrack.js** | SDK do Site | Envio direto via Fetch para o Worker |
|
|
29
29
|
| **Workers** | Processamento | Execução na borda com baixa latência |
|
|
30
30
|
| **D1 Database** | Persistência | Armazenamento seguro de leads e eventos |
|
|
31
|
-
| **CAPI
|
|
31
|
+
| **CAPI v25.0** | Despacho | Atribuição de alta qualidade via servidor |
|
|
32
32
|
|
|
33
33
|
### Plataformas Suportadas (Server-Side)
|
|
34
34
|
| Plataforma | Status | Protocolo |
|
|
35
35
|
|---|---|---|
|
|
36
|
-
| Meta / Facebook Pixel | ✅ | ✅ CAPI
|
|
36
|
+
| Meta / Facebook Pixel | ✅ | ✅ CAPI v25.0 |
|
|
37
37
|
| Google Analytics 4 | ✅ | ✅ Measurement Protocol |
|
|
38
38
|
| Google Ads | ✅ | ✅ Conversão + User-provided Data |
|
|
39
39
|
| TikTok Pixel | ✅ | ✅ Events API v1.3 |
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
┌────────┐ ┌────────┐ ┌─────────┐
|
|
47
47
|
│ Meta │ │ Google │ │ TikTok │
|
|
48
48
|
│ CAPI │ │ GA4 MP │ │ Events API│
|
|
49
|
-
│
|
|
49
|
+
│ v25.0 │ │ │ │ v1.3 │
|
|
50
50
|
└────────┘ └────────┘ └─────────┘
|
|
51
51
|
```
|
|
52
52
|
|
|
@@ -291,7 +291,7 @@ Sync Identity Graph (D1)
|
|
|
291
291
|
↓
|
|
292
292
|
Calculate Server-Side Engagement Score (0-5.0 com histórico)
|
|
293
293
|
↓
|
|
294
|
-
Dispatch para Meta CAPI
|
|
294
|
+
Dispatch para Meta CAPI v25.0 (com engagement score + advanced matching)
|
|
295
295
|
↓
|
|
296
296
|
Dispatch para Google GA4 MP (com engagement score)
|
|
297
297
|
↓
|
|
@@ -323,7 +323,7 @@ Cidade, estado, zip, dob NÃO são hashados (Meta AM)
|
|
|
323
323
|
↓
|
|
324
324
|
Calculate Engagement Score (com PII + histórico)
|
|
325
325
|
↓
|
|
326
|
-
Dispatch para Meta CAPI
|
|
326
|
+
Dispatch para Meta CAPI v25.0:
|
|
327
327
|
user_data: {
|
|
328
328
|
em: [sha256_email],
|
|
329
329
|
ph: [sha256_phone_ddi55],
|
|
@@ -177,7 +177,7 @@ WORKER RECEBE PAYLOAD
|
|
|
177
177
|
[4] Log Behavioral → Grava behavioral_events no D1
|
|
178
178
|
↓
|
|
179
179
|
DISPATCH MULTIPLATAFORMA
|
|
180
|
-
├──▶ META CAPI
|
|
180
|
+
├──▶ META CAPI v25.0
|
|
181
181
|
│ └── user_data: { em, ph, fn, ln, ct, st, zp, db }
|
|
182
182
|
│ └── custom_data: { engagement_score, intention_level, ... }
|
|
183
183
|
├──▶ GOOGLE GA4 MP
|
|
@@ -3,13 +3,13 @@ name: cdp-edge
|
|
|
3
3
|
description: >
|
|
4
4
|
CDP Edge — Sistema multi-agente para Quantum Tracking.
|
|
5
5
|
Arquitetura Cloudflare Native (Workers + D1).
|
|
6
|
-
Gera tracking para Meta (CAPI
|
|
6
|
+
Gera tracking para Meta (CAPI v25.0), TikTok (API v1.3), GA4 (MP) e Spotify (v1).
|
|
7
7
|
**Human-Behavior Engine**: Captura rage clicks, tab focus, heatmaps (D1) e pulse heartbeat nativamente.
|
|
8
8
|
**Niche AI**: Detecção automática de cenários (Imobiliário, Vendas, SaaS) para injeção estratégica.
|
|
9
9
|
Possui agentes especialistas para análise de página, arquitetura de servidor e validação rigorosa.
|
|
10
10
|
|
|
11
11
|
Use SEMPRE que o usuário pedir: pixel, tracking, CAPI, Cloudflare, rastrear conversão,
|
|
12
|
-
"configura meu servidor", "
|
|
12
|
+
"configura meu servidor", "v25.0" ou "rastreamento nativo".
|
|
13
13
|
---
|
|
14
14
|
|
|
15
15
|
# CDP Edge — Quantum Tracking
|
|
@@ -34,7 +34,7 @@ O CDP Edge é um sistema de rastreamento focado em **atribuição direta** no ec
|
|
|
34
34
|
graph TD
|
|
35
35
|
A[Browser: cdpTrack SDK] -->|Fetch API| B[Cloudflare Workers]
|
|
36
36
|
B -->|Persistência| C[Cloudflare D1 Database]
|
|
37
|
-
B -->|CAPI
|
|
37
|
+
B -->|CAPI v25.0| D[Meta API]
|
|
38
38
|
B -->|v1.3| E[TikTok API]
|
|
39
39
|
B -->|MP| F[GA4 Collect]
|
|
40
40
|
```
|
|
@@ -133,7 +133,7 @@ Seguir o fluxo definido nesse arquivo. Ele define todas as fases: perguntas, an
|
|
|
133
133
|
### /setup — Configuração Quantum
|
|
134
134
|
Inicia o fluxo de perguntas, análise de projeto e geração de infraestrutura Cloudflare.
|
|
135
135
|
|
|
136
|
-
### /server — Gerar Worker
|
|
136
|
+
### /server — Gerar Worker v25.0
|
|
137
137
|
Gera apenas o código do `worker.js` com suporte a Meta CAPI e TikTok API v1.3.
|
|
138
138
|
|
|
139
139
|
---
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* ADVANCED MATCHING MAXIMUM - CDP Edge (Quantum Tier)
|
|
3
3
|
*
|
|
4
4
|
* Sistema de normalização e hashing de PII (Personally Identifiable Information)
|
|
5
|
-
* para máxima precisão de atribuição em Meta CAPI
|
|
5
|
+
* para máxima precisão de atribuição em Meta CAPI v25.0.
|
|
6
6
|
*
|
|
7
7
|
* @version 1.0.0
|
|
8
8
|
*/
|
|
@@ -23,7 +23,7 @@ Browser (Cliente) Worker (Server-Side) APIs (Meta/Google/TikT
|
|
|
23
23
|
│ ├─► Persistir no D1 │
|
|
24
24
|
│ ├─► Enviar para APIs com │
|
|
25
25
|
│ │ atribuição calculada │
|
|
26
|
-
│ │ (Meta CAPI
|
|
26
|
+
│ │ (Meta CAPI v25.0) │
|
|
27
27
|
│ │ (TikTok v1.3) │
|
|
28
28
|
│ │ (GA4 MP) │
|
|
29
29
|
│ │ │
|
|
@@ -769,8 +769,8 @@ async function sendMetaPurchaseWithAttribution(purchaseData, attribution) {
|
|
|
769
769
|
}
|
|
770
770
|
};
|
|
771
771
|
|
|
772
|
-
// Enviar via Meta CAPI
|
|
773
|
-
const response = await fetch('https://graph.facebook.com/
|
|
772
|
+
// Enviar via Meta CAPI v25.0
|
|
773
|
+
const response = await fetch('https://graph.facebook.com/v25.0/events', {
|
|
774
774
|
method: 'POST',
|
|
775
775
|
headers: {
|
|
776
776
|
'Authorization': `Bearer ${env.META_ACCESS_TOKEN}`,
|
|
@@ -72,7 +72,7 @@ Implementado via `anti-blocking.js`:
|
|
|
72
72
|
## 🛠️ CRITÉRIOS DE VALIDAÇÃO (Quantum Tier)
|
|
73
73
|
|
|
74
74
|
### PASSO 1 — API Versions
|
|
75
|
-
- Verificar versões compatíveis (Meta
|
|
75
|
+
- Verificar versões compatíveis (Meta v25.0+, TikTok v1.3+, Google GA4 MP, Spotify v1)
|
|
76
76
|
- Consultar `contracts/api-versions.json`
|
|
77
77
|
|
|
78
78
|
### PASSO 2 — Coerência com Page Analyzer
|
|
@@ -300,7 +300,7 @@ document.getElementById('buy-btn').addEventListener('click', function() {
|
|
|
300
300
|
</script>
|
|
301
301
|
```
|
|
302
302
|
|
|
303
|
-
> **Nota:** O Worker recebe os dados crus, aplica SHA-256, e despacha para Meta CAPI
|
|
303
|
+
> **Nota:** O Worker recebe os dados crus, aplica SHA-256, e despacha para Meta CAPI v25.0, GA4 MP, TikTok Events API v1.3 e demais plataformas configuradas — tudo em paralelo via `Promise.allSettled`.
|
|
304
304
|
|
|
305
305
|
---
|
|
306
306
|
|
|
@@ -49,7 +49,7 @@ SHA-256 ausente em dados PII enviados para CAPI
|
|
|
49
49
|
|
|
50
50
|
### APIs Desatualizadas
|
|
51
51
|
```
|
|
52
|
-
Meta CAPI <
|
|
52
|
+
Meta CAPI < v25.0
|
|
53
53
|
TikTok Events API < v1.3
|
|
54
54
|
GA4 endpoint incorreto
|
|
55
55
|
```
|
|
@@ -87,7 +87,7 @@ Antes de qualquer commit, verificar automaticamente:
|
|
|
87
87
|
- [ ] event_id gerado com prefixo `cdp_`
|
|
88
88
|
- [ ] PII hasheado com SHA-256 antes de enviar para APIs externas
|
|
89
89
|
- [ ] Nenhum secret hardcoded (usar `env.SECRET_NAME`)
|
|
90
|
-
- [ ] Versões de API: Meta
|
|
90
|
+
- [ ] Versões de API: Meta v25.0+, TikTok v1.3+
|
|
91
91
|
- [ ] wrangler.toml atualizado se novos bindings foram adicionados
|
|
92
92
|
- [ ] INDEX.md atualizado se novos agentes foram criados
|
|
93
93
|
- [ ] package.json version bumped se mudança significativa
|
|
@@ -80,7 +80,7 @@ async function dispatchEventToMeta(event, userContext) {
|
|
|
80
80
|
const startTime = Date.now();
|
|
81
81
|
|
|
82
82
|
try {
|
|
83
|
-
const response = await fetch('https://graph.facebook.com/
|
|
83
|
+
const response = await fetch('https://graph.facebook.com/v25.0/events', {
|
|
84
84
|
method: 'POST',
|
|
85
85
|
headers: { 'Authorization': `Bearer ${env.META_ACCESS_TOKEN}` },
|
|
86
86
|
body: JSON.stringify(event)
|
|
@@ -152,7 +152,7 @@ Timestamp: ${new Date().toISOString()}
|
|
|
152
152
|
|
|
153
153
|
// Enviar via WhatsApp Agent
|
|
154
154
|
if (env.WHATSAPP_PHONE_NUMBER_ID && env.ADMIN_PHONE_NUMBER) {
|
|
155
|
-
await fetch(`https://graph.facebook.com/
|
|
155
|
+
await fetch(`https://graph.facebook.com/v25.0/${env.WHATSAPP_PHONE_NUMBER_ID}/messages`, {
|
|
156
156
|
method: 'POST',
|
|
157
157
|
headers: {
|
|
158
158
|
'Content-Type': 'application/json',
|
|
@@ -186,7 +186,7 @@ Quando o Intelligence Agent detectar API desatualizada, emitir alerta estruturad
|
|
|
186
186
|
"api_version_alert": {
|
|
187
187
|
"platform": "meta",
|
|
188
188
|
"severity": "CRITICAL",
|
|
189
|
-
"current_version": "
|
|
189
|
+
"current_version": "v25.0",
|
|
190
190
|
"latest_version": "v23.0",
|
|
191
191
|
"deprecation_date": "2025-06-01",
|
|
192
192
|
"impact": [
|
|
@@ -201,7 +201,7 @@ Quando o Intelligence Agent detectar API desatualizada, emitir alerta estruturad
|
|
|
201
201
|
"estimated_time": "30 minutos"
|
|
202
202
|
},
|
|
203
203
|
"recommended_fix": {
|
|
204
|
-
"step_1": "Atualizar endpoint de /
|
|
204
|
+
"step_1": "Atualizar endpoint de /v25.0/ para /v23.0/",
|
|
205
205
|
"step_2": "Verificar novos parâmetros obrigatórios na documentação",
|
|
206
206
|
"step_3": "Testar em ambiente de sandbox antes de deploy"
|
|
207
207
|
}
|
|
@@ -269,8 +269,8 @@ O Intelligence Agent DEVE verificar se alguma API está prestes a ser descontinu
|
|
|
269
269
|
async function checkApiDepreciations(env) {
|
|
270
270
|
const deprecationSchedule = {
|
|
271
271
|
meta: {
|
|
272
|
-
'v20.0': { deprecated: true, cutoff: '2024-01-01', replacement: '
|
|
273
|
-
'v21.0': { deprecated: true, cutoff: '2024-06-01', replacement: '
|
|
272
|
+
'v20.0': { deprecated: true, cutoff: '2024-01-01', replacement: 'v25.0' },
|
|
273
|
+
'v21.0': { deprecated: true, cutoff: '2024-06-01', replacement: 'v25.0' }
|
|
274
274
|
},
|
|
275
275
|
tiktok: {
|
|
276
276
|
'v1.2': { deprecated: true, cutoff: '2024-03-01', replacement: 'v1.3' }
|
|
@@ -515,7 +515,7 @@ wrangler d1 execute cdp-edge-db --file=schema-sales-engine.sql --remote # Fase 7
|
|
|
515
515
|
},
|
|
516
516
|
"endpoint_manual": "GET /api/intelligence/check",
|
|
517
517
|
"alertas": {
|
|
518
|
-
"canal_primario": "WhatsApp Meta Cloud API
|
|
518
|
+
"canal_primario": "WhatsApp Meta Cloud API v25.0",
|
|
519
519
|
"canal_fallback": "CallMeBot",
|
|
520
520
|
"anti_spam": "24h cooldown por issue"
|
|
521
521
|
},
|
|
@@ -75,7 +75,7 @@ Master Orchestrator (você)
|
|
|
75
75
|
│ └── Fingerprint Agent → salva e resgata origens/UTMs perdidas
|
|
76
76
|
│
|
|
77
77
|
├── 📡 PLATAFORMAS DE ANÚNCIO (server + browser)
|
|
78
|
-
│ ├── Meta Agent → Meta Pixel + CAPI
|
|
78
|
+
│ ├── Meta Agent → Meta Pixel + CAPI v25.0
|
|
79
79
|
│ ├── Google Agent → GA4 + Google Ads Enhanced Conversions
|
|
80
80
|
│ ├── YouTube Agent → YouTube Ads (TrueView, Bumper, gclid/wbraid)
|
|
81
81
|
│ ├── TikTok Agent → TikTok Pixel + Events API v1.3
|
|
@@ -163,7 +163,7 @@ SKILL_BASE: [diretório da skill tracking-events-generator]
|
|
|
163
163
|
├── fingerprint-agent.md ← Fingerprinting LGPD + Salva-UTMs
|
|
164
164
|
│
|
|
165
165
|
├── ── PLATAFORMAS DE ANÚNCIO ──
|
|
166
|
-
├── meta-agent.md ← Meta Pixel + CAPI
|
|
166
|
+
├── meta-agent.md ← Meta Pixel + CAPI v25.0
|
|
167
167
|
├── google-agent.md ← GA4 + Google Ads Enhanced Conversions
|
|
168
168
|
├── youtube-agent.md ← YouTube Ads (TrueView, Bumper, gclid/wbraid)
|
|
169
169
|
├── tiktok-agent.md ← TikTok Pixel + Events API v1.3
|
|
@@ -531,7 +531,7 @@ src/tracking/
|
|
|
531
531
|
|
|
532
532
|
**RESPONSABILIDADE:**
|
|
533
533
|
- Gerar código Meta Pixel (browser via cdpTrack.js)
|
|
534
|
-
- Gerar payload Meta CAPI
|
|
534
|
+
- Gerar payload Meta CAPI v25.0 (server-side)
|
|
535
535
|
- Implementar Advanced Matching (em, ph, fbp, fbc, client_ip_address, client_user_agent)
|
|
536
536
|
- Implementar eventos priorizados para Meta
|
|
537
537
|
- Mapear eventos browser → eventos CAPI
|
|
@@ -541,7 +541,7 @@ src/tracking/
|
|
|
541
541
|
```
|
|
542
542
|
src/tracking/platforms/
|
|
543
543
|
├── meta-pixel.js ← Browser Pixel (cdpTrack.js)
|
|
544
|
-
└── meta-capi.js ← Server CAPI
|
|
544
|
+
└── meta-capi.js ← Server CAPI v25.0 payload
|
|
545
545
|
```
|
|
546
546
|
|
|
547
547
|
**SAÍDA:**
|
|
@@ -561,7 +561,7 @@ src/tracking/platforms/
|
|
|
561
561
|
"fbp_fbc": true,
|
|
562
562
|
"client_ip_user_agent": true
|
|
563
563
|
},
|
|
564
|
-
"api_version": "
|
|
564
|
+
"api_version": "v25.0"
|
|
565
565
|
}
|
|
566
566
|
```
|
|
567
567
|
|
|
@@ -795,7 +795,7 @@ cloudflare/
|
|
|
795
795
|
"intention_levels": ["curioso", "interessado", "comprador"]
|
|
796
796
|
},
|
|
797
797
|
"integracoes": {
|
|
798
|
-
"meta_capi": "
|
|
798
|
+
"meta_capi": "v25.0",
|
|
799
799
|
"google_mp": "GA4 Measurement Protocol",
|
|
800
800
|
"tiktok_api": "v1.3",
|
|
801
801
|
"hashing": "SHA256 WebCrypto",
|
|
@@ -894,7 +894,7 @@ FASE 0 → FASE 1 → FASE 2 → FASE 3 → FASE 4 → FASE 5 → FASE 6 → FAS
|
|
|
894
894
|
|
|
895
895
|
```
|
|
896
896
|
FASE 5 (Geração em paralelo):
|
|
897
|
-
├─ FASE 5-A: Meta Agent (Pixel + CAPI
|
|
897
|
+
├─ FASE 5-A: Meta Agent (Pixel + CAPI v25.0 + WhatsApp CTWA)
|
|
898
898
|
├─ FASE 5-B: Google Agent (GA4 + Measurement Protocol)
|
|
899
899
|
├─ FASE 5-C: TikTok Agent (Pixel + Events API v1.3)
|
|
900
900
|
├─ FASE 5-F: Pinterest Agent (Tag + Conversions API v5)
|
|
@@ -1258,7 +1258,7 @@ Logo após a boas-vindas, exibir:
|
|
|
1258
1258
|
>
|
|
1259
1259
|
> | # | Plataforma | O que será configurado |
|
|
1260
1260
|
> |---|------------|----------------------|
|
|
1261
|
-
> | **1** | **Meta Ads** (Facebook + Instagram) | Pixel browser + CAPI server-side
|
|
1261
|
+
> | **1** | **Meta Ads** (Facebook + Instagram) | Pixel browser + CAPI server-side v25.0 + WhatsApp CTWA |
|
|
1262
1262
|
> | **2** | **Google Ads + GA4** | gtag browser + Measurement Protocol server-side + Enhanced Conversions |
|
|
1263
1263
|
> | **3** | **TikTok Ads** | Pixel browser + Events API server-side v1.3 + Advanced Matching |
|
|
1264
1264
|
> | **4** | **Pinterest Ads** | Tag browser + Conversions API server-side v5 |
|
|
@@ -1778,7 +1778,7 @@ Antes de spawnar agentes em paralelo, seguir esta ordem **OBRIGATÓRIA**:
|
|
|
1778
1778
|
2. **UTM Agent** → Gera UTMs obfuscadas para segmentação de valor
|
|
1779
1779
|
3. **Premium Tracking Intelligence Agent** → Define estratégia de tracking (events, micro-events, behavioral signals)
|
|
1780
1780
|
4. **Browser Tracking Agent** → Gera cdpTrack.js com micro-events (scroll, time, video, heatmap)
|
|
1781
|
-
5. **Meta Agent** → Gera código Meta Pixel + CAPI
|
|
1781
|
+
5. **Meta Agent** → Gera código Meta Pixel + CAPI v25.0
|
|
1782
1782
|
6. **Google Agent** → Gera código GA4 + Google Ads
|
|
1783
1783
|
7. **TikTok Agent** → Gera código TikTok Pixel + Events API v1.3
|
|
1784
1784
|
8. **Server Tracking Agent** → Gera Cloudflare Worker + D1 + Queue com engagement scoring
|
|
@@ -2164,7 +2164,7 @@ Apresentar o resultado organizado com resumo de eventos e próximos passos.
|
|
|
2164
2164
|
## 📊 Resumo do Setup
|
|
2165
2165
|
|
|
2166
2166
|
### Plataformas Configuradas:
|
|
2167
|
-
- [x] Meta (Facebook Pixel + CAPI
|
|
2167
|
+
- [x] Meta (Facebook Pixel + CAPI v25.0)
|
|
2168
2168
|
- [x] Google (GA4 + Google Ads Enhanced)
|
|
2169
2169
|
- [x] TikTok (Pixel + Events API v1.3)
|
|
2170
2170
|
|
|
@@ -2304,7 +2304,7 @@ Após entregar o resultado ao usuário, o Master Orchestrator DEVE:
|
|
|
2304
2304
|
"events_mapped": ["Lead", "Purchase", "InitiateCheckout"],
|
|
2305
2305
|
"files_created": ["tracking.js", "index.ts", "schema.sql"],
|
|
2306
2306
|
"api_versions": {
|
|
2307
|
-
"meta": "
|
|
2307
|
+
"meta": "v25.0",
|
|
2308
2308
|
"tiktok": "v1.3",
|
|
2309
2309
|
"google": "GA4_MP"
|
|
2310
2310
|
},
|
|
@@ -2316,7 +2316,7 @@ Após entregar o resultado ao usuário, o Master Orchestrator DEVE:
|
|
|
2316
2316
|
{
|
|
2317
2317
|
"agent": "meta-agent",
|
|
2318
2318
|
"issue": "API version desatualizada",
|
|
2319
|
-
"fix_applied": "Atualizado para
|
|
2319
|
+
"fix_applied": "Atualizado para v25.0"
|
|
2320
2320
|
}
|
|
2321
2321
|
],
|
|
2322
2322
|
"validation_status": {
|
|
@@ -253,7 +253,7 @@ POST /track
|
|
|
253
253
|
├─ autoEnrichPayload() ← MATCH QUALITY AGENT age aqui
|
|
254
254
|
│ → recupera email/fbp/phone do Identity Graph
|
|
255
255
|
├─ buildMetaCAPIPayload()
|
|
256
|
-
├─ fetch Meta CAPI
|
|
256
|
+
├─ fetch Meta CAPI v25.0
|
|
257
257
|
└─ logMatchQuality() em background ← registra flags
|
|
258
258
|
|
|
259
259
|
Cron a cada 2h:
|
|
@@ -167,8 +167,8 @@ O Memory Agent não é só um conceito — ele tem uma implementação técnica
|
|
|
167
167
|
|
|
168
168
|
"api_versions": {
|
|
169
169
|
"meta": {
|
|
170
|
-
"pixel": "
|
|
171
|
-
"capi": "
|
|
170
|
+
"pixel": "v25.0",
|
|
171
|
+
"capi": "v25.0",
|
|
172
172
|
"verified_at": "2025-03-27T14:00:00.000Z"
|
|
173
173
|
},
|
|
174
174
|
"google": {
|
|
@@ -202,7 +202,7 @@ O Memory Agent não é só um conceito — ele tem uma implementação técnica
|
|
|
202
202
|
"verified_at": null
|
|
203
203
|
},
|
|
204
204
|
"whatsapp": {
|
|
205
|
-
"cloud_api": "
|
|
205
|
+
"cloud_api": "v25.0",
|
|
206
206
|
"verified_at": null
|
|
207
207
|
},
|
|
208
208
|
"bing": {
|
|
@@ -312,7 +312,7 @@ O Memory Agent não é só um conceito — ele tem uma implementação técnica
|
|
|
312
312
|
"id": "correction_001",
|
|
313
313
|
"agent": "meta-agent",
|
|
314
314
|
"issue": "API version desatualizada detectada",
|
|
315
|
-
"fix": "Atualizado de v21.0 para
|
|
315
|
+
"fix": "Atualizado de v21.0 para v25.0",
|
|
316
316
|
"fixed_by": "validator-agent (auto)",
|
|
317
317
|
"timestamp": "2025-03-27T14:40:00.000Z",
|
|
318
318
|
"revalidated": true
|
|
@@ -372,7 +372,7 @@ O Memory Agent não é só um conceito — ele tem uma implementação técnica
|
|
|
372
372
|
"type": "api_version_check",
|
|
373
373
|
"platform": "meta",
|
|
374
374
|
"result": "current",
|
|
375
|
-
"details": "Meta CAPI
|
|
375
|
+
"details": "Meta CAPI v25.0 está atualizado",
|
|
376
376
|
"timestamp": "2025-03-27T14:00:00.000Z"
|
|
377
377
|
}
|
|
378
378
|
]
|
|
@@ -616,17 +616,17 @@ Verifique o código existente antes de reimplementar.
|
|
|
616
616
|
|
|
617
617
|
```
|
|
618
618
|
Chat:
|
|
619
|
-
@validator-agent: Vou validar se está usando Meta CAPI
|
|
619
|
+
@validator-agent: Vou validar se está usando Meta CAPI v25.0...
|
|
620
620
|
|
|
621
621
|
Memory Agent (detecta versão inconsistente):
|
|
622
622
|
🔴 VERSÃO INCORRETA!
|
|
623
623
|
|
|
624
624
|
Verificação no Memory Agent:
|
|
625
|
-
- Meta API configurada:
|
|
625
|
+
- Meta API configurada: v25.0
|
|
626
626
|
- Version verify: 2025-03-27T14:00:00Z
|
|
627
627
|
- Agent usando: v21.0
|
|
628
628
|
|
|
629
|
-
AÇÃO CORRETA: Atualizar código para
|
|
629
|
+
AÇÃO CORRETA: Atualizar código para v25.0.
|
|
630
630
|
Intelligence Agent já alertou sobre desatualização.
|
|
631
631
|
```
|
|
632
632
|
|
|
@@ -14,7 +14,7 @@ Especialista exclusivo em Meta Pixel (browser via cdpTrack) + Meta Conversions A
|
|
|
14
14
|
|
|
15
15
|
## 🏗️ ARQUITETURA Quantum Tier
|
|
16
16
|
- **Browser**: Use `cdpTrack.js` para captura direta.
|
|
17
|
-
- **Server**: Cloudflare Worker enviando para `/
|
|
17
|
+
- **Server**: Cloudflare Worker enviando para `/v25.0/{PIXEL_ID}/events`.
|
|
18
18
|
- **Database**: D1 para persistência de `fbp` e `fbc`.
|
|
19
19
|
|
|
20
20
|
---
|
|
@@ -29,9 +29,9 @@ const apiVersions = await readJSON('contracts/api-versions.json');
|
|
|
29
29
|
const metaVersion = apiVersions.meta;
|
|
30
30
|
|
|
31
31
|
// Extrair versões necessárias
|
|
32
|
-
const currentPixelVersion = metaVersion.versions.pixel.current; // "
|
|
33
|
-
const currentCapiVersion = metaVersion.versions.capi.current; // "
|
|
34
|
-
const recommendedVersion = metaVersion.versions.pixel.recommended; // "
|
|
32
|
+
const currentPixelVersion = metaVersion.versions.pixel.current; // "v25.0"
|
|
33
|
+
const currentCapiVersion = metaVersion.versions.capi.current; // "v25.0"
|
|
34
|
+
const recommendedVersion = metaVersion.versions.pixel.recommended; // "v25.0"
|
|
35
35
|
const minimumSupported = metaVersion.versions.pixel.minimum_supported; // "v21.0"
|
|
36
36
|
|
|
37
37
|
// Verificar depreciação
|
|
@@ -58,7 +58,7 @@ cdpTrack.track('Lead', {
|
|
|
58
58
|
});
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
### 2. Server (CAPI
|
|
61
|
+
### 2. Server (CAPI v25.0)
|
|
62
62
|
Gere payloads para o Worker seguir a API oficial da Meta:
|
|
63
63
|
- `action_source`: 'website' (obrigatório)
|
|
64
64
|
- `event_id`: Identidade única compartilhada (deduplicação)
|
|
@@ -70,7 +70,7 @@ Gere payloads para o Worker seguir a API oficial da Meta:
|
|
|
70
70
|
- **Browser**: Use `cdpTrack.js` para captura e despacho direto.
|
|
71
71
|
- **Hashing**: Use `crypto.subtle.digest` (SHA-256) para PII no Worker.
|
|
72
72
|
- **Deduplicação**: Inclua sempre o `event_id` único gerado no browser.
|
|
73
|
-
- **Versão da API**: Utilize estritamente a API **
|
|
73
|
+
- **Versão da API**: Utilize estritamente a API **v25.0**.
|
|
74
74
|
|
|
75
75
|
---
|
|
76
76
|
|
|
@@ -86,7 +86,7 @@ Gere payloads para o Worker seguir a API oficial da Meta:
|
|
|
86
86
|
## RESPONSABILIDADE
|
|
87
87
|
|
|
88
88
|
- Gerar código Meta Pixel browser via `cdpTrack.track()` para todos os eventos mapeados
|
|
89
|
-
- Gerar função `dispatchMetaCapi()` no Worker com CAPI
|
|
89
|
+
- Gerar função `dispatchMetaCapi()` no Worker com CAPI v25.0
|
|
90
90
|
- Implementar Advanced Matching Máximo: `em`, `ph`, `fn`, `ln`, `ct`, `st`, `zp`, `country`, `external_id`, `fbp`, `fbc`
|
|
91
91
|
- Garantir deduplicação browser↔server via `event_id` idêntico
|
|
92
92
|
- Aplicar SHA-256 via WebCrypto API em todos os campos PII antes do dispatch
|
|
@@ -101,7 +101,7 @@ Gere payloads para o Worker seguir a API oficial da Meta:
|
|
|
101
101
|
"browser": "cdpTrack.js (eventos Meta injetados)",
|
|
102
102
|
"server": "modules/dispatch/meta.ts"
|
|
103
103
|
},
|
|
104
|
-
"versao_api": "
|
|
104
|
+
"versao_api": "v25.0",
|
|
105
105
|
"eventos_implementados": ["PageView", "Lead", "InitiateCheckout", "Purchase", "ViewContent"],
|
|
106
106
|
"advanced_matching": {
|
|
107
107
|
"campos": ["em", "ph", "fn", "ln", "ct", "st", "zp", "country", "external_id", "fbp", "fbc"],
|
|
@@ -61,7 +61,7 @@ Antes de mapear elementos, identifique o **modelo de negócio** da página para
|
|
|
61
61
|
---
|
|
62
62
|
|
|
63
63
|
## 🏁 RETORNO JSON
|
|
64
|
-
Retorne o JSON seguindo o padrão `cdpTrack`, focando em `seletores` CSS diretos e `eventos` compatíveis com Meta CAPI
|
|
64
|
+
Retorne o JSON seguindo o padrão `cdpTrack`, focando em `seletores` CSS diretos e `eventos` compatíveis com Meta CAPI v25.0 e TikTok v1.3.
|
|
65
65
|
|
|
66
66
|
## PASSO 6 — Retornar JSON estruturado
|
|
67
67
|
|
package/extracted-skill/tracking-events-generator/agents/premium-tracking-intelligence-agent.md
CHANGED
|
@@ -810,7 +810,7 @@ const serverTracking = {
|
|
|
810
810
|
- [x] Calcular Engagement Score (0.0 - 5.0)
|
|
811
811
|
- [x] Classificar intenção (curioso, interessado, comprador)
|
|
812
812
|
- [x] Hashing de PII (SHA256: email, phone, name, city, state, zip)
|
|
813
|
-
- [x] Despachar para Meta CAPI
|
|
813
|
+
- [x] Despachar para Meta CAPI v25.0 (event_id, user_data, custom_data)
|
|
814
814
|
- [x] Despachar para Google GA4 MP (event_name, user_properties)
|
|
815
815
|
- [x] Despachar para TikTok Events API v1.3 (event, context, properties)
|
|
816
816
|
- [x] Persistir no D1 (Identity Graph + events_log)
|
|
@@ -26,7 +26,7 @@ Browser (Cliente) Worker (Server-Side) APIs (Meta/Google/TikT
|
|
|
26
26
|
│ ├─► [6] Audit Logging ──────┤
|
|
27
27
|
│ ├─► [7] Encryption ─────────────┤
|
|
28
28
|
│ └─► Processar evento ──────────────►│
|
|
29
|
-
│ │ (Meta CAPI
|
|
29
|
+
│ │ (Meta CAPI v25.0) │
|
|
30
30
|
│ │ (TikTok v1.3) │
|
|
31
31
|
│ │ (GA4 MP) │
|
|
32
32
|
│ │ │
|