@beworke/pixel 0.1.0-rc.6 → 0.1.0-rc.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.
Files changed (139) hide show
  1. package/README.md +12 -12
  2. package/RELEASE_CANDIDATE.md +19 -13
  3. package/dist/{StorageFactory-CPghDPBj.d.mts → StorageFactory-Cq29vF32.d.mts} +2 -2
  4. package/dist/{StorageFactory-tjfzk57c.d.ts → StorageFactory-DeMaZ8wk.d.ts} +2 -2
  5. package/dist/config/index.cjs.js +1 -1
  6. package/dist/config/index.cjs.js.map +1 -1
  7. package/dist/config/index.d.mts +4 -4
  8. package/dist/config/index.d.ts +4 -4
  9. package/dist/config/index.esm.js +1 -1
  10. package/dist/config/index.esm.js.map +1 -1
  11. package/dist/events/index.cjs.js.map +1 -1
  12. package/dist/events/index.d.mts +2 -2
  13. package/dist/events/index.d.ts +2 -2
  14. package/dist/events/index.esm.js.map +1 -1
  15. package/dist/examples/html-script/README.md +20 -76
  16. package/dist/examples/html-script/RELEASE_CANDIDATE.md +14 -13
  17. package/dist/examples/html-script/add-payment-info/example-add-payment-info-card-autocomplete.html +1 -1
  18. package/dist/examples/html-script/add-payment-info/example-add-payment-info-card-disabled.html +1 -1
  19. package/dist/examples/html-script/add-payment-info/example-add-payment-info-card-fields.html +1 -1
  20. package/dist/examples/html-script/add-payment-info/example-add-payment-info-data-track.html +1 -1
  21. package/dist/examples/html-script/add-payment-info/example-add-payment-info-dedupe.html +1 -1
  22. package/dist/examples/html-script/add-payment-info/example-add-payment-info-manual.html +1 -1
  23. package/dist/examples/html-script/add-payment-info/example-add-payment-info-rules-card.html +1 -1
  24. package/dist/examples/html-script/add-payment-info/example-add-payment-info-security.html +1 -1
  25. package/dist/examples/html-script/add-to-cart/README.md +6 -3
  26. package/dist/examples/html-script/add-to-cart/example-add-to-cart-attribute.html +3 -2
  27. package/dist/examples/html-script/add-to-cart/example-add-to-cart-auto.html +3 -2
  28. package/dist/examples/html-script/add-to-cart/example-add-to-cart-click.html +3 -2
  29. package/dist/examples/html-script/add-to-cart/example-add-to-cart-dedupe.html +3 -2
  30. package/dist/examples/html-script/add-to-cart/example-add-to-cart-link.html +597 -0
  31. package/dist/examples/html-script/add-to-cart/example-add-to-cart-manual.html +3 -2
  32. package/dist/examples/html-script/add-to-cart/example-add-to-cart-order-bump.html +3 -2
  33. package/dist/examples/html-script/add-to-cart/example-add-to-cart-text.html +3 -2
  34. package/dist/examples/html-script/behavior/example-behavior-engagement.html +1 -1
  35. package/dist/examples/html-script/behavior/example-behavior-heartbeat.html +1 -1
  36. package/dist/examples/html-script/behavior/example-behavior-runtime-intelligence.html +1 -1
  37. package/dist/examples/html-script/behavior/example-behavior-viewport.html +1 -1
  38. package/dist/examples/html-script/behavior/example-behavior.html +1 -1
  39. package/dist/examples/html-script/example-basic.html +1 -1
  40. package/dist/examples/html-script/example-checkout-commerce.html +1 -1
  41. package/dist/examples/html-script/example-conversion.html +1 -1
  42. package/dist/examples/html-script/example-integration.html +1 -1
  43. package/dist/examples/html-script/example-landing-commerce.html +42 -1
  44. package/dist/examples/html-script/example-runtime-diagnostics.html +1 -1
  45. package/dist/examples/html-script/example-transport.html +6 -1
  46. package/dist/examples/html-script/full-funnel/README.md +1 -1
  47. package/dist/examples/html-script/full-funnel/checkout.html +1 -1
  48. package/dist/examples/html-script/full-funnel/downsell.html +1 -1
  49. package/dist/examples/html-script/full-funnel/landing.html +54 -2
  50. package/dist/examples/html-script/full-funnel/thank-you.html +1 -1
  51. package/dist/examples/html-script/full-funnel/upsell.html +1 -1
  52. package/dist/examples/html-script/initiate-checkout/example-initiate-checkout-attribute.html +1 -1
  53. package/dist/examples/html-script/initiate-checkout/example-initiate-checkout-auto.html +1 -1
  54. package/dist/examples/html-script/initiate-checkout/example-initiate-checkout-click.html +1 -1
  55. package/dist/examples/html-script/initiate-checkout/example-initiate-checkout-manual.html +1 -1
  56. package/dist/examples/html-script/initiate-checkout/example-initiate-checkout-snapshot.html +1 -1
  57. package/dist/examples/html-script/initiate-checkout/example-initiate-checkout-submit.html +1 -1
  58. package/dist/examples/html-script/initiate-checkout/example-initiate-checkout-text.html +1 -1
  59. package/dist/examples/html-script/lead/example-lead-trigger-attribute.html +1 -1
  60. package/dist/examples/html-script/lead/example-lead-trigger-auto.html +1 -1
  61. package/dist/examples/html-script/lead/example-lead-trigger-click.html +1 -1
  62. package/dist/examples/html-script/release-candidate.html +1 -1
  63. package/dist/examples/html-script/remove-from-cart/example-remove-from-cart-attribute.html +1 -1
  64. package/dist/examples/html-script/remove-from-cart/example-remove-from-cart-css.html +1 -1
  65. package/dist/examples/html-script/remove-from-cart/example-remove-from-cart-dedupe.html +1 -1
  66. package/dist/examples/html-script/remove-from-cart/example-remove-from-cart-manual.html +1 -1
  67. package/dist/examples/html-script/remove-from-cart/example-remove-from-cart-multi.html +1 -1
  68. package/dist/examples/html-script/remove-from-cart/example-remove-from-cart-state.html +1 -1
  69. package/dist/examples/html-script/remove-from-cart/example-remove-from-cart-text.html +1 -1
  70. package/dist/examples/html-script/search/example-search-attribute.html +1 -1
  71. package/dist/examples/html-script/search/example-search-button-sync.html +1 -1
  72. package/dist/examples/html-script/search/example-search-dedupe.html +1 -1
  73. package/dist/examples/html-script/search/example-search-input.html +1 -1
  74. package/dist/examples/html-script/search/example-search-manual.html +1 -1
  75. package/dist/examples/html-script/search/example-search-submit.html +1 -1
  76. package/dist/examples/html-script/search/example-search-text.html +1 -1
  77. package/dist/examples/html-script/url-context/example-url-context-allowed-domains.html +38 -9
  78. package/dist/examples/html-script/url-context/example-url-context-landing.html +53 -13
  79. package/dist/examples/html-script/url-context/example-url-context-upsell.html +48 -10
  80. package/dist/examples/html-script/url-context/example-url-context.html +51 -17
  81. package/dist/examples/html-script/view-content/example-view-content-attribute.html +1 -1
  82. package/dist/examples/html-script/view-content/example-view-content-css.html +1 -1
  83. package/dist/examples/html-script/view-content/example-view-content-dedupe.html +1 -1
  84. package/dist/examples/html-script/view-content/example-view-content-empty.html +1 -1
  85. package/dist/examples/html-script/view-content/example-view-content-manual.html +1 -1
  86. package/dist/examples/html-script/view-content/example-view-content-product-card.html +1 -1
  87. package/dist/examples/html-script/view-content/example-view-content-text.html +1 -1
  88. package/dist/examples/release-candidate/README.md +2 -1
  89. package/dist/examples/v2/README.md +15 -15
  90. package/dist/{index-CQAyT5Od.d.ts → index-B8u_3PGG.d.ts} +21 -2
  91. package/dist/{index-JlKPz4pp.d.mts → index-BxT2d-TK.d.mts} +21 -2
  92. package/dist/index.cjs.js +1 -1
  93. package/dist/index.cjs.js.map +1 -1
  94. package/dist/index.d.mts +19 -782
  95. package/dist/index.d.ts +19 -782
  96. package/dist/index.esm.js +1 -1
  97. package/dist/index.esm.js.map +1 -1
  98. package/dist/{pixel-BxZZx8l5.d.ts → pixel-2uL4LSyC.d.ts} +126 -5
  99. package/dist/{pixel-CKc4OQUx.d.mts → pixel-DMwpppf_.d.mts} +126 -5
  100. package/dist/{pixel-default-config-aAOujzwp.d.ts → pixel-default-config-BDPUVHse.d.ts} +1 -1
  101. package/dist/{pixel-default-config-CJl-eypl.d.mts → pixel-default-config-C5uLt52W.d.mts} +1 -1
  102. package/dist/runtime/index.cjs.js +1 -1
  103. package/dist/runtime/index.cjs.js.map +1 -1
  104. package/dist/runtime/index.d.mts +6 -6
  105. package/dist/runtime/index.d.ts +6 -6
  106. package/dist/runtime/index.esm.js +1 -1
  107. package/dist/runtime/index.esm.js.map +1 -1
  108. package/dist/services/index.cjs.js +1 -1
  109. package/dist/services/index.cjs.js.map +1 -1
  110. package/dist/services/index.d.mts +7 -7
  111. package/dist/services/index.d.ts +7 -7
  112. package/dist/services/index.esm.js +1 -1
  113. package/dist/services/index.esm.js.map +1 -1
  114. package/dist/{types-BP8dz1gP.d.mts → types-6HF3UlsL.d.mts} +2 -2
  115. package/dist/{types-C75pQP31.d.ts → types-BqUEoZo0.d.ts} +2 -2
  116. package/dist/{types-DMhzHSVC.d.mts → types-CgrabttM.d.mts} +2 -2
  117. package/dist/{types-D_SsCur9.d.ts → types-fFcQ1apy.d.ts} +2 -2
  118. package/dist/{url-context-BjAsQoVl.d.mts → url-context-Ck2LK18V.d.mts} +4 -2
  119. package/dist/{url-context-BjAsQoVl.d.ts → url-context-Ck2LK18V.d.ts} +4 -2
  120. package/dist/v2/global.global.js +1 -1
  121. package/dist/v2/global.global.js.map +1 -1
  122. package/dist/v2/index.cjs.js +1 -1
  123. package/dist/v2/index.cjs.js.map +1 -1
  124. package/dist/v2/index.d.mts +793 -9
  125. package/dist/v2/index.d.ts +793 -9
  126. package/dist/v2/index.esm.js +1 -1
  127. package/dist/v2/index.esm.js.map +1 -1
  128. package/docs/public/README.md +13 -11
  129. package/docs/public/api/pixel.md +1 -1
  130. package/docs/public/configuration/commerce.md +1 -1
  131. package/docs/public/getting-started/installation.md +6 -3
  132. package/docs/public/getting-started/react-nextjs.md +3 -3
  133. package/docs/public/getting-started/script-tag.md +1 -1
  134. package/docs/public/guides/funnel-checkout.md +1 -1
  135. package/docs/public/guides/funnel-full.md +3 -3
  136. package/docs/public/guides/funnel-landing.md +1 -1
  137. package/docs/public/limitations.md +1 -1
  138. package/docs/public/release-candidate/validation.md +22 -17
  139. package/package.json +8 -12
