@beworke/pixel 0.1.0-rc.6 → 0.1.0-rc.8

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.
Files changed (166) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +71 -56
  3. package/RELEASE_CANDIDATE.md +47 -75
  4. package/dist/Pixel-CCgGk43j.d.ts +797 -0
  5. package/dist/Pixel-CqbgC_72.d.mts +797 -0
  6. package/dist/{StorageFactory-tjfzk57c.d.ts → StorageFactory-BRBsnnH7.d.ts} +2 -2
  7. package/dist/{StorageFactory-CPghDPBj.d.mts → StorageFactory-Dp19Wecr.d.mts} +2 -2
  8. package/dist/browser/index.cjs.js +3 -0
  9. package/dist/browser/index.cjs.js.map +1 -0
  10. package/dist/browser/index.d.mts +55 -0
  11. package/dist/browser/index.d.ts +55 -0
  12. package/dist/browser/index.esm.js +3 -0
  13. package/dist/browser/index.esm.js.map +1 -0
  14. package/dist/browser/pixel.global.js +4 -0
  15. package/dist/browser/pixel.global.js.map +1 -0
  16. package/dist/config/index.cjs.js +1 -1
  17. package/dist/config/index.cjs.js.map +1 -1
  18. package/dist/config/index.d.mts +16 -6
  19. package/dist/config/index.d.ts +16 -6
  20. package/dist/config/index.esm.js +1 -1
  21. package/dist/config/index.esm.js.map +1 -1
  22. package/dist/events/index.cjs.js.map +1 -1
  23. package/dist/events/index.d.mts +2 -2
  24. package/dist/events/index.d.ts +2 -2
  25. package/dist/events/index.esm.js.map +1 -1
  26. package/dist/examples/html-script/README.md +20 -76
  27. package/dist/examples/html-script/RELEASE_CANDIDATE.md +20 -21
  28. package/dist/examples/html-script/add-payment-info/example-add-payment-info-card-autocomplete.html +41 -48
  29. package/dist/examples/html-script/add-payment-info/example-add-payment-info-card-disabled.html +41 -48
  30. package/dist/examples/html-script/add-payment-info/example-add-payment-info-card-fields.html +41 -48
  31. package/dist/examples/html-script/add-payment-info/example-add-payment-info-data-track.html +41 -48
  32. package/dist/examples/html-script/add-payment-info/example-add-payment-info-dedupe.html +41 -48
  33. package/dist/examples/html-script/add-payment-info/example-add-payment-info-manual.html +41 -48
  34. package/dist/examples/html-script/add-payment-info/example-add-payment-info-rules-card.html +41 -48
  35. package/dist/examples/html-script/add-payment-info/example-add-payment-info-security.html +41 -48
  36. package/dist/examples/html-script/add-to-cart/README.md +6 -3
  37. package/dist/examples/html-script/add-to-cart/example-add-to-cart-attribute.html +43 -49
  38. package/dist/examples/html-script/add-to-cart/example-add-to-cart-auto.html +43 -49
  39. package/dist/examples/html-script/add-to-cart/example-add-to-cart-click.html +43 -49
  40. package/dist/examples/html-script/add-to-cart/example-add-to-cart-dedupe.html +43 -49
  41. package/dist/examples/html-script/add-to-cart/example-add-to-cart-link.html +590 -0
  42. package/dist/examples/html-script/add-to-cart/example-add-to-cart-manual.html +43 -49
  43. package/dist/examples/html-script/add-to-cart/example-add-to-cart-order-bump.html +43 -49
  44. package/dist/examples/html-script/add-to-cart/example-add-to-cart-text.html +43 -49
  45. package/dist/examples/html-script/behavior/example-behavior-engagement.html +5 -5
  46. package/dist/examples/html-script/behavior/example-behavior-heartbeat.html +5 -5
  47. package/dist/examples/html-script/behavior/example-behavior-runtime-intelligence.html +5 -5
  48. package/dist/examples/html-script/behavior/example-behavior-viewport.html +5 -5
  49. package/dist/examples/html-script/behavior/example-behavior.html +1 -1
  50. package/dist/examples/html-script/buygoods/example-buygoods-checkout.html +83 -0
  51. package/dist/examples/html-script/example-basic.html +1 -1
  52. package/dist/examples/html-script/example-checkout-commerce.html +32 -31
  53. package/dist/examples/html-script/example-conversion.html +42 -49
  54. package/dist/examples/html-script/example-global-factory-classic.html +45 -0
  55. package/dist/examples/html-script/example-global-factory.html +40 -0
  56. package/dist/examples/html-script/example-integration.html +40 -46
  57. package/dist/examples/html-script/example-landing-commerce.html +45 -9
  58. package/dist/examples/html-script/example-runtime-diagnostics.html +5 -5
  59. package/dist/examples/html-script/example-transport.html +65 -58
  60. package/dist/examples/html-script/full-funnel/README.md +1 -1
  61. package/dist/examples/html-script/full-funnel/checkout.html +4 -2
  62. package/dist/examples/html-script/full-funnel/downsell.html +4 -2
  63. package/dist/examples/html-script/full-funnel/landing.html +57 -3
  64. package/dist/examples/html-script/full-funnel/thank-you.html +4 -2
  65. package/dist/examples/html-script/full-funnel/upsell.html +4 -2
  66. package/dist/examples/html-script/initiate-checkout/example-initiate-checkout-attribute.html +41 -48
  67. package/dist/examples/html-script/initiate-checkout/example-initiate-checkout-auto.html +41 -48
  68. package/dist/examples/html-script/initiate-checkout/example-initiate-checkout-click.html +41 -48
  69. package/dist/examples/html-script/initiate-checkout/example-initiate-checkout-manual.html +41 -48
  70. package/dist/examples/html-script/initiate-checkout/example-initiate-checkout-snapshot.html +41 -48
  71. package/dist/examples/html-script/initiate-checkout/example-initiate-checkout-submit.html +41 -48
  72. package/dist/examples/html-script/initiate-checkout/example-initiate-checkout-text.html +41 -48
  73. package/dist/examples/html-script/lead/example-lead-trigger-attribute.html +41 -48
  74. package/dist/examples/html-script/lead/example-lead-trigger-auto.html +41 -48
  75. package/dist/examples/html-script/lead/example-lead-trigger-click.html +41 -48
  76. package/dist/examples/html-script/release-candidate.html +32 -31
  77. package/dist/examples/html-script/remove-from-cart/README.md +3 -3
  78. package/dist/examples/html-script/remove-from-cart/example-remove-from-cart-attribute.html +41 -48
  79. package/dist/examples/html-script/remove-from-cart/example-remove-from-cart-css.html +41 -48
  80. package/dist/examples/html-script/remove-from-cart/example-remove-from-cart-dedupe.html +48 -55
  81. package/dist/examples/html-script/remove-from-cart/example-remove-from-cart-manual.html +41 -48
  82. package/dist/examples/html-script/remove-from-cart/example-remove-from-cart-multi.html +41 -48
  83. package/dist/examples/html-script/remove-from-cart/example-remove-from-cart-state.html +41 -48
  84. package/dist/examples/html-script/remove-from-cart/example-remove-from-cart-text.html +41 -48
  85. package/dist/examples/html-script/search/example-search-attribute.html +41 -48
  86. package/dist/examples/html-script/search/example-search-button-sync.html +41 -48
  87. package/dist/examples/html-script/search/example-search-dedupe.html +41 -48
  88. package/dist/examples/html-script/search/example-search-input.html +41 -48
  89. package/dist/examples/html-script/search/example-search-manual.html +41 -48
  90. package/dist/examples/html-script/search/example-search-submit.html +41 -48
  91. package/dist/examples/html-script/search/example-search-text.html +41 -48
  92. package/dist/examples/html-script/url-context/example-url-context-allowed-domains.html +38 -9
  93. package/dist/examples/html-script/url-context/example-url-context-landing.html +53 -13
  94. package/dist/examples/html-script/url-context/example-url-context-upsell.html +48 -10
  95. package/dist/examples/html-script/url-context/example-url-context.html +55 -21
  96. package/dist/examples/html-script/view-content/example-view-content-attribute.html +41 -48
  97. package/dist/examples/html-script/view-content/example-view-content-css.html +41 -48
  98. package/dist/examples/html-script/view-content/example-view-content-dedupe.html +41 -48
  99. package/dist/examples/html-script/view-content/example-view-content-empty.html +41 -48
  100. package/dist/examples/html-script/view-content/example-view-content-manual.html +41 -48
  101. package/dist/examples/html-script/view-content/example-view-content-product-card.html +41 -48
  102. package/dist/examples/html-script/view-content/example-view-content-text.html +41 -48
  103. package/dist/examples/release-candidate/README.md +2 -1
  104. package/dist/examples/v2/README.md +15 -15
  105. package/dist/{index-CQAyT5Od.d.ts → index-B8u_3PGG.d.ts} +21 -2
  106. package/dist/{index-JlKPz4pp.d.mts → index-BxT2d-TK.d.mts} +21 -2
  107. package/dist/index.cjs.js +1 -1
  108. package/dist/index.cjs.js.map +1 -1
  109. package/dist/index.d.mts +21 -782
  110. package/dist/index.d.ts +21 -782
  111. package/dist/index.esm.js +1 -1
  112. package/dist/index.esm.js.map +1 -1
  113. package/dist/{pixel-CKc4OQUx.d.mts → pixel-C93c-0M2.d.mts} +234 -101
  114. package/dist/{pixel-BxZZx8l5.d.ts → pixel-DVy4rzj8.d.ts} +234 -101
  115. package/dist/pixel-default-config-BkAjriVH.d.mts +21 -0
  116. package/dist/pixel-default-config-Co69vDP3.d.ts +21 -0
  117. package/dist/pixel-settings-BhfJqA92.d.mts +40 -0
  118. package/dist/pixel-settings-C0qPFTii.d.ts +40 -0
  119. package/dist/runtime/index.cjs.js +1 -1
  120. package/dist/runtime/index.cjs.js.map +1 -1
  121. package/dist/runtime/index.d.mts +6 -6
  122. package/dist/runtime/index.d.ts +6 -6
  123. package/dist/runtime/index.esm.js +1 -1
  124. package/dist/runtime/index.esm.js.map +1 -1
  125. package/dist/services/index.cjs.js +1 -1
  126. package/dist/services/index.cjs.js.map +1 -1
  127. package/dist/services/index.d.mts +7 -7
  128. package/dist/services/index.d.ts +7 -7
  129. package/dist/services/index.esm.js +1 -1
  130. package/dist/services/index.esm.js.map +1 -1
  131. package/dist/{types-C75pQP31.d.ts → types-B2aUNHb3.d.ts} +2 -2
  132. package/dist/{types-BP8dz1gP.d.mts → types-C0J9KUQg.d.mts} +2 -2
  133. package/dist/{types-DMhzHSVC.d.mts → types-C2dsBog1.d.mts} +2 -2
  134. package/dist/{types-D_SsCur9.d.ts → types-DcaBYgVI.d.ts} +2 -2
  135. package/dist/{url-context-BjAsQoVl.d.mts → url-context-Ck2LK18V.d.mts} +4 -2
  136. package/dist/{url-context-BjAsQoVl.d.ts → url-context-Ck2LK18V.d.ts} +4 -2
  137. package/dist/v2/global.global.js +1 -1
  138. package/dist/v2/global.global.js.map +1 -1
  139. package/dist/v2/index.cjs.js +1 -1
  140. package/dist/v2/index.cjs.js.map +1 -1
  141. package/dist/v2/index.d.mts +26 -8
  142. package/dist/v2/index.d.ts +26 -8
  143. package/dist/v2/index.esm.js +1 -1
  144. package/dist/v2/index.esm.js.map +1 -1
  145. package/docs/public/README.md +20 -15
  146. package/docs/public/api/exports.md +12 -8
  147. package/docs/public/api/pixel.md +28 -7
  148. package/docs/public/configuration/commerce.md +3 -3
  149. package/docs/public/configuration/modules.md +11 -14
  150. package/docs/public/configuration/overview.md +41 -25
  151. package/docs/public/configuration/transport.md +127 -0
  152. package/docs/public/events/catalog.md +3 -1
  153. package/docs/public/getting-started/installation.md +20 -15
  154. package/docs/public/getting-started/quick-start.md +95 -30
  155. package/docs/public/getting-started/react-nextjs.md +57 -34
  156. package/docs/public/getting-started/script-tag.md +55 -32
  157. package/docs/public/guides/funnel-checkout.md +2 -2
  158. package/docs/public/guides/funnel-full.md +3 -3
  159. package/docs/public/guides/funnel-landing.md +10 -8
  160. package/docs/public/limitations.md +6 -5
  161. package/docs/public/privacy/limitations.md +6 -6
  162. package/docs/public/release-candidate/validation.md +24 -19
  163. package/docs/public/troubleshooting.md +7 -6
  164. package/package.json +15 -14
  165. package/dist/pixel-default-config-CJl-eypl.d.mts +0 -5
  166. package/dist/pixel-default-config-aAOujzwp.d.ts +0 -5
@@ -1,93 +1,37 @@
1
- # Pixel v2 — Playgrounds HTML (Commerce + AutoTrack)
1
+ # Playground HTML — Pixel v2
2
2
 
3
- Playgrounds oficiais da frente **Commerce + AutoTrack Avançado** (Etapas 12L–14C).
3
+ Exemplos HTML internos para validação manual do SDK.
4
4
 
5
- **Versão RC:** `@beworke/pixel` `0.1.0-rc.5` · Etapas 1–20 · contrato `config.commerce` + `auto.detectors[event].sources[]` + Core UrlContext
5
+ ## Pré-requisito
6
6
 
7
- > Playgrounds **internos** — podem usar APIs `@internal`. Para exemplos públicos, use [`examples/public/`](../public/).
7
+ Na raiz do monorepo:
8
8
 
9
- Após `npm run build`, os mesmos arquivos ficam em:
10
-
11
- ```txt
12
- dist/examples/html-script/
13
- ```
14
-
15
- O bundle global usado pelos exemplos:
16
-
17
- ```txt
18
- ../../../dist/v2/global.global.js
9
+ ```bash
10
+ pnpm --filter @beworke/pixel build
19
11
  ```
20
12
 
21
- Nome global IIFE: **`PixelV2`** (`Pixel`, `DEFAULT_PIXEL_CONFIG`, …).
22
-
23
- ---
24
-
25
- ## Eventos (pastas)
13
+ ## Bundle global
26
14
 
27
- | Evento | Pasta | Cenários típicos |
28
- |--------|-------|------------------|
29
- | LEAD | `lead/` | click, auto, attribute |
30
- | ADD_TO_CART | `add-to-cart/` | attribute, click, auto, text, manual, dedupe, order-bump |
31
- | REMOVE_FROM_CART | `remove-from-cart/` | attribute, text, css, manual, state, dedupe, multi |
32
- | INITIATE_CHECKOUT | `initiate-checkout/` | attribute, click, submit, auto, text, manual, snapshot |
33
- | ADD_PAYMENT_INFO | `add-payment-info/` | autocomplete, fields, disabled, manual, dedupe, security, rules, data-track |
34
- | SEARCH | `search/` | attribute, button, input, submit, text, manual, dedupe |
35
- | VIEW_CONTENT | `view-content/` | attribute, product-card, text, css, manual, empty, dedupe |
15
+ Os HTMLs referenciam o IIFE em:
36
16
 
37
- Cada pasta tem um `README.md` com o mapa dos cenários.
38
-
39
- ---
40
-
41
- ## Exemplos gerais (raiz)
42
-
43
- ```txt
44
- release-candidate.html # Etapa 13A — consumidor real (script tag + API)
45
- RELEASE_CANDIDATE.md # como consumir / testar o RC (14C fechamento)
46
- example-checkout-commerce.html # checkout: form ATC → main_offer do cart
47
- example-landing-commerce.html # landing_page + PAGE_VIEW enriquecido (14A)
48
- example-basic.html
49
- example-behavior.html
50
- example-conversion.html
51
- example-transport.html
52
- example-integration.html
53
- example-url-context.html # checkout + upsell (15A)
54
- example-url-context-landing.html # landing com sid gerado (15A)
55
- example-url-context-upsell.html # upsell com forward params (15A)
56
- example-url-context-allowed-domains.html # allowedDomains restrito (15A)
57
- example-runtime-diagnostics.html # Etapa 16 — getDebugSnapshot()
58
- example-behavior-heartbeat.html # Etapa 17 — Heartbeat Runtime
59
- example-behavior-viewport.html # Etapa 18 — Viewport Runtime
60
- example-behavior-engagement.html # Etapa 19 — Engagement Runtime
61
- example-behavior-runtime-intelligence.html # Etapa 20 — Runtime Intelligence
62
- full-funnel/ # funil completo (15B) — contrato oficial commerce
17
+ ```text
18
+ ../../packages/pixel/dist/v2/global.global.js (raiz do playground)
19
+ ../../../packages/pixel/dist/v2/global.global.js (subpastas)
63
20
  ```