@@ -5,9 +5,24 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>Pixel v2 — UrlContext allowedDomains</title>
7
7
  <style>
8
- body { font-family: system-ui, sans-serif; max-width: 720px; margin: 2rem auto; padding: 0 1rem; }
9
- a { display: block; margin: 0.5rem 0; }
10
- pre { background: #0f172a; color: #e2e8f0; padding: 0.75rem; border-radius: 8px; font-size: 0.75rem; overflow: auto; }
8
+ body {
9
+ font-family: system-ui, sans-serif;
10
+ max-width: 720px;
11
+ margin: 2rem auto;
12
+ padding: 0 1rem;
13
+ }
14
+ a {
15
+ display: block;
16
+ margin: 0.5rem 0;
17
+ }
18
+ pre {
19
+ background: #0f172a;
20
+ color: #e2e8f0;
21
+ padding: 0.75rem;
22
+ border-radius: 8px;
23
+ font-size: 0.75rem;
24
+ overflow: auto;
25
+ }
11
26
  </style>
12
27
  </head>
13
28
  <body>
@@ -15,19 +30,24 @@
15
30
  <p>Esperado: apenas o link de checkout recebe <code>sid</code>.</p>
16
31
 
17
32
  <a id="checkout" href="https://checkout.bemony.com/pay">Checkout Bemony</a>
18
- <a id="security" href="https://security.bemony.com/upsell/accept">Security Bemony</a>
33
+ <a id="security" href="https://security.bemony.com/upsell/accept"
34
+ >Security Bemony</a
35
+ >
19
36
  <a id="mine" href="https://meusite.com/pagina">Meu site</a>
20
37
 
21
38
  <pre id="out">init…</pre>
22
39
 
23
- <script src="../../dist/v2/global.global.js"></script>
40
+ <script src="../../../v2/global.global.js"></script>
24
41
  <script>
25
42
  (async function () {
26
43
  var { Pixel, DEFAULT_PIXEL_CONFIG } = window.PixelV2;
27
44
  var pixel = new Pixel({
28
45
  ...DEFAULT_PIXEL_CONFIG,
29
46
  app: { ...DEFAULT_PIXEL_CONFIG.app, debug: true },
30
- identity: { ...DEFAULT_PIXEL_CONFIG.identity, pixelId: 'pix_uc_domains' },
47
+ identity: {
48
+ ...DEFAULT_PIXEL_CONFIG.identity,
49
+ pixelId: 'pix_uc_domains',
50
+ },
31
51
  modules: {
32
52
  ...DEFAULT_PIXEL_CONFIG.modules,
33
53
  core: {
@@ -41,9 +61,18 @@
41
61
  },
42
62
  },
43
63
  },
44
- transport: { ...DEFAULT_PIXEL_CONFIG.modules.transport, enabled: false },
45
- integrations: { ...DEFAULT_PIXEL_CONFIG.modules.integrations, enabled: false },
46
- conversion: { ...DEFAULT_PIXEL_CONFIG.modules.conversion, enabled: false },
64
+ transport: {
65
+ ...DEFAULT_PIXEL_CONFIG.modules.transport,
66
+ enabled: false,
67
+ },
68
+ integrations: {
69
+ ...DEFAULT_PIXEL_CONFIG.modules.integrations,
70
+ enabled: false,
71
+ },
72
+ conversion: {
73
+ ...DEFAULT_PIXEL_CONFIG.modules.conversion,
74
+ enabled: false,
75
+ },
47
76
  },
48
77
  });
49
78
  await pixel.init();
@@ -5,10 +5,28 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>Pixel v2 — UrlContext Landing</title>
7
7
  <style>
8
- body { font-family: system-ui, sans-serif; max-width: 720px; margin: 2rem auto; padding: 0 1rem; }
9
- a { display: block; margin: 0.5rem 0; }
10
- pre { background: #0f172a; color: #e2e8f0; padding: 0.75rem; border-radius: 8px; font-size: 0.75rem; overflow: auto; }
11
- .hint { color: #64748b; font-size: 0.9rem; }
8
+ body {
9
+ font-family: system-ui, sans-serif;
10
+ max-width: 720px;
11
+ margin: 2rem auto;
12
+ padding: 0 1rem;
13
+ }
14
+ a {
15
+ display: block;
16
+ margin: 0.5rem 0;
17
+ }
18
+ pre {
19
+ background: #0f172a;
20
+ color: #e2e8f0;
21
+ padding: 0.75rem;
22
+ border-radius: 8px;
23
+ font-size: 0.75rem;
24
+ overflow: auto;
25
+ }
26
+ .hint {
27
+ color: #64748b;
28
+ font-size: 0.9rem;
29
+ }
12
30
  </style>
13
31
  </head>
14
32
  <body>
@@ -17,25 +35,34 @@
17
35
  Abra com query, ex.:
18
36
  <code>?utm_source=facebook&amp;affid=aff_123&amp;src=redtrack_abc</code>
19
37
  <br />
20
- Debug: console mostra snapshot; href do checkout deve ganhar <code>sid</code> + UTMs sem duplicar params.
38
+ Debug: console mostra snapshot; href do checkout deve ganhar
39
+ <code>sid</code> + UTMs sem duplicar params.
40
+ </p>
41
+ <p>
42
+ Esperado: gera <code>sid</code>, preserva UTMs/affid/src, decora checkout
43
+ (abs + relativo).
21
44
  </p>
22
- <p>Esperado: gera <code>sid</code>, preserva UTMs/affid/src, decora checkout (abs + relativo).</p>
23
45
 
24
46
  <a id="c1" href="https://checkout.bemony.com/pay">Checkout absoluto</a>
25
- <a id="c2" href="https://checkout.bemony.com/pay?product=main">Checkout + product</a>
47
+ <a id="c2" href="https://checkout.bemony.com/pay?product=main"
48
+ >Checkout + product</a
49
+ >
26
50
  <a id="c3" href="/checkout#step">Checkout relativo + hash</a>
27
51
  <a href="https://facebook.com/x">Externo (não decorar)</a>
28
52
 
29
53
  <pre id="out">init…</pre>
30
54
 
31
- <script src="../../dist/v2/global.global.js"></script>
55
+ <script src="../../../v2/global.global.js"></script>
32
56
  <script>
33
57
  (async function () {
34
58
  var { Pixel, DEFAULT_PIXEL_CONFIG } = window.PixelV2;
35
59
  var pixel = new Pixel({
36
60
  ...DEFAULT_PIXEL_CONFIG,
37
61
  app: { ...DEFAULT_PIXEL_CONFIG.app, debug: true },
38
- identity: { ...DEFAULT_PIXEL_CONFIG.identity, pixelId: 'pix_uc_landing' },
62
+ identity: {
63
+ ...DEFAULT_PIXEL_CONFIG.identity,
64
+ pixelId: 'pix_uc_landing',
65
+ },
39
66
  modules: {
40
67
  ...DEFAULT_PIXEL_CONFIG.modules,
41
68
  core: {
@@ -49,9 +76,18 @@
49
76
  },
50
77
  },
51
78
  },
52
- transport: { ...DEFAULT_PIXEL_CONFIG.modules.transport, enabled: false },
53
- integrations: { ...DEFAULT_PIXEL_CONFIG.modules.integrations, enabled: false },
54
- conversion: { ...DEFAULT_PIXEL_CONFIG.modules.conversion, enabled: false },
79
+ transport: {
80
+ ...DEFAULT_PIXEL_CONFIG.modules.transport,
81
+ enabled: false,
82
+ },
83
+ integrations: {
84
+ ...DEFAULT_PIXEL_CONFIG.modules.integrations,
85
+ enabled: false,
86
+ },
87
+ conversion: {
88
+ ...DEFAULT_PIXEL_CONFIG.modules.conversion,
89
+ enabled: false,
90
+ },
55
91
  },
56
92
  });
57
93
  await pixel.init();
@@ -62,7 +98,11 @@
62
98
  checkout2: document.getElementById('c2').getAttribute('href'),
63
99
  checkoutRelative: document.getElementById('c3').getAttribute('href'),
64
100
  };
65
- document.getElementById('out').textContent = JSON.stringify(debug, null, 2);
101
+ document.getElementById('out').textContent = JSON.stringify(
102
+ debug,
103
+ null,
104
+ 2
105
+ );
66
106
  console.debug('[UrlContext landing]', debug);
67
107
  })();