64
21
 
65
- Contratos nos exemplos:
22
+ Após o build, abra os `.html` no navegador (servidor estático local recomendado).
66
23
 
67
- - `commerce` na raiz (`enabled`, `cart.initialItems`, `enrichment[event]`)
68
- - Auto via `sources[]` — **não** `selector`/`selectorForm` soltos no detector
69
- - Core UrlContext via `modules.core.urlContext` (`query_params`, `url_context`, link decoration)
24
+ ## AutoTrack — source `link`
70
25
 
71
- ---
26
+ Nova source do Core: observa o **destino** de um `<a href>` (não a URL da página).
72
27
 
73
- ## Smoke real (opcional)
28
+ Exemplo dedicado:
74
29
 
75
- ```bash
76
- # sem .env → skip seguro
77
- npm run test:smoke:real
78
-
79
- # com .env (não commitar):
80
- # PIXEL_REAL_API_SMOKE=true
81
- # PIXEL_API_ENDPOINT=https://...
82
- # PIXEL_ID=pix_...
83
- npm run test:smoke:real
30
+ ```text
31
+ add-to-cart/example-add-to-cart-link.html
84
32
  ```
85
33
 
86
- Cobre os 8 eventos de conversão em modo Event (1 POST cada) e Batch (1 POST com N eventos).
87
-
88
- ---
89
-
90
- ## Nota sobre `examples/v2/`
34
+ Também presente em `example-landing-commerce.html` (CTA externo).
91
35
 
92
- O caminho histórico `examples/v2/` foi consolidado em `examples/html-script/`.
93
- Um README em `examples/v2/` aponta para cá para compatibilidade documental.
36
+ > **Legado:** na estrutura anterior ao monorepo, este diretório era `examples/html-script/`.
37
+ > No tarball npm, cópias transformadas ficam em `dist/examples/html-script/` com caminhos relativos ao `dist`.
@@ -5,24 +5,24 @@ Validação do pacote como **consumidor real** (script tag + bundle global + Tra
5
5
  ## Pré-requisitos
6
6
 
7
7
  ```bash
8
- npm run build
8
+ pnpm --filter @beworke/pixel build
9
9
  ```
10
10
 
11
11
  Artefatos esperados:
12
12
 
13
13
  ```txt
14
- dist/v2/global.global.js # IIFE → window.PixelV2
15
- dist/examples/html-script/ # playgrounds + esta página
16
- dist/index.esm.js / index.cjs.js # ESM/CJS
17
- dist/index.d.ts # types
14
+ packages/pixel/dist/v2/global.global.js # IIFE → window.PixelV2
15
+ packages/pixel/dist/examples/html-script/ # cópia empacotada dos playgrounds
16
+ packages/pixel/dist/index.esm.js / index.cjs.js
17
+ packages/pixel/dist/index.d.ts
18
18
  ```
19
19
 
20
20
  ## Abrir a página RC
21
21
 
22
22
  ```txt
23
- examples/html-script/release-candidate.html
24
- # ou pós-build:
25
- dist/examples/html-script/release-candidate.html
23
+ apps/playground-html/release-candidate.html
24
+ # ou pós-build (tarball / dist):
25
+ packages/pixel/dist/examples/html-script/release-candidate.html
26
26
  ```
27
27
 
28
28
  Abra no navegador (file:// ou servidor estático).
@@ -39,7 +39,7 @@ Abra no navegador (file:// ou servidor estático).
39
39
  Valores ficam em `localStorage` (`pixel_rc_conn`) — **não commitar `.env`**.
40
40
 
41
41
  3. Escolha **Event** (`batchSize=1`) ou **Batch** (`batchSize=10`).
42
- 4. Sender **HTTP** (API real) ou **Mock**.
42
+ 4. Sender **internal** (API pública) ou **test** (sem rede).
43
43
  5. Clique **Init**.
44
44
 
45
45
  ## O que a página valida
@@ -83,17 +83,15 @@ Ver `example-checkout-commerce.html` / `release-candidate.html` para checkout co
83
83
  identity: { ...DEFAULT_PIXEL_CONFIG.identity, pixelId: 'pix_xxx' },
84
84
  transport: {
85
85
  ...DEFAULT_PIXEL_CONFIG.transport,
86
- apiEndpoint: 'https://sua-api.example.com',
86
+ enabled: true,
87
+ sender: {
88
+ mode: 'internal',
89
+ baseUrl: 'https://sua-api.example.com',
90
+ },
87
91
  },
88
92
  modules: {
89
93
  ...DEFAULT_PIXEL_CONFIG.modules,
90
94
  conversion: { ...DEFAULT_PIXEL_CONFIG.modules.conversion, enabled: true },
91
- transport: {
92
- ...DEFAULT_PIXEL_CONFIG.modules.transport,
93
- enabled: true,
94
- mockSender: { enabled: false },
95
- sender: { mode: 'http' },
96
- },
97
95
  },
98
96
  });
99
97
  await pixel.init();
@@ -104,9 +102,10 @@ Ver `example-checkout-commerce.html` / `release-candidate.html` para checkout co
104
102
 
105
103
  ```bash