68
108
  </script>
@@ -5,10 +5,33 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>Pixel v2 — UrlContext Upsell</title>
7
7
  <style>
8
- body { font-family: system-ui, sans-serif; max-width: 720px; margin: 2rem auto; padding: 0 1rem; }
9
- a { display: inline-block; margin: 0.5rem 0.5rem 0 0; padding: 0.5rem 0.85rem; background: #0f766e; color: #fff; border-radius: 8px; text-decoration: none; }
10
- pre { background: #0f172a; color: #e2e8f0; padding: 0.75rem; border-radius: 8px; font-size: 0.75rem; overflow: auto; }
11
- .hint { color: #64748b; font-size: 0.9rem; }
8
+ body {
9
+ font-family: system-ui, sans-serif;
10
+ max-width: 720px;
11
+ margin: 2rem auto;
12
+ padding: 0 1rem;
13
+ }
14
+ a {
15
+ display: inline-block;
16
+ margin: 0.5rem 0.5rem 0 0;
17
+ padding: 0.5rem 0.85rem;
18
+ background: #0f766e;
19
+ color: #fff;
20
+ border-radius: 8px;
21
+ text-decoration: none;
22
+ }
23
+ pre {
24
+ background: #0f172a;
25
+ color: #e2e8f0;
26
+ padding: 0.75rem;
27
+ border-radius: 8px;
28
+ font-size: 0.75rem;
29
+ overflow: auto;
30
+ }
31
+ .hint {
32
+ color: #64748b;
33
+ font-size: 0.9rem;
34
+ }
12
35
  </style>
13
36
  </head>
14
37
  <body>
@@ -24,14 +47,17 @@
24
47
 
25
48
  <pre id="out">init…</pre>
26
49
 
27
- <script src="../../dist/v2/global.global.js"></script>
50
+ <script src="../../../v2/global.global.js"></script>
28
51
  <script>
29
52
  (async function () {
30
53
  var { Pixel, DEFAULT_PIXEL_CONFIG } = window.PixelV2;
31
54
  var pixel = new Pixel({
32
55
  ...DEFAULT_PIXEL_CONFIG,
33
56
  app: { ...DEFAULT_PIXEL_CONFIG.app, debug: true },
34
- identity: { ...DEFAULT_PIXEL_CONFIG.identity, pixelId: 'pix_uc_upsell' },
57
+ identity: {
58
+ ...DEFAULT_PIXEL_CONFIG.identity,
59
+ pixelId: 'pix_uc_upsell',
60
+ },
35
61
  modules: {
36
62
  ...DEFAULT_PIXEL_CONFIG.modules,
37
63
  core: {
@@ -41,13 +67,25 @@
41
67
  linkDecoration: {
42
68
  enabled: true,
43
69
  strategy: 'both',
44
- allowedDomains: ['security.bemony.com', 'checkout.bemony.com'],
70
+ allowedDomains: [
71
+ 'security.bemony.com',
72
+ 'checkout.bemony.com',
73
+ ],
45
74
  },
46
75
  },
47
76
  },
48
- transport: { ...DEFAULT_PIXEL_CONFIG.modules.transport, enabled: false },
49
- integrations: { ...DEFAULT_PIXEL_CONFIG.modules.integrations, enabled: false },
50
- conversion: { ...DEFAULT_PIXEL_CONFIG.modules.conversion, enabled: false },
77
+ transport: {
78
+ ...DEFAULT_PIXEL_CONFIG.modules.transport,
79
+ enabled: false,
80
+ },
81
+ integrations: {
82
+ ...DEFAULT_PIXEL_CONFIG.modules.integrations,
83
+ enabled: false,
84
+ },
85
+ conversion: {
86
+ ...DEFAULT_PIXEL_CONFIG.modules.conversion,
87
+ enabled: false,
88
+ },
51
89
  },
52
90
  });
53
91
  await pixel.init();
@@ -20,7 +20,8 @@
20
20
  margin: 1rem 0;
21
21
  background: #fff;
22
22
  }
23
- a, button {
23
+ a,
24
+ button {
24
25
  display: inline-block;
25
26
  margin: 0.35rem 0.35rem 0.35rem 0;
26
27
  padding: 0.45rem 0.75rem;
@@ -32,7 +33,11 @@
32
33
  font: inherit;
33
34
  cursor: pointer;
34
35
  }
35
- button.primary { background: #0f766e; color: #fff; border-color: #0f766e; }
36
+ button.primary {
37
+ background: #0f766e;
38
+ color: #fff;
39
+ border-color: #0f766e;
40
+ }
36
41
  pre {
37
42
  background: #0f172a;
38
43
  color: #e2e8f0;
@@ -42,26 +47,52 @@
42
47
  overflow: auto;
43
48
  max-height: 280px;
44
49
  }
45
- .hint { color: #64748b; font-size: 0.9rem; }
46
- code { font-size: 0.85em; }
50
+ .hint {
51
+ color: #64748b;
52
+ font-size: 0.9rem;
53
+ }
54
+ code {
55
+ font-size: 0.85em;
56
+ }
47
57
  </style>
48
58
  </head>
49
59
  <body>
50
60
  <h1>UrlContext — Core (Etapa 15A)</h1>
51
61
  <p class="hint">
52
- <code>sid</code> público da URL <strong>não</strong> é o <code>session_id</code> interno do Pixel.
53
- <code>order_id</code> pode ir na URL; token de pagamento fica em cookie HttpOnly no backend.
54
- Decoration: relativa (<code>/checkout#payment</code>), absoluta e exclusões (mailto, download, social).
62
+ <code>sid</code> público da URL <strong>não</strong> é o
63
+ <code>session_id</code> interno do Pixel. <code>order_id</code> pode ir na
64
+ URL; token de pagamento fica em cookie HttpOnly no backend. Decoration:
65
+ relativa (<code>/checkout#payment</code>), absoluta e exclusões (mailto,
66
+ download, social).
55
67
  </p>
56
68
 
57
69
  <div class="card">
58
70
  <h2>Links</h2>
59
- <a id="checkout-link" href="https://checkout.bemony.com/pay">Ir para checkout</a>
60
- <a id="checkout-relative" href="/checkout#payment">Relativo + hash (vira ?sid=#payment)</a>
61
- <a id="upsell-accept-link" href="https://security.bemony.com/upsell/accept">Sim, quero o upsell</a>
62
- <a id="upsell-decline-link" href="https://security.bemony.com/upsell/decline">Não, obrigado</a>
63
- <a id="external-link" href="https://facebook.com/test">Link externo (ignorado)</a>
64
- <a id="ignored-link" href="https://checkout.bemony.com/pay" data-no-url-context>Ignorado por selector</a>
71
+ <a id="checkout-link" href="https://checkout.bemony.com/pay"
72
+ >Ir para checkout</a
73
+ >
74
+ <a id="checkout-relative" href="/checkout#payment"
75
+ >Relativo + hash (vira ?sid=#payment)</a
76
+ >
77
+ <a
78
+ id="upsell-accept-link"
79
+ href="https://security.bemony.com/upsell/accept"
80
+ >Sim, quero o upsell</a
81
+ >
82
+ <a
83
+ id="upsell-decline-link"
84
+ href="https://security.bemony.com/upsell/decline"
85
+ >Não, obrigado</a
86
+ >
87
+ <a id="external-link" href="https://facebook.com/test"
88
+ >Link externo (ignorado)</a
89
+ >
90
+ <a
91
+ id="ignored-link"
92
+ href="https://checkout.bemony.com/pay"
93
+ data-no-url-context
94
+ >Ignorado por selector</a
95
+ >
65
96
  <a id="download-link" href="/file.pdf" download>Download ignorado</a>
66
97
  <a id="mailto-link" href="mailto:test@example.com">Mailto ignorado</a>
67
98
  </div>
@@ -77,7 +108,7 @@
77
108
  <pre id="out">Aguardando init…</pre>
78
109
  </div>
79
110
 
80
- <script src="../../dist/v2/global.global.js"></script>
111
+ <script src="../../../v2/global.global.js"></script>
81
112
  <script>
82
113
  (function () {
83
114
  var out = document.getElementById('out');
@@ -161,9 +192,12 @@
161
192
  document.getElementById('btn-ic').onclick = function () {
162
193
  if (!pixel) return;
163
194
  pixel.initiateCheckout();
164
- log('INITIATE_CHECKOUT disparado — ver query_params/url_context no Transport/debug', {
165
- snapshot: pixel.getDebugServices().urlContext.getSnapshot(),
166
- });
195
+ log(
196
+ 'INITIATE_CHECKOUT disparado — ver query_params/url_context no Transport/debug',
197
+ {
198
+ snapshot: pixel.getDebugServices().urlContext.getSnapshot(),
199
+ }
200
+ );
167
201
  };
168
202
  })();
169
203
  </script>
@@ -177,7 +177,7 @@ code { font-size: 0.85em; }
177
177
  </div>
178
178
  </div>
179
179
 
180
- <script src="../../../dist/v2/global.global.js"></script>
180
+ <script src="../../../v2/global.global.js"></script>
181
181
  <script>
182
182
  const { Pixel, DEFAULT_PIXEL_CONFIG } = window.PixelV2;
183
183
  const API_ENDPOINT =
@@ -156,7 +156,7 @@ code { font-size: 0.85em; }
156
156
  </div>
157
157
  </div>
158
158
 
159
- <script src="../../../dist/v2/global.global.js"></script>
159
+ <script src="../../../v2/global.global.js"></script>
160
160
  <script>
161
161
  const { Pixel, DEFAULT_PIXEL_CONFIG } = window.PixelV2;
162
162
  const API_ENDPOINT =
@@ -170,7 +170,7 @@ code { font-size: 0.85em; }
170
170
  </div>
171
171
  </div>
172
172
 
173
- <script src="../../../dist/v2/global.global.js"></script>
173
+ <script src="../../../v2/global.global.js"></script>
174
174
  <script>
175
175
  const { Pixel, DEFAULT_PIXEL_CONFIG } = window.PixelV2;
176
176
  const API_ENDPOINT =
@@ -162,7 +162,7 @@ code { font-size: 0.85em; }
162
162
  </div>
163
163
  </div>
164
164
 
165
- <script src="../../../dist/v2/global.global.js"></script>
165
+ <script src="../../../v2/global.global.js"></script>
166
166
  <script>
167
167
  const { Pixel, DEFAULT_PIXEL_CONFIG } = window.PixelV2;
168
168
  const API_ENDPOINT =
@@ -166,7 +166,7 @@ code { font-size: 0.85em; }
166
166
  </div>
167
167
  </div>
168
168
 
169
- <script src="../../../dist/v2/global.global.js"></script>
169
+ <script src="../../../v2/global.global.js"></script>
170
170
  <script>
171
171
  const { Pixel, DEFAULT_PIXEL_CONFIG } = window.PixelV2;
172
172
  const API_ENDPOINT =
@@ -171,7 +171,7 @@ code { font-size: 0.85em; }
171
171
  </div>
172
172
  </div>
173
173
 
174
- <script src="../../../dist/v2/global.global.js"></script>
174
+ <script src="../../../v2/global.global.js"></script>
175
175
  <script>
176
176
  const { Pixel, DEFAULT_PIXEL_CONFIG } = window.PixelV2;
177
177
  const API_ENDPOINT =
@@ -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 =
@@ -10,5 +10,6 @@ A validação RC (Etapa 13A) vive em:
10
10
  Pós-build:
11
11
 
12
12
  ```txt
13
- dist/examples/html-script/release-candidate.html
13
+ packages/pixel/dist/examples/html-script/release-candidate.html
14
+
14
15
  ```
@@ -1,36 +1,36 @@
1
1
  # Pixel v2 — Examples (índice)
2
2
 
3
3
  > **Playgrounds oficiais de Commerce + AutoTrack:**
4
- > [`../html-script/`](../html-script/README.md)
4
+ > [`../`](../README.md) (`apps/playground-html/`)
5
5
 
6
- **Versão RC:** `@beworke/pixel` `0.1.0-rc.4` · Etapas 1–15B concluídas
6
+ **Versão RC:** `@beworke/pixel` `0.1.0-rc.6` · Etapas 1–20 concluídas
7
7
 
8
- A pasta histórica `examples/v2/` foi consolidada em `examples/html-script/` (Etapa 12L+), com um playground por evento/cenário.
8
+ A pasta histórica `examples/v2/` foi consolidada em `apps/playground-html/` (Etapa 12L+), com um playground por evento/cenário.
9
9
 
10
10
  Não existe mais um único `example-commerce-autotrack.html` monolítico. Use:
11
11
 
12
12
  ```txt
13
- examples/html-script/release-candidate.html # RC 13A (script tag + API)
14
- examples/html-script/example-landing-commerce.html # landing_page + PAGE_VIEW (14A)
15
- examples/html-script/RELEASE_CANDIDATE.md
16
- examples/html-script/lead/
17
- examples/html-script/add-to-cart/
13
+ apps/playground-html/release-candidate.html # RC 13A (script tag + API)
14
+ apps/playground-html/example-landing-commerce.html # landing_page + PAGE_VIEW (14A)
15
+ apps/playground-html/RELEASE_CANDIDATE.md
16
+ apps/playground-html/lead/
17
+ apps/playground-html/add-to-cart/
18
18
  …
19
- examples/html-script/example-conversion.html
19
+ apps/playground-html/example-conversion.html
20
20
  ```
21
21
 
22
- Pós-build:
22
+ Pós-build (pacote / cópia empacotada):
23
23
 
24
24
  ```txt
25
- dist/examples/html-script/
26
- dist/v2/global.global.js # globalName: PixelV2
25
+ packages/pixel/dist/examples/html-script/
26
+ packages/pixel/dist/v2/global.global.js # globalName: PixelV2
27
27
  ```
28
28
 
29
29
  ## Testes / smoke
30
30
 
31
31
  ```bash
32
- npm test
33
- npm run test:smoke:real # skip seguro sem .env
32
+ pnpm test
33
+ pnpm --filter @beworke/pixel test:smoke:real # skip seguro sem .env
34
34
  ```
35
35
 
36
- Ver também: `PIXEL_V2_COMMERCE_AUTOTRACK_PLAN.md` (12L–14C) e `PIXEL_V2_BACKLOG_PENDENCIAS_ISOLADO.md`.
36
+ Ver também: `PLAN_PIXEL/PIXEL_V2_COMMERCE_AUTOTRACK_PLAN.md` e `PLAN_PIXEL/PIXEL_V2_BACKLOG_PENDENCIAS_ISOLADO.md`.
@@ -1,4 +1,4 @@
1
- import { c as UrlContextPayload, U as UrlContextConfig, d as UrlContextSnapshot } from './url-context-BjAsQoVl.js';
1
+ import { d as UrlContextPayload, U as UrlContextConfig, a as UrlContextSnapshot } from './url-context-Ck2LK18V.js';
2
2
 
3
3
  type AttributionIdentifiers = {
4
4
  readonly fbclid?: string;
@@ -302,13 +302,19 @@ interface LeadData {
302
302
  readonly fields?: Record<string, unknown>;
303
303
  }
304
304
  interface AddToCartData {
305
+ /** Identidade do item (= priceId público Bemony). */
306
+ readonly id?: string;
307
+ readonly priceId?: string;
305
308
  readonly productId?: string;
309
+ readonly offerId?: string;
306
310
  readonly productName?: string;
307
311
  readonly price?: number;
308
312
  readonly currency?: string;
309
313
  readonly quantity?: number;
310
314
  }
311
315
  interface RemoveFromCartData {
316
+ readonly id?: string;
317
+ readonly priceId?: string;
312
318
  readonly productId?: string;
313
319
  readonly quantity?: number;
314
320
  }
@@ -322,6 +328,10 @@ interface AddPaymentInfoData {
322
328
  readonly paymentMethod?: PaymentMethod;
323
329
  }
324
330
  interface ViewContentData {
331
+ readonly id?: string;
332
+ readonly priceId?: string;
333
+ readonly productId?: string;
334
+ readonly offerId?: string;
325
335
  readonly contentId?: string;
326
336
  readonly contentType?: string;
327
337
  readonly category?: string;
@@ -415,10 +425,19 @@ declare class UrlContextService {
415
425
  private managedResolver;
416
426
  private decorator;
417
427
  private snapshot;
428
+ private managedConfigs;
429
+ private decorateManaged;
418
430
  private initialized;
419
431
  private enabled;
420
432
  constructor(config: UrlContextConfig | undefined, storage?: StorageService | null);
421
433
  init(): void;
434
+ /**
435
+ * Define ou substitui um managed param após o init (ex.: `oid` no checkout).
436
+ * Idempotente para o mesmo valor. Persistência e decoração seguem a config do param.
437
+ *
438
+ * @returns false se UrlContext desabilitado, não inicializado ou param não configurado.
439
+ */
440
+ setManagedParam(param: string, value: string): boolean;
422
441
  destroy(): void;
423
442
  /** Alias de destroy — cleanup completo sem listeners/refs. */
424
443
  dispose(): void;
@@ -438,4 +457,4 @@ declare class BaseEventBuilder {
438
457
  }>(event: T): T & BasePixelEvent;
439
458
  }
440
459
 
441
- export { type EngagementEventCategory as $, type AttributionService as A, type BrowserMetadataService as B, type EngagementSummaryEvent as C, DEFAULT_ATTRIBUTION_CONFIG as D, type ExitIntentEvent as E, type BehaviorSessionSummaryEvent as F, type BehaviorSessionSummaryReason as G, type BehaviorState as H, type InitiateCheckoutData as I, type EngagementLevel as J, type EngagementUpdateReason as K, type LeadData as L, type PurchaseEvent as M, type LeadEvent as N, type AddToCartEvent as O, type PixelEvent as P, type RemoveFromCartEvent as Q, type RemoveFromCartData as R, type StorageAdapter as S, type InitiateCheckoutEvent as T, UrlContextService as U, type ViewContentData as V, type AddPaymentInfoEvent as W, type ViewContentEvent as X, type SearchEvent as Y, type ConversionEventData as Z, type PixelEventCategory as _, type PixelItem as a, type ConversionEventCategory as a0, type ElementDescriptor as a1, type StorageService as b, BaseEventBuilder as c, type AttributionConfig as d, type AttributionIdentifiers as e, type BrowserMetadata as f, type BasePixelEvent as g, type PageViewEvent as h, type SessionRenewedEvent as i, type SessionExpiredEvent as j, ATTRIBUTION_STORAGE_KEY as k, type PurchaseData as l, type AddToCartData as m, type AddPaymentInfoData as n, type SearchData as o, type ScrollEvent as p, type PageClickEvent as q, type RageClickEvent as r, type VisibilityChangeEvent as s, type UserIdleEvent as t, type UserActiveEvent as u, type BehaviorHeartbeatEvent as v, type ViewportEnterEvent as w, type ViewportExitEvent as x, type ViewportExitReason as y, type EngagementUpdateEvent as z };
460
+ export { type EngagementEventCategory as $, type AttributionService as A, type BrowserMetadataService as B, type EngagementSummaryEvent as C, DEFAULT_ATTRIBUTION_CONFIG as D, type ExitIntentEvent as E, type BehaviorSessionSummaryEvent as F, type BehaviorSessionSummaryReason as G, type BehaviorState as H, type InitiateCheckoutData as I, type EngagementLevel as J, type EngagementUpdateReason as K, type LeadData as L, type PurchaseEvent as M, type LeadEvent as N, type AddToCartEvent as O, type PixelEvent as P, type RemoveFromCartEvent as Q, type RemoveFromCartData as R, type StorageService as S, type InitiateCheckoutEvent as T, UrlContextService as U, type ViewContentData as V, type AddPaymentInfoEvent as W, type ViewContentEvent as X, type SearchEvent as Y, type ConversionEventData as Z, type PixelEventCategory as _, type StorageAdapter as a, type ConversionEventCategory as a0, type ElementDescriptor as a1, type PixelItem as b, BaseEventBuilder as c, type AttributionConfig as d, type AttributionIdentifiers as e, type BrowserMetadata as f, type BasePixelEvent as g, type PageViewEvent as h, type SessionRenewedEvent as i, type SessionExpiredEvent as j, ATTRIBUTION_STORAGE_KEY as k, type PurchaseData as l, type AddToCartData as m, type AddPaymentInfoData as n, type SearchData as o, type ScrollEvent as p, type PageClickEvent as q, type RageClickEvent as r, type VisibilityChangeEvent as s, type UserIdleEvent as t, type UserActiveEvent as u, type BehaviorHeartbeatEvent as v, type ViewportEnterEvent as w, type ViewportExitEvent as x, type ViewportExitReason as y, type EngagementUpdateEvent as z };
@@ -1,4 +1,4 @@
1
- import { c as UrlContextPayload, U as UrlContextConfig, d as UrlContextSnapshot } from './url-context-BjAsQoVl.mjs';
1
+ import { d as UrlContextPayload, U as UrlContextConfig, a as UrlContextSnapshot } from './url-context-Ck2LK18V.mjs';
2
2
 
3
3
  type AttributionIdentifiers = {
4
4
  readonly fbclid?: string;
@@ -302,13 +302,19 @@ interface LeadData {
302
302
  readonly fields?: Record<string, unknown>;
303
303
  }
304
304
  interface AddToCartData {
305
+ /** Identidade do item (= priceId público Bemony). */
306
+ readonly id?: string;
307
+ readonly priceId?: string;
305
308
  readonly productId?: string;
309
+ readonly offerId?: string;
306
310
  readonly productName?: string;
307
311
  readonly price?: number;
308
312
  readonly currency?: string;
309
313
  readonly quantity?: number;
310
314
  }
311
315
  interface RemoveFromCartData {
316
+ readonly id?: string;
317
+ readonly priceId?: string;
312
318
  readonly productId?: string;
313
319
  readonly quantity?: number;
314
320
  }
@@ -322,6 +328,10 @@ interface AddPaymentInfoData {
322
328
  readonly paymentMethod?: PaymentMethod;
323
329
  }
324
330
  interface ViewContentData {
331
+ readonly id?: string;
332
+ readonly priceId?: string;
333
+ readonly productId?: string;
334
+ readonly offerId?: string;
325
335
  readonly contentId?: string;
326
336
  readonly contentType?: string;
327
337
  readonly category?: string;
@@ -415,10 +425,19 @@ declare class UrlContextService {
415
425
  private managedResolver;
416
426
  private decorator;
417
427
  private snapshot;
428
+ private managedConfigs;
429
+ private decorateManaged;
418
430
  private initialized;
419
431
  private enabled;
420
432
  constructor(config: UrlContextConfig | undefined, storage?: StorageService | null);
421
433
  init(): void;
434
+ /**
435
+ * Define ou substitui um managed param após o init (ex.: `oid` no checkout).
436
+ * Idempotente para o mesmo valor. Persistência e decoração seguem a config do param.
437
+ *
438
+ * @returns false se UrlContext desabilitado, não inicializado ou param não configurado.
439
+ */
440
+ setManagedParam(param: string, value: string): boolean;
422
441
  destroy(): void;
423
442
  /** Alias de destroy — cleanup completo sem listeners/refs. */
424
443
  dispose(): void;
@@ -438,4 +457,4 @@ declare class BaseEventBuilder {
438
457
  }>(event: T): T & BasePixelEvent;
439
458
  }
440
459
 
441
- export { type EngagementEventCategory as $, type AttributionService as A, type BrowserMetadataService as B, type EngagementSummaryEvent as C, DEFAULT_ATTRIBUTION_CONFIG as D, type ExitIntentEvent as E, type BehaviorSessionSummaryEvent as F, type BehaviorSessionSummaryReason as G, type BehaviorState as H, type InitiateCheckoutData as I, type EngagementLevel as J, type EngagementUpdateReason as K, type LeadData as L, type PurchaseEvent as M, type LeadEvent as N, type AddToCartEvent as O, type PixelEvent as P, type RemoveFromCartEvent as Q, type RemoveFromCartData as R, type StorageAdapter as S, type InitiateCheckoutEvent as T, UrlContextService as U, type ViewContentData as V, type AddPaymentInfoEvent as W, type ViewContentEvent as X, type SearchEvent as Y, type ConversionEventData as Z, type PixelEventCategory as _, type PixelItem as a, type ConversionEventCategory as a0, type ElementDescriptor as a1, type StorageService as b, BaseEventBuilder as c, type AttributionConfig as d, type AttributionIdentifiers as e, type BrowserMetadata as f, type BasePixelEvent as g, type PageViewEvent as h, type SessionRenewedEvent as i, type SessionExpiredEvent as j, ATTRIBUTION_STORAGE_KEY as k, type PurchaseData as l, type AddToCartData as m, type AddPaymentInfoData as n, type SearchData as o, type ScrollEvent as p, type PageClickEvent as q, type RageClickEvent as r, type VisibilityChangeEvent as s, type UserIdleEvent as t, type UserActiveEvent as u, type BehaviorHeartbeatEvent as v, type ViewportEnterEvent as w, type ViewportExitEvent as x, type ViewportExitReason as y, type EngagementUpdateEvent as z };
460
+ export { type EngagementEventCategory as $, type AttributionService as A, type BrowserMetadataService as B, type EngagementSummaryEvent as C, DEFAULT_ATTRIBUTION_CONFIG as D, type ExitIntentEvent as E, type BehaviorSessionSummaryEvent as F, type BehaviorSessionSummaryReason as G, type BehaviorState as H, type InitiateCheckoutData as I, type EngagementLevel as J, type EngagementUpdateReason as K, type LeadData as L, type PurchaseEvent as M, type LeadEvent as N, type AddToCartEvent as O, type PixelEvent as P, type RemoveFromCartEvent as Q, type RemoveFromCartData as R, type StorageService as S, type InitiateCheckoutEvent as T, UrlContextService as U, type ViewContentData as V, type AddPaymentInfoEvent as W, type ViewContentEvent as X, type SearchEvent as Y, type ConversionEventData as Z, type PixelEventCategory as _, type StorageAdapter as a, type ConversionEventCategory as a0, type ElementDescriptor as a1, type PixelItem as b, BaseEventBuilder as c, type AttributionConfig as d, type AttributionIdentifiers as e, type BrowserMetadata as f, type BasePixelEvent as g, type PageViewEvent as h, type SessionRenewedEvent as i, type SessionExpiredEvent as j, ATTRIBUTION_STORAGE_KEY as k, type PurchaseData as l, type AddToCartData as m, type AddPaymentInfoData as n, type SearchData as o, type ScrollEvent as p, type PageClickEvent as q, type RageClickEvent as r, type VisibilityChangeEvent as s, type UserIdleEvent as t, type UserActiveEvent as u, type BehaviorHeartbeatEvent as v, type ViewportEnterEvent as w, type ViewportExitEvent as x, type ViewportExitReason as y, type EngagementUpdateEvent as z };