106
104
  pnpm add @beworke/pixel
107
- # ou validar tarball local:
108
- npm pack
109
- # npm install ./beworke-pixel-0.1.0-rc.4.tgz
105
+ # ou validar tarball local (fluxo oficial do monorepo):
106
+ pnpm pack:pixel
107
+ pnpm validate:pixel-package
108
+ # npm install ./artifacts/beworke-pixel-VERSAO.tgz
110
109
  ```
111
110
 
112
111
  ```ts
@@ -118,7 +117,7 @@ Exports: ver `package.json` → `exports` (`.` / `./global` / `./v2` / `./config
118
117
  ## Smoke automatizado (complementar)
119
118
 
120
119
  ```bash
121
- npm run test:smoke:real # skip seguro sem .env
120
+ pnpm --filter @beworke/pixel test:smoke:real # skip seguro sem .env
122
121
  # com .env: Event 8× ACK + Batch 8 eventos
123
122
  ```
124
123
 
@@ -132,4 +131,4 @@ A etapa 13A está **pronta para RC** quando:
132
131
  4. HTTP Event/Batch com ACK (se endpoint disponível)
133
132
  5. destroy/reinit sem duplicar listeners
134
133
 
135
- Pendências futuras: `PIXEL_V2_BACKLOG_PENDENCIAS_ISOLADO.md` (P1/P2).
134
+ Pendências futuras: `PLAN_PIXEL/PIXEL_V2_BACKLOG_PENDENCIAS_ISOLADO.md` (P1/P2).
@@ -180,7 +180,7 @@ code { font-size: 0.85em; }
180
180
  </div>
181
181
  </div>
182
182
 
183
- <script src="../../../dist/v2/global.global.js"></script>
183
+ <script src="../../../v2/global.global.js"></script>
184
184
  <script>
185
185
  const { Pixel, DEFAULT_PIXEL_CONFIG } = window.PixelV2;
186
186
  const API_ENDPOINT =
@@ -243,9 +243,46 @@ code { font-size: 0.85em; }
243
243
  debug: true,
244
244
  },
245
245
  transport: {
246
- ...DEFAULT_PIXEL_CONFIG.transport,
247
- apiEndpoint: API_ENDPOINT,
248
- timeoutMs: 10000,
246
+ ...base.transport,
247
+ enabled: true,
248
+ sender: { mode: 'internal', baseUrl: API_ENDPOINT },
249
+ persistence: { enabled: true },
250
+ replay: { enabled: true },
251
+ ordering: { enabled: true },
252
+ coordination: { enabled: true },
253
+ circuitBreaker: {
254
+ enabled: true,
255
+ failureThreshold: 5,
256
+ resetTimeoutMs: 30000,
257
+ halfOpenMaxAttempts: 2,
258
+ },
259
+ backpressure: {
260
+ enabled: true,
261
+ maxQueueSize: 500,
262
+ policy: 'drop_oldest',
263
+ sampleRate: 0.5,
264
+ },
265
+ deadLetter: { enabled: true, maxEntries: 200 },
266
+ compression: { enabled: true, strategy: 'identity' },
267
+ retry: {
268
+ enabled: true,
269
+ maxAttempts: 4,
270
+ baseDelayMs: 500,
271
+ maxDelayMs: 4000,
272
+ multiplier: 2,
273
+ },
274
+ batch: {
275
+ enabled: true,
276
+ batchSize: 10,
277
+ maxWaitMs: 5000,
278
+ },
279
+ timeout: { enabled: true, timeoutMs: 10000 },
280
+ offline: { enabled: true },
281
+ flush: {
282
+ enabled: true,
283
+ flushOnDestroy: true,
284
+ prepareUnloadHooks: true,
285
+ },
249
286
  },
250
287
  identity: { ...base.identity, pixelId: PIXEL_ID },
251
288
  commerce: {
@@ -301,50 +338,6 @@ code { font-size: 0.85em; }
301
338
  },
302
339
  behavior: { ...base.modules.behavior, enabled: false },
303
340
  privacy: { ...base.modules.privacy, enabled: false },
304
- transport: {
305
- enabled: true,
306
- mockSender: { enabled: false },
307
- sender: { mode: 'http' },
308
- persistence: { enabled: true },
309
- replay: { enabled: true },
310
- ordering: { enabled: true },
311
- coordination: { enabled: true },
312
- circuitBreaker: {
313
- enabled: true,
314
- failureThreshold: 5,
315
- resetTimeoutMs: 30000,
316
- halfOpenMaxAttempts: 2,
317
- },
318
- backpressure: {
319
- enabled: true,
320
- maxQueueSize: 500,
321
- policy: 'drop_oldest',
322
- sampleRate: 0.5,
323
- },
324
- deadLetter: { enabled: true, maxEntries: 200 },
325
- compression: { enabled: true, strategy: 'identity' },
326
- retry: {
327
- enabled: true,
328
- maxAttempts: 4,
329
- baseDelayMs: 500,
330
- maxDelayMs: 4000,
331
- multiplier: 2,
332
- },
333
- batch: {
334
- enabled: true,
335
- batchSize: 10,
336
- flushIntervalMs: 2000,
337
- maxWaitMs: 5000,
338
- },
339
- timeout: { enabled: true, timeoutMs: 10000 },
340
- offline: { enabled: true },
341
- flush: {
342
- enabled: true,
343
- flushIntervalMs: 2000,
344
- flushOnDestroy: true,
345
- prepareUnloadHooks: true,
346
- },
347
- },
348
341
  integrations: { ...base.modules.integrations, enabled: false },
349
342
  conversion: {
350
343
  enabled: true,
@@ -159,7 +159,7 @@ code { font-size: 0.85em; }
159
159
  </div>
160
160
  </div>
161
161
 
162
- <script src="../../../dist/v2/global.global.js"></script>
162
+ <script src="../../../v2/global.global.js"></script>
163
163
  <script>
164
164
  const { Pixel, DEFAULT_PIXEL_CONFIG } = window.PixelV2;
165
165
  const API_ENDPOINT =
@@ -222,9 +222,46 @@ code { font-size: 0.85em; }
222
222
  debug: true,
223
223
  },
224
224
  transport: {
225
- ...DEFAULT_PIXEL_CONFIG.transport,
226
- apiEndpoint: API_ENDPOINT,
227
- timeoutMs: 10000,
225
+ ...base.transport,
226
+ enabled: true,
227
+ sender: { mode: 'internal', baseUrl: API_ENDPOINT },
228
+ persistence: { enabled: true },
229
+ replay: { enabled: true },
230
+ ordering: { enabled: true },
231
+ coordination: { enabled: true },
232
+ circuitBreaker: {
233
+ enabled: true,
234
+ failureThreshold: 5,
235
+ resetTimeoutMs: 30000,
236
+ halfOpenMaxAttempts: 2,
237
+ },
238
+ backpressure: {
239
+ enabled: true,
240
+ maxQueueSize: 500,
241
+ policy: 'drop_oldest',
242
+ sampleRate: 0.5,
243
+ },
244
+ deadLetter: { enabled: true, maxEntries: 200 },
245
+ compression: { enabled: true, strategy: 'identity' },
246
+ retry: {
247
+ enabled: true,
248
+ maxAttempts: 4,
249
+ baseDelayMs: 500,
250
+ maxDelayMs: 4000,
251
+ multiplier: 2,
252
+ },
253
+ batch: {
254
+ enabled: true,
255
+ batchSize: 10,
256
+ maxWaitMs: 5000,
257
+ },
258
+ timeout: { enabled: true, timeoutMs: 10000 },
259
+ offline: { enabled: true },
260
+ flush: {
261
+ enabled: true,
262
+ flushOnDestroy: true,
263
+ prepareUnloadHooks: true,
264
+ },
228
265
  },
229
266
  identity: { ...base.identity, pixelId: PIXEL_ID },
230
267
  commerce: {
@@ -280,50 +317,6 @@ code { font-size: 0.85em; }
280
317
  },
281
318
  behavior: { ...base.modules.behavior, enabled: false },
282
319
  privacy: { ...base.modules.privacy, enabled: false },
283
- transport: {
284
- enabled: true,
285
- mockSender: { enabled: false },
286
- sender: { mode: 'http' },
287
- persistence: { enabled: true },
288
- replay: { enabled: true },
289
- ordering: { enabled: true },
290
- coordination: { enabled: true },
291
- circuitBreaker: {
292
- enabled: true,
293
- failureThreshold: 5,
294
- resetTimeoutMs: 30000,
295
- halfOpenMaxAttempts: 2,
296
- },
297
- backpressure: {
298
- enabled: true,
299
- maxQueueSize: 500,
300
- policy: 'drop_oldest',
301
- sampleRate: 0.5,
302
- },
303
- deadLetter: { enabled: true, maxEntries: 200 },
304
- compression: { enabled: true, strategy: 'identity' },
305
- retry: {
306
- enabled: true,
307
- maxAttempts: 4,
308
- baseDelayMs: 500,
309
- maxDelayMs: 4000,
310
- multiplier: 2,
311
- },
312
- batch: {
313
- enabled: true,
314
- batchSize: 10,
315
- flushIntervalMs: 2000,
316
- maxWaitMs: 5000,
317
- },
318
- timeout: { enabled: true, timeoutMs: 10000 },
319
- offline: { enabled: true },
320
- flush: {
321
- enabled: true,
322
- flushIntervalMs: 2000,
323
- flushOnDestroy: true,
324
- prepareUnloadHooks: true,
325
- },
326
- },
327
320
  integrations: { ...base.modules.integrations, enabled: false },
328
321
  conversion: {
329
322
  enabled: true,
@@ -172,7 +172,7 @@ code { font-size: 0.85em; }
172
172
  </div>
173
173
  </div>
174
174
 
175
- <script src="../../../dist/v2/global.global.js"></script>
175
+ <script src="../../../v2/global.global.js"></script>
176
176
  <script>
177
177
  const { Pixel, DEFAULT_PIXEL_CONFIG } = window.PixelV2;
178
178
  const API_ENDPOINT =
@@ -235,9 +235,46 @@ code { font-size: 0.85em; }
235
235
  debug: true,
236
236
  },
237
237
  transport: {
238
- ...DEFAULT_PIXEL_CONFIG.transport,
239
- apiEndpoint: API_ENDPOINT,
240
- timeoutMs: 10000,
238
+ ...base.transport,
239
+ enabled: true,
240
+ sender: { mode: 'internal', baseUrl: API_ENDPOINT },
241
+ persistence: { enabled: true },
242
+ replay: { enabled: true },
243
+ ordering: { enabled: true },
244
+ coordination: { enabled: true },
245
+ circuitBreaker: {
246
+ enabled: true,
247
+ failureThreshold: 5,
248
+ resetTimeoutMs: 30000,
249
+ halfOpenMaxAttempts: 2,
250
+ },
251
+ backpressure: {
252
+ enabled: true,
253
+ maxQueueSize: 500,
254
+ policy: 'drop_oldest',
255
+ sampleRate: 0.5,
256
+ },
257
+ deadLetter: { enabled: true, maxEntries: 200 },
258
+ compression: { enabled: true, strategy: 'identity' },
259
+ retry: {
260
+ enabled: true,
261
+ maxAttempts: 4,
262
+ baseDelayMs: 500,
263
+ maxDelayMs: 4000,
264
+ multiplier: 2,
265
+ },
266
+ batch: {
267
+ enabled: true,
268
+ batchSize: 10,
269
+ maxWaitMs: 5000,
270
+ },
271
+ timeout: { enabled: true, timeoutMs: 10000 },
272
+ offline: { enabled: true },
273
+ flush: {
274
+ enabled: true,
275
+ flushOnDestroy: true,
276
+ prepareUnloadHooks: true,
277
+ },
241
278
  },
242
279
  identity: { ...base.identity, pixelId: PIXEL_ID },
243
280
  commerce: {
@@ -293,50 +330,6 @@ code { font-size: 0.85em; }
293
330
  },
294
331
  behavior: { ...base.modules.behavior, enabled: false },
295
332
  privacy: { ...base.modules.privacy, enabled: false },
296
- transport: {
297
- enabled: true,
298
- mockSender: { enabled: false },
299
- sender: { mode: 'http' },
300
- persistence: { enabled: true },
301
- replay: { enabled: true },
302
- ordering: { enabled: true },
303
- coordination: { enabled: true },
304
- circuitBreaker: {
305
- enabled: true,
306
- failureThreshold: 5,
307
- resetTimeoutMs: 30000,
308
- halfOpenMaxAttempts: 2,
309
- },
310
- backpressure: {
311
- enabled: true,
312
- maxQueueSize: 500,
313
- policy: 'drop_oldest',
314
- sampleRate: 0.5,
315
- },
316
- deadLetter: { enabled: true, maxEntries: 200 },
317
- compression: { enabled: true, strategy: 'identity' },
318
- retry: {
319
- enabled: true,
320
- maxAttempts: 4,
321
- baseDelayMs: 500,
322
- maxDelayMs: 4000,
323
- multiplier: 2,
324
- },
325
- batch: {
326
- enabled: true,
327
- batchSize: 10,
328
- flushIntervalMs: 2000,
329
- maxWaitMs: 5000,
330
- },
331
- timeout: { enabled: true, timeoutMs: 10000 },
332
- offline: { enabled: true },
333
- flush: {
334
- enabled: true,
335
- flushIntervalMs: 2000,
336
- flushOnDestroy: true,
337
- prepareUnloadHooks: true,
338
- },
339
- },
340
333
  integrations: { ...base.modules.integrations, enabled: false },
341
334
  conversion: {
342
335
  enabled: true,
@@ -161,7 +161,7 @@ code { font-size: 0.85em; }
161
161
  </div>
162
162
  </div>
163
163
 
164
- <script src="../../../dist/v2/global.global.js"></script>
164
+ <script src="../../../v2/global.global.js"></script>
165
165
  <script>
166
166
  const { Pixel, DEFAULT_PIXEL_CONFIG } = window.PixelV2;
167
167
  const API_ENDPOINT =
@@ -232,9 +232,46 @@ code { font-size: 0.85em; }
232
232
  debug: true,
233
233
  },
234
234
  transport: {
235
- ...DEFAULT_PIXEL_CONFIG.transport,
236
- apiEndpoint: API_ENDPOINT,
237
- timeoutMs: 10000,
235
+ ...base.transport,
236
+ enabled: true,
237
+ sender: { mode: 'internal', baseUrl: API_ENDPOINT },
238
+ persistence: { enabled: true },
239
+ replay: { enabled: true },
240
+ ordering: { enabled: true },
241
+ coordination: { enabled: true },
242
+ circuitBreaker: {
243
+ enabled: true,
244
+ failureThreshold: 5,
245
+ resetTimeoutMs: 30000,
246
+ halfOpenMaxAttempts: 2,
247
+ },
248
+ backpressure: {
249
+ enabled: true,
250
+ maxQueueSize: 500,
251
+ policy: 'drop_oldest',
252
+ sampleRate: 0.5,
253
+ },
254
+ deadLetter: { enabled: true, maxEntries: 200 },
255
+ compression: { enabled: true, strategy: 'identity' },
256
+ retry: {
257
+ enabled: true,
258
+ maxAttempts: 4,
259
+ baseDelayMs: 500,
260
+ maxDelayMs: 4000,
261
+ multiplier: 2,
262
+ },
263
+ batch: {
264
+ enabled: true,
265
+ batchSize: 10,
266
+ maxWaitMs: 5000,
267
+ },
268
+ timeout: { enabled: true, timeoutMs: 10000 },
269
+ offline: { enabled: true },
270
+ flush: {
271
+ enabled: true,
272
+ flushOnDestroy: true,
273
+ prepareUnloadHooks: true,
274
+ },
238
275
  },
239
276
  identity: { ...base.identity, pixelId: PIXEL_ID },
240
277
  commerce: {
@@ -290,50 +327,6 @@ code { font-size: 0.85em; }
290
327
  },
291
328
  behavior: { ...base.modules.behavior, enabled: false },
292
329
  privacy: { ...base.modules.privacy, enabled: false },
293
- transport: {
294
- enabled: true,
295
- mockSender: { enabled: false },
296
- sender: { mode: 'http' },
297
- persistence: { enabled: true },
298
- replay: { enabled: true },
299
- ordering: { enabled: true },
300
- coordination: { enabled: true },
301
- circuitBreaker: {
302
- enabled: true,
303
- failureThreshold: 5,
304
- resetTimeoutMs: 30000,
305
- halfOpenMaxAttempts: 2,
306
- },
307
- backpressure: {
308
- enabled: true,
309
- maxQueueSize: 500,
310
- policy: 'drop_oldest',
311
- sampleRate: 0.5,
312
- },
313
- deadLetter: { enabled: true, maxEntries: 200 },
314
- compression: { enabled: true, strategy: 'identity' },
315
- retry: {
316
- enabled: true,
317
- maxAttempts: 4,
318
- baseDelayMs: 500,
319
- maxDelayMs: 4000,
320
- multiplier: 2,
321
- },
322
- batch: {
323
- enabled: true,
324
- batchSize: 10,
325
- flushIntervalMs: 2000,
326
- maxWaitMs: 5000,
327
- },
328
- timeout: { enabled: true, timeoutMs: 10000 },
329
- offline: { enabled: true },
330
- flush: {
331
- enabled: true,
332
- flushIntervalMs: 2000,
333
- flushOnDestroy: true,
334
- prepareUnloadHooks: true,
335
- },
336
- },
337
330
  integrations: { ...base.modules.integrations, enabled: false },
338
331
  conversion: {
339
332
  enabled: true,