@c15t/scripts 2.2.0 → 3.0.0-alpha.0

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 (197) hide show
  1. package/AGENTS.md +74 -48
  2. package/README.md +3 -3
  3. package/dist/e2e-test-utils.js +60 -24
  4. package/dist/engine/compile.js +45 -45
  5. package/dist/engine/runtime.js +119 -119
  6. package/dist/registry.js +186 -176
  7. package/dist/resolve.js +12 -12
  8. package/dist/vendors/_shared/attributes.js +5 -5
  9. package/dist/vendors/_shared/google-consent.js +10 -10
  10. package/dist/vendors/_shared/install-builders.js +9 -9
  11. package/dist/vendors/_shared/script-url.js +12 -12
  12. package/dist/vendors/ads-and-pixels/linkedin-insights.js +16 -16
  13. package/dist/vendors/ads-and-pixels/meta-pixel.js +82 -82
  14. package/dist/vendors/ads-and-pixels/microsoft-uet.js +57 -57
  15. package/dist/vendors/ads-and-pixels/openai-pixel.js +88 -0
  16. package/dist/vendors/ads-and-pixels/reddit-pixel.js +39 -39
  17. package/dist/vendors/ads-and-pixels/snapchat-pixel.js +25 -25
  18. package/dist/vendors/ads-and-pixels/tiktok-pixel.js +31 -31
  19. package/dist/vendors/ads-and-pixels/x-pixel.js +17 -17
  20. package/dist/vendors/analytics/adobe-analytics.js +17 -17
  21. package/dist/vendors/analytics/ahrefs-analytics.js +8 -8
  22. package/dist/vendors/analytics/amplitude.js +39 -39
  23. package/dist/vendors/analytics/clearbit.js +11 -11
  24. package/dist/vendors/analytics/cloudflare-web-analytics.js +13 -13
  25. package/dist/vendors/analytics/databuddy.js +45 -45
  26. package/dist/vendors/analytics/fathom-analytics.js +15 -15
  27. package/dist/vendors/analytics/google-tag.js +23 -23
  28. package/dist/vendors/analytics/heap.js +37 -37
  29. package/dist/vendors/analytics/hightouch.js +30 -30
  30. package/dist/vendors/analytics/hotjar.js +14 -14
  31. package/dist/vendors/analytics/logrocket.js +24 -24
  32. package/dist/vendors/analytics/matomo-analytics.js +51 -51
  33. package/dist/vendors/analytics/microsoft-clarity.js +31 -31
  34. package/dist/vendors/analytics/mixpanel-analytics.js +31 -31
  35. package/dist/vendors/analytics/pirsch.js +27 -27
  36. package/dist/vendors/analytics/plausible-analytics.js +24 -24
  37. package/dist/vendors/analytics/posthog.js +84 -79
  38. package/dist/vendors/analytics/promptwatch.js +8 -8
  39. package/dist/vendors/analytics/rudderstack.js +50 -50
  40. package/dist/vendors/analytics/rybbit-analytics.js +30 -30
  41. package/dist/vendors/analytics/segment.js +16 -16
  42. package/dist/vendors/analytics/umami-analytics.js +16 -16
  43. package/dist/vendors/analytics/vercel-analytics.js +22 -22
  44. package/dist/vendors/functional/crisp.js +49 -51
  45. package/dist/vendors/functional/intercom.js +18 -18
  46. package/dist/vendors/tag-managers/google-tag-manager.js +20 -20
  47. package/dist-types/__tests__/helpers.d.ts +10 -10
  48. package/dist-types/engine/compile.d.ts +2 -2
  49. package/dist-types/engine/runtime.d.ts +3 -3
  50. package/dist-types/registry.d.ts +182 -173
  51. package/dist-types/resolve.d.ts +2 -2
  52. package/dist-types/types.d.ts +2 -2
  53. package/dist-types/vendors/_shared/attributes.d.ts +2 -2
  54. package/dist-types/vendors/_shared/google-consent.d.ts +2 -2
  55. package/dist-types/vendors/_shared/install-builders.d.ts +1 -1
  56. package/dist-types/vendors/_shared/script-url.d.ts +6 -6
  57. package/dist-types/vendors/ads-and-pixels/linkedin-insights.d.ts +14 -14
  58. package/dist-types/vendors/ads-and-pixels/meta-pixel.d.ts +27 -27
  59. package/dist-types/vendors/ads-and-pixels/microsoft-uet.d.ts +40 -40
  60. package/dist-types/vendors/ads-and-pixels/openai-pixel.d.ts +211 -0
  61. package/dist-types/vendors/ads-and-pixels/reddit-pixel.d.ts +28 -29
  62. package/dist-types/vendors/ads-and-pixels/snapchat-pixel.d.ts +23 -23
  63. package/dist-types/vendors/ads-and-pixels/tiktok-pixel.d.ts +22 -22
  64. package/dist-types/vendors/ads-and-pixels/x-pixel.d.ts +15 -15
  65. package/dist-types/vendors/analytics/adobe-analytics.d.ts +3 -3
  66. package/dist-types/vendors/analytics/ahrefs-analytics.d.ts +5 -5
  67. package/dist-types/vendors/analytics/amplitude.d.ts +24 -24
  68. package/dist-types/vendors/analytics/clearbit.d.ts +5 -5
  69. package/dist-types/vendors/analytics/cloudflare-web-analytics.d.ts +6 -6
  70. package/dist-types/vendors/analytics/databuddy.d.ts +34 -31
  71. package/dist-types/vendors/analytics/fathom-analytics.d.ts +8 -8
  72. package/dist-types/vendors/analytics/google-tag.d.ts +17 -17
  73. package/dist-types/vendors/analytics/heap.d.ts +17 -17
  74. package/dist-types/vendors/analytics/hightouch.d.ts +15 -15
  75. package/dist-types/vendors/analytics/hotjar.d.ts +9 -9
  76. package/dist-types/vendors/analytics/logrocket.d.ts +11 -11
  77. package/dist-types/vendors/analytics/matomo-analytics.d.ts +3 -3
  78. package/dist-types/vendors/analytics/microsoft-clarity.d.ts +12 -13
  79. package/dist-types/vendors/analytics/mixpanel-analytics.d.ts +20 -20
  80. package/dist-types/vendors/analytics/pirsch.d.ts +10 -10
  81. package/dist-types/vendors/analytics/plausible-analytics.d.ts +13 -13
  82. package/dist-types/vendors/analytics/posthog.d.ts +35 -32
  83. package/dist-types/vendors/analytics/promptwatch.d.ts +5 -5
  84. package/dist-types/vendors/analytics/rudderstack.d.ts +16 -16
  85. package/dist-types/vendors/analytics/rybbit-analytics.d.ts +15 -15
  86. package/dist-types/vendors/analytics/segment.d.ts +11 -11
  87. package/dist-types/vendors/analytics/umami-analytics.d.ts +9 -9
  88. package/dist-types/vendors/analytics/vercel-analytics.d.ts +13 -13
  89. package/dist-types/vendors/functional/crisp.d.ts +9 -9
  90. package/dist-types/vendors/functional/intercom.d.ts +12 -12
  91. package/dist-types/vendors/tag-managers/google-tag-manager.d.ts +16 -16
  92. package/docs/README.md +74 -48
  93. package/docs/assets/v3/brand-bar.png +0 -0
  94. package/docs/assets/v3/brand-card.png +0 -0
  95. package/docs/assets/v3/choice-wall.png +0 -0
  96. package/docs/assets/v3/mobile-card.png +0 -0
  97. package/docs/assets/v3/preferences.png +0 -0
  98. package/docs/customization/overview.md +45 -0
  99. package/docs/customization/recipes.md +79 -0
  100. package/docs/customization/slots.md +55 -0
  101. package/docs/customization/tokens.md +76 -0
  102. package/docs/customization/translations.md +49 -0
  103. package/docs/frameworks/javascript/script-loader.md +30 -339
  104. package/docs/frameworks/next/script-loader.md +134 -467
  105. package/docs/frameworks/react/script-loader.md +35 -535
  106. package/docs/guides/consent-state.md +60 -0
  107. package/docs/guides/data-fetching.md +163 -0
  108. package/docs/guides/deployment-modes.md +63 -0
  109. package/docs/guides/troubleshooting.md +68 -0
  110. package/docs/guides/verify-consent.md +62 -0
  111. package/docs/integrations/adobe-analytics.md +239 -105
  112. package/docs/integrations/ahrefs-analytics.md +238 -104
  113. package/docs/integrations/amplitude.md +219 -157
  114. package/docs/integrations/building-integrations.md +32 -224
  115. package/docs/integrations/clearbit.md +247 -86
  116. package/docs/integrations/cloudflare-web-analytics.md +250 -84
  117. package/docs/integrations/crisp.md +251 -97
  118. package/docs/integrations/databuddy.md +259 -153
  119. package/docs/integrations/fathom-analytics.md +239 -96
  120. package/docs/integrations/google-maps.md +328 -207
  121. package/docs/integrations/google-tag-manager.md +248 -96
  122. package/docs/integrations/google-tag.md +261 -90
  123. package/docs/integrations/heap.md +222 -149
  124. package/docs/integrations/hightouch.md +225 -131
  125. package/docs/integrations/hotjar.md +239 -90
  126. package/docs/integrations/intercom.md +239 -98
  127. package/docs/integrations/linkedin-insights.md +243 -113
  128. package/docs/integrations/logrocket.md +241 -123
  129. package/docs/integrations/matomo-analytics.md +256 -111
  130. package/docs/integrations/meta-pixel.md +197 -324
  131. package/docs/integrations/microsoft-clarity.md +233 -114
  132. package/docs/integrations/microsoft-uet.md +245 -110
  133. package/docs/integrations/mixpanel-analytics.md +252 -87
  134. package/docs/integrations/openai-pixel.md +441 -0
  135. package/docs/integrations/overview.md +95 -133
  136. package/docs/integrations/pirsch.md +249 -96
  137. package/docs/integrations/plausible-analytics.md +241 -100
  138. package/docs/integrations/posthog.md +353 -214
  139. package/docs/integrations/promptwatch.md +251 -81
  140. package/docs/integrations/reddit-pixel.md +226 -173
  141. package/docs/integrations/rudderstack.md +244 -187
  142. package/docs/integrations/rybbit-analytics.md +244 -91
  143. package/docs/integrations/segment.md +238 -92
  144. package/docs/integrations/snapchat-pixel.md +240 -110
  145. package/docs/integrations/tiktok-pixel.md +249 -81
  146. package/docs/integrations/umami-analytics.md +242 -95
  147. package/docs/integrations/vercel-analytics.md +242 -90
  148. package/docs/integrations/x-pixel.md +238 -104
  149. package/docs/integrations/youtube.md +354 -142
  150. package/docs/upgrade-v3.md +334 -0
  151. package/package.json +85 -78
  152. package/readme.json +2 -2
  153. package/dist/e2e-test-utils.cjs +0 -166
  154. package/dist/engine/compile.cjs +0 -130
  155. package/dist/engine/runtime.cjs +0 -475
  156. package/dist/registry.cjs +0 -423
  157. package/dist/resolve.cjs +0 -71
  158. package/dist/types.cjs +0 -69
  159. package/dist/vendors/_shared/attributes.cjs +0 -55
  160. package/dist/vendors/_shared/google-consent.cjs +0 -69
  161. package/dist/vendors/_shared/install-builders.cjs +0 -59
  162. package/dist/vendors/_shared/script-url.cjs +0 -78
  163. package/dist/vendors/ads-and-pixels/linkedin-insights.cjs +0 -89
  164. package/dist/vendors/ads-and-pixels/meta-pixel.cjs +0 -206
  165. package/dist/vendors/ads-and-pixels/microsoft-uet.cjs +0 -151
  166. package/dist/vendors/ads-and-pixels/reddit-pixel.cjs +0 -151
  167. package/dist/vendors/ads-and-pixels/snapchat-pixel.cjs +0 -131
  168. package/dist/vendors/ads-and-pixels/tiktok-pixel.cjs +0 -130
  169. package/dist/vendors/ads-and-pixels/x-pixel.cjs +0 -92
  170. package/dist/vendors/analytics/adobe-analytics.cjs +0 -90
  171. package/dist/vendors/analytics/ahrefs-analytics.cjs +0 -68
  172. package/dist/vendors/analytics/amplitude.cjs +0 -193
  173. package/dist/vendors/analytics/clearbit.cjs +0 -69
  174. package/dist/vendors/analytics/cloudflare-web-analytics.cjs +0 -73
  175. package/dist/vendors/analytics/databuddy.cjs +0 -144
  176. package/dist/vendors/analytics/fathom-analytics.cjs +0 -76
  177. package/dist/vendors/analytics/google-tag.cjs +0 -107
  178. package/dist/vendors/analytics/heap.cjs +0 -181
  179. package/dist/vendors/analytics/hightouch.cjs +0 -153
  180. package/dist/vendors/analytics/hotjar.cjs +0 -85
  181. package/dist/vendors/analytics/logrocket.cjs +0 -99
  182. package/dist/vendors/analytics/matomo-analytics.cjs +0 -232
  183. package/dist/vendors/analytics/microsoft-clarity.cjs +0 -138
  184. package/dist/vendors/analytics/mixpanel-analytics.cjs +0 -134
  185. package/dist/vendors/analytics/pirsch.cjs +0 -108
  186. package/dist/vendors/analytics/plausible-analytics.cjs +0 -122
  187. package/dist/vendors/analytics/posthog.cjs +0 -236
  188. package/dist/vendors/analytics/promptwatch.cjs +0 -70
  189. package/dist/vendors/analytics/rudderstack.cjs +0 -227
  190. package/dist/vendors/analytics/rybbit-analytics.cjs +0 -104
  191. package/dist/vendors/analytics/segment.cjs +0 -97
  192. package/dist/vendors/analytics/umami-analytics.cjs +0 -80
  193. package/dist/vendors/analytics/vercel-analytics.cjs +0 -94
  194. package/dist/vendors/functional/crisp.cjs +0 -143
  195. package/dist/vendors/functional/intercom.cjs +0 -89
  196. package/dist/vendors/tag-managers/google-tag-manager.cjs +0 -100
  197. package/docs/shared/react/guides/script-loader.md +0 -311
package/dist/registry.cjs DELETED
@@ -1,423 +0,0 @@
1
- "use strict";
2
- var __webpack_require__ = {};
3
- (()=>{
4
- __webpack_require__.d = (exports1, getters, values)=>{
5
- var define = (defs, kind)=>{
6
- for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
7
- enumerable: true,
8
- [kind]: defs[key]
9
- });
10
- };
11
- define(getters, "get");
12
- define(values, "value");
13
- };
14
- })();
15
- (()=>{
16
- __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
17
- })();
18
- (()=>{
19
- __webpack_require__.r = (exports1)=>{
20
- if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
21
- value: 'Module'
22
- });
23
- Object.defineProperty(exports1, '__esModule', {
24
- value: true
25
- });
26
- };
27
- })();
28
- var __webpack_exports__ = {};
29
- __webpack_require__.r(__webpack_exports__);
30
- const BUILT_IN_INTEGRATION_CATEGORIES = [
31
- {
32
- key: 'analytics',
33
- label: 'Analytics'
34
- },
35
- {
36
- key: 'ads-and-pixels',
37
- label: 'Ads & Pixels'
38
- },
39
- {
40
- key: 'functional',
41
- label: 'Functional'
42
- },
43
- {
44
- key: 'tag-manager',
45
- label: 'Tag Managers'
46
- }
47
- ];
48
- const builtInScriptIntegrations = [
49
- {
50
- key: 'googleTagManager',
51
- vendor: 'google-tag-manager',
52
- label: 'Google Tag Manager',
53
- hint: "GTM container script",
54
- docsSlug: 'google-tag-manager',
55
- packageSubpath: 'google-tag-manager',
56
- integrationCategory: 'tag-manager',
57
- consentCategory: 'necessary'
58
- },
59
- {
60
- key: 'gtag',
61
- vendor: 'gtag',
62
- label: 'Google Tag (gtag.js)',
63
- hint: 'Google Analytics 4',
64
- docsSlug: 'google-tag',
65
- packageSubpath: 'google-tag',
66
- integrationCategory: 'analytics',
67
- consentCategory: 'measurement'
68
- },
69
- {
70
- key: 'ahrefsAnalytics',
71
- vendor: 'ahrefs-analytics',
72
- label: 'Ahrefs Analytics',
73
- hint: 'Cookieless web analytics from Ahrefs',
74
- docsSlug: 'ahrefs-analytics',
75
- packageSubpath: 'ahrefs-analytics',
76
- integrationCategory: 'analytics',
77
- consentCategory: 'measurement'
78
- },
79
- {
80
- key: 'adobeAnalytics',
81
- vendor: 'adobe-analytics',
82
- label: 'Adobe Analytics',
83
- hint: 'Adobe Experience Platform tags',
84
- docsSlug: 'adobe-analytics',
85
- packageSubpath: 'adobe-analytics',
86
- integrationCategory: 'analytics',
87
- consentCategory: 'measurement'
88
- },
89
- {
90
- key: 'amplitude',
91
- vendor: 'amplitude',
92
- label: 'Amplitude',
93
- hint: 'Product analytics',
94
- docsSlug: 'amplitude',
95
- packageSubpath: 'amplitude',
96
- integrationCategory: 'analytics',
97
- consentCategory: 'measurement'
98
- },
99
- {
100
- key: 'cloudflareWebAnalytics',
101
- vendor: 'cloudflare-web-analytics',
102
- label: 'Cloudflare Web Analytics',
103
- hint: 'Cookieless analytics from Cloudflare',
104
- docsSlug: 'cloudflare-web-analytics',
105
- packageSubpath: 'cloudflare-web-analytics',
106
- integrationCategory: 'analytics',
107
- consentCategory: 'measurement'
108
- },
109
- {
110
- key: 'clearbit',
111
- vendor: 'clearbit',
112
- label: 'Clearbit',
113
- hint: 'Visitor and company enrichment',
114
- docsSlug: 'clearbit',
115
- packageSubpath: 'clearbit',
116
- integrationCategory: 'analytics',
117
- consentCategory: 'marketing'
118
- },
119
- {
120
- key: 'microsoft-clarity',
121
- vendor: 'microsoft-clarity',
122
- label: 'Microsoft Clarity',
123
- hint: 'Session replay and heatmaps',
124
- docsSlug: 'microsoft-clarity',
125
- packageSubpath: 'microsoft-clarity',
126
- integrationCategory: 'analytics',
127
- consentCategory: 'measurement'
128
- },
129
- {
130
- key: 'databuddy',
131
- vendor: 'databuddy',
132
- label: 'Databuddy',
133
- hint: 'Data collection',
134
- docsSlug: 'databuddy',
135
- packageSubpath: 'databuddy',
136
- integrationCategory: 'analytics',
137
- consentCategory: 'measurement'
138
- },
139
- {
140
- key: 'fathomAnalytics',
141
- vendor: 'fathom-analytics',
142
- label: 'Fathom Analytics',
143
- hint: 'Privacy-friendly cookieless analytics',
144
- docsSlug: 'fathom-analytics',
145
- packageSubpath: 'fathom-analytics',
146
- integrationCategory: 'analytics',
147
- consentCategory: 'measurement'
148
- },
149
- {
150
- key: 'heap',
151
- vendor: 'heap',
152
- label: 'Heap',
153
- hint: 'Autocapture product analytics',
154
- docsSlug: 'heap',
155
- packageSubpath: 'heap',
156
- integrationCategory: 'analytics',
157
- consentCategory: 'measurement'
158
- },
159
- {
160
- key: 'mixpanelAnalytics',
161
- vendor: 'mixpanel-analytics',
162
- label: 'Mixpanel Analytics',
163
- hint: 'Product analytics and funnels',
164
- docsSlug: 'mixpanel-analytics',
165
- packageSubpath: 'mixpanel-analytics',
166
- integrationCategory: 'analytics',
167
- consentCategory: 'measurement'
168
- },
169
- {
170
- key: 'hotjar',
171
- vendor: 'hotjar',
172
- label: 'Hotjar',
173
- hint: 'Heatmaps and session recordings',
174
- docsSlug: 'hotjar',
175
- packageSubpath: 'hotjar',
176
- integrationCategory: 'analytics',
177
- consentCategory: 'measurement'
178
- },
179
- {
180
- key: 'hightouch',
181
- vendor: 'hightouch',
182
- label: 'Hightouch',
183
- hint: 'Customer data platform events',
184
- docsSlug: 'hightouch',
185
- packageSubpath: 'hightouch',
186
- integrationCategory: 'analytics',
187
- consentCategory: 'measurement'
188
- },
189
- {
190
- key: 'rudderstack',
191
- vendor: 'rudderstack',
192
- label: 'RudderStack',
193
- hint: 'Customer data platform events',
194
- docsSlug: 'rudderstack',
195
- packageSubpath: 'rudderstack',
196
- integrationCategory: 'analytics',
197
- consentCategory: 'measurement'
198
- },
199
- {
200
- key: 'logRocket',
201
- vendor: 'logrocket',
202
- label: 'LogRocket',
203
- hint: 'Session replay and monitoring',
204
- docsSlug: 'logrocket',
205
- packageSubpath: 'logrocket',
206
- integrationCategory: 'analytics',
207
- consentCategory: 'measurement'
208
- },
209
- {
210
- key: 'matomoAnalytics',
211
- vendor: 'matomo-analytics',
212
- label: 'Matomo Analytics',
213
- hint: 'Self-hosted privacy analytics',
214
- docsSlug: 'matomo-analytics',
215
- packageSubpath: 'matomo-analytics',
216
- integrationCategory: 'analytics',
217
- consentCategory: 'measurement'
218
- },
219
- {
220
- key: 'posthog',
221
- vendor: 'posthog',
222
- label: 'PostHog',
223
- hint: 'Product analytics',
224
- docsSlug: 'posthog',
225
- packageSubpath: 'posthog',
226
- integrationCategory: 'analytics',
227
- consentCategory: 'measurement'
228
- },
229
- {
230
- key: 'promptwatch',
231
- vendor: 'promptwatch',
232
- label: 'Promptwatch',
233
- hint: 'AI traffic analytics',
234
- docsSlug: 'promptwatch',
235
- packageSubpath: 'promptwatch',
236
- integrationCategory: 'analytics',
237
- consentCategory: 'measurement'
238
- },
239
- {
240
- key: 'pirsch',
241
- vendor: 'pirsch',
242
- label: 'Pirsch',
243
- hint: 'Privacy-friendly cookieless analytics',
244
- docsSlug: 'pirsch',
245
- packageSubpath: 'pirsch',
246
- integrationCategory: 'analytics',
247
- consentCategory: 'measurement'
248
- },
249
- {
250
- key: 'segment',
251
- vendor: 'segment',
252
- label: 'Segment',
253
- hint: 'Customer data platform',
254
- docsSlug: 'segment',
255
- packageSubpath: 'segment',
256
- integrationCategory: 'analytics',
257
- consentCategory: 'measurement'
258
- },
259
- {
260
- key: 'rybbitAnalytics',
261
- vendor: 'rybbit-analytics',
262
- label: 'Rybbit Analytics',
263
- hint: 'Privacy-friendly web analytics',
264
- docsSlug: 'rybbit-analytics',
265
- packageSubpath: 'rybbit-analytics',
266
- integrationCategory: 'analytics',
267
- consentCategory: 'measurement'
268
- },
269
- {
270
- key: 'plausibleAnalytics',
271
- vendor: 'plausible-analytics',
272
- label: 'Plausible Analytics',
273
- hint: 'Privacy-friendly cookieless analytics',
274
- docsSlug: 'plausible-analytics',
275
- packageSubpath: 'plausible-analytics',
276
- integrationCategory: 'analytics',
277
- consentCategory: 'measurement'
278
- },
279
- {
280
- key: 'umamiAnalytics',
281
- vendor: 'umami-analytics',
282
- label: 'Umami Analytics',
283
- hint: 'Open-source cookieless analytics',
284
- docsSlug: 'umami-analytics',
285
- packageSubpath: 'umami-analytics',
286
- integrationCategory: 'analytics',
287
- consentCategory: 'measurement'
288
- },
289
- {
290
- key: 'vercelAnalytics',
291
- vendor: 'vercel-analytics',
292
- label: 'Vercel Analytics',
293
- hint: 'Vercel web analytics',
294
- docsSlug: 'vercel-analytics',
295
- packageSubpath: 'vercel-analytics',
296
- integrationCategory: 'analytics',
297
- consentCategory: 'measurement'
298
- },
299
- {
300
- key: 'crisp',
301
- vendor: 'crisp',
302
- label: 'Crisp',
303
- hint: 'Live chat widget',
304
- docsSlug: 'crisp',
305
- packageSubpath: 'crisp',
306
- integrationCategory: 'functional',
307
- consentCategory: 'functionality'
308
- },
309
- {
310
- key: 'intercom',
311
- vendor: 'intercom',
312
- label: 'Intercom',
313
- hint: 'Messenger and live chat widget',
314
- docsSlug: 'intercom',
315
- packageSubpath: 'intercom',
316
- integrationCategory: 'functional',
317
- consentCategory: 'functionality'
318
- },
319
- {
320
- key: 'metaPixel',
321
- vendor: 'meta-pixel',
322
- label: 'Meta Pixel',
323
- hint: 'Facebook/Instagram tracking',
324
- docsSlug: 'meta-pixel',
325
- packageSubpath: 'meta-pixel',
326
- integrationCategory: 'ads-and-pixels',
327
- consentCategory: 'marketing'
328
- },
329
- {
330
- key: 'redditPixel',
331
- vendor: 'reddit-pixel',
332
- label: 'Reddit Pixel',
333
- hint: 'Reddit ads tracking',
334
- docsSlug: 'reddit-pixel',
335
- packageSubpath: 'reddit-pixel',
336
- integrationCategory: 'ads-and-pixels',
337
- consentCategory: 'marketing'
338
- },
339
- {
340
- key: 'tiktokPixel',
341
- vendor: 'tiktok-pixel',
342
- label: 'TikTok Pixel',
343
- hint: 'TikTok ads tracking',
344
- docsSlug: 'tiktok-pixel',
345
- packageSubpath: 'tiktok-pixel',
346
- integrationCategory: 'ads-and-pixels',
347
- consentCategory: 'marketing'
348
- },
349
- {
350
- key: 'linkedinInsights',
351
- vendor: 'linkedin-insights',
352
- label: 'LinkedIn Insight Tag',
353
- hint: 'LinkedIn conversion tracking',
354
- docsSlug: 'linkedin-insights',
355
- packageSubpath: 'linkedin-insights',
356
- integrationCategory: 'ads-and-pixels',
357
- consentCategory: 'marketing'
358
- },
359
- {
360
- key: 'microsoftUet',
361
- vendor: 'microsoft-uet',
362
- label: 'Microsoft UET',
363
- hint: 'Bing Ads tracking',
364
- docsSlug: 'microsoft-uet',
365
- packageSubpath: 'microsoft-uet',
366
- integrationCategory: 'ads-and-pixels',
367
- consentCategory: 'marketing'
368
- },
369
- {
370
- key: 'snapchatPixel',
371
- vendor: 'snapchat-pixel',
372
- label: 'Snapchat Pixel',
373
- hint: 'Snapchat ads tracking',
374
- docsSlug: 'snapchat-pixel',
375
- packageSubpath: 'snapchat-pixel',
376
- integrationCategory: 'ads-and-pixels',
377
- consentCategory: 'marketing'
378
- },
379
- {
380
- key: 'xPixel',
381
- vendor: 'x-pixel',
382
- label: 'X (Twitter) Pixel',
383
- hint: 'X/Twitter conversion tracking',
384
- docsSlug: 'x-pixel',
385
- packageSubpath: 'x-pixel',
386
- integrationCategory: 'ads-and-pixels',
387
- consentCategory: 'marketing'
388
- }
389
- ];
390
- function getBuiltInScriptIntegration(key) {
391
- const integration = builtInScriptIntegrations.find((item)=>item.key === key);
392
- if (integration) return integration;
393
- throw new Error(`Unknown built-in script integration: ${key}`);
394
- }
395
- function getBuiltInScriptIntegrationBySubpath(subpath) {
396
- return builtInScriptIntegrations.find((integration)=>integration.packageSubpath === subpath);
397
- }
398
- function getBuiltInScriptIntegrationByVendor(vendor) {
399
- return builtInScriptIntegrations.find((integration)=>integration.vendor === vendor);
400
- }
401
- __webpack_require__.d(__webpack_exports__, {
402
- getBuiltInScriptIntegration: ()=>getBuiltInScriptIntegration,
403
- getBuiltInScriptIntegrationBySubpath: ()=>getBuiltInScriptIntegrationBySubpath,
404
- getBuiltInScriptIntegrationByVendor: ()=>getBuiltInScriptIntegrationByVendor
405
- }, {
406
- BUILT_IN_INTEGRATION_CATEGORIES: BUILT_IN_INTEGRATION_CATEGORIES,
407
- builtInScriptIntegrations: builtInScriptIntegrations
408
- });
409
- exports.BUILT_IN_INTEGRATION_CATEGORIES = __webpack_exports__.BUILT_IN_INTEGRATION_CATEGORIES;
410
- exports.builtInScriptIntegrations = __webpack_exports__.builtInScriptIntegrations;
411
- exports.getBuiltInScriptIntegration = __webpack_exports__.getBuiltInScriptIntegration;
412
- exports.getBuiltInScriptIntegrationBySubpath = __webpack_exports__.getBuiltInScriptIntegrationBySubpath;
413
- exports.getBuiltInScriptIntegrationByVendor = __webpack_exports__.getBuiltInScriptIntegrationByVendor;
414
- for(var __rspack_i in __webpack_exports__)if (-1 === [
415
- "BUILT_IN_INTEGRATION_CATEGORIES",
416
- "builtInScriptIntegrations",
417
- "getBuiltInScriptIntegration",
418
- "getBuiltInScriptIntegrationBySubpath",
419
- "getBuiltInScriptIntegrationByVendor"
420
- ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
421
- Object.defineProperty(exports, '__esModule', {
422
- value: true
423
- });
package/dist/resolve.cjs DELETED
@@ -1,71 +0,0 @@
1
- "use strict";
2
- var __webpack_require__ = {};
3
- (()=>{
4
- __webpack_require__.d = (exports1, getters, values)=>{
5
- var define = (defs, kind)=>{
6
- for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
7
- enumerable: true,
8
- [kind]: defs[key]
9
- });
10
- };
11
- define(getters, "get");
12
- define(values, "value");
13
- };
14
- })();
15
- (()=>{
16
- __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
17
- })();
18
- (()=>{
19
- __webpack_require__.r = (exports1)=>{
20
- if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
21
- value: 'Module'
22
- });
23
- Object.defineProperty(exports1, '__esModule', {
24
- value: true
25
- });
26
- };
27
- })();
28
- var __webpack_exports__ = {};
29
- __webpack_require__.r(__webpack_exports__);
30
- __webpack_require__.d(__webpack_exports__, {
31
- resolveManifest: ()=>resolveManifest
32
- });
33
- const compile_cjs_namespaceObject = require("./engine/compile.cjs");
34
- const runtime_cjs_namespaceObject = require("./engine/runtime.cjs");
35
- const manifestCache = new WeakMap();
36
- function serializeConfigValue(value) {
37
- if (void 0 === value) return 'undefined';
38
- if (null === value) return 'null';
39
- if (Array.isArray(value)) return `[${value.map((item)=>serializeConfigValue(item)).join(',')}]`;
40
- if ('object' == typeof value) {
41
- const entries = Object.entries(value).sort(([left], [right])=>left.localeCompare(right));
42
- return `{${entries.map(([key, nestedValue])=>`${JSON.stringify(key)}:${serializeConfigValue(nestedValue)}`).join(',')}}`;
43
- }
44
- return `${typeof value}:${String(value)}`;
45
- }
46
- function getManifestCacheKey(config) {
47
- return serializeConfigValue(config);
48
- }
49
- function getCompiledManifest(manifest, config) {
50
- const cacheKey = getManifestCacheKey(config);
51
- let configCache = manifestCache.get(manifest);
52
- if (!configCache) {
53
- configCache = new Map();
54
- manifestCache.set(manifest, configCache);
55
- }
56
- const cached = configCache.get(cacheKey);
57
- if (cached) return cached;
58
- const compiled = (0, compile_cjs_namespaceObject.compileManifest)(manifest, config);
59
- configCache.set(cacheKey, compiled);
60
- return compiled;
61
- }
62
- function resolveManifest(manifest, config = {}) {
63
- return (0, runtime_cjs_namespaceObject.resolvedManifestToScript)(getCompiledManifest(manifest, config));
64
- }
65
- exports.resolveManifest = __webpack_exports__.resolveManifest;
66
- for(var __rspack_i in __webpack_exports__)if (-1 === [
67
- "resolveManifest"
68
- ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
69
- Object.defineProperty(exports, '__esModule', {
70
- value: true
71
- });
package/dist/types.cjs DELETED
@@ -1,69 +0,0 @@
1
- "use strict";
2
- var __webpack_require__ = {};
3
- (()=>{
4
- __webpack_require__.d = (exports1, getters, values)=>{
5
- var define = (defs, kind)=>{
6
- for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
7
- enumerable: true,
8
- [kind]: defs[key]
9
- });
10
- };
11
- define(getters, "get");
12
- define(values, "value");
13
- };
14
- })();
15
- (()=>{
16
- __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
17
- })();
18
- (()=>{
19
- __webpack_require__.r = (exports1)=>{
20
- if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
21
- value: 'Module'
22
- });
23
- Object.defineProperty(exports1, '__esModule', {
24
- value: true
25
- });
26
- };
27
- })();
28
- var __webpack_exports__ = {};
29
- __webpack_require__.r(__webpack_exports__);
30
- const VENDOR_MANIFEST_KIND = 'c15t.vendor-manifest';
31
- const VENDOR_MANIFEST_SCHEMA_VERSION = 1;
32
- const vendorManifestContract = {
33
- kind: VENDOR_MANIFEST_KIND,
34
- schemaVersion: VENDOR_MANIFEST_SCHEMA_VERSION
35
- };
36
- const RUNTIME_VALUE_KIND = 'c15t.runtime-value';
37
- const runtimeDateValue = {
38
- kind: RUNTIME_VALUE_KIND,
39
- value: 'date'
40
- };
41
- const runtimeTimestampValue = {
42
- kind: RUNTIME_VALUE_KIND,
43
- value: 'timestamp'
44
- };
45
- __webpack_require__.d(__webpack_exports__, {}, {
46
- RUNTIME_VALUE_KIND: RUNTIME_VALUE_KIND,
47
- VENDOR_MANIFEST_KIND: VENDOR_MANIFEST_KIND,
48
- VENDOR_MANIFEST_SCHEMA_VERSION: VENDOR_MANIFEST_SCHEMA_VERSION,
49
- runtimeDateValue: runtimeDateValue,
50
- runtimeTimestampValue: runtimeTimestampValue,
51
- vendorManifestContract: vendorManifestContract
52
- });
53
- exports.RUNTIME_VALUE_KIND = __webpack_exports__.RUNTIME_VALUE_KIND;
54
- exports.VENDOR_MANIFEST_KIND = __webpack_exports__.VENDOR_MANIFEST_KIND;
55
- exports.VENDOR_MANIFEST_SCHEMA_VERSION = __webpack_exports__.VENDOR_MANIFEST_SCHEMA_VERSION;
56
- exports.runtimeDateValue = __webpack_exports__.runtimeDateValue;
57
- exports.runtimeTimestampValue = __webpack_exports__.runtimeTimestampValue;
58
- exports.vendorManifestContract = __webpack_exports__.vendorManifestContract;
59
- for(var __rspack_i in __webpack_exports__)if (-1 === [
60
- "RUNTIME_VALUE_KIND",
61
- "VENDOR_MANIFEST_KIND",
62
- "VENDOR_MANIFEST_SCHEMA_VERSION",
63
- "runtimeDateValue",
64
- "runtimeTimestampValue",
65
- "vendorManifestContract"
66
- ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
67
- Object.defineProperty(exports, '__esModule', {
68
- value: true
69
- });
@@ -1,55 +0,0 @@
1
- "use strict";
2
- var __webpack_require__ = {};
3
- (()=>{
4
- __webpack_require__.d = (exports1, getters, values)=>{
5
- var define = (defs, kind)=>{
6
- for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
7
- enumerable: true,
8
- [kind]: defs[key]
9
- });
10
- };
11
- define(getters, "get");
12
- define(values, "value");
13
- };
14
- })();
15
- (()=>{
16
- __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
17
- })();
18
- (()=>{
19
- __webpack_require__.r = (exports1)=>{
20
- if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
21
- value: 'Module'
22
- });
23
- Object.defineProperty(exports1, '__esModule', {
24
- value: true
25
- });
26
- };
27
- })();
28
- var __webpack_exports__ = {};
29
- __webpack_require__.r(__webpack_exports__);
30
- function booleanDataAttribute(value) {
31
- if (void 0 === value) return;
32
- if (value) return 'true';
33
- return 'false';
34
- }
35
- function listDataAttribute(value) {
36
- if (void 0 === value) return;
37
- if (Array.isArray(value)) {
38
- if (0 === value.length) return;
39
- return JSON.stringify(value);
40
- }
41
- return value;
42
- }
43
- __webpack_require__.d(__webpack_exports__, {
44
- booleanDataAttribute: ()=>booleanDataAttribute,
45
- listDataAttribute: ()=>listDataAttribute
46
- });
47
- exports.booleanDataAttribute = __webpack_exports__.booleanDataAttribute;
48
- exports.listDataAttribute = __webpack_exports__.listDataAttribute;
49
- for(var __rspack_i in __webpack_exports__)if (-1 === [
50
- "booleanDataAttribute",
51
- "listDataAttribute"
52
- ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
53
- Object.defineProperty(exports, '__esModule', {
54
- value: true
55
- });
@@ -1,69 +0,0 @@
1
- "use strict";
2
- var __webpack_require__ = {};
3
- (()=>{
4
- __webpack_require__.d = (exports1, getters, values)=>{
5
- var define = (defs, kind)=>{
6
- for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
7
- enumerable: true,
8
- [kind]: defs[key]
9
- });
10
- };
11
- define(getters, "get");
12
- define(values, "value");
13
- };
14
- })();
15
- (()=>{
16
- __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
17
- })();
18
- (()=>{
19
- __webpack_require__.r = (exports1)=>{
20
- if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
21
- value: 'Module'
22
- });
23
- Object.defineProperty(exports1, '__esModule', {
24
- value: true
25
- });
26
- };
27
- })();
28
- var __webpack_exports__ = {};
29
- __webpack_require__.r(__webpack_exports__);
30
- const GOOGLE_CONSENT_MODE_V2_DEFAULT_MAPPING = {
31
- necessary: [
32
- 'security_storage'
33
- ],
34
- functionality: [
35
- 'functionality_storage'
36
- ],
37
- measurement: [
38
- 'analytics_storage'
39
- ],
40
- marketing: [
41
- 'ad_storage',
42
- 'ad_user_data',
43
- 'ad_personalization'
44
- ],
45
- experience: [
46
- 'personalization_storage'
47
- ]
48
- };
49
- function withOptionalConsentMapping(manifest, consentMapping) {
50
- if (void 0 === consentMapping) return manifest;
51
- return {
52
- ...manifest,
53
- consentMapping
54
- };
55
- }
56
- __webpack_require__.d(__webpack_exports__, {
57
- withOptionalConsentMapping: ()=>withOptionalConsentMapping
58
- }, {
59
- GOOGLE_CONSENT_MODE_V2_DEFAULT_MAPPING: GOOGLE_CONSENT_MODE_V2_DEFAULT_MAPPING
60
- });
61
- exports.GOOGLE_CONSENT_MODE_V2_DEFAULT_MAPPING = __webpack_exports__.GOOGLE_CONSENT_MODE_V2_DEFAULT_MAPPING;
62
- exports.withOptionalConsentMapping = __webpack_exports__.withOptionalConsentMapping;
63
- for(var __rspack_i in __webpack_exports__)if (-1 === [
64
- "GOOGLE_CONSENT_MODE_V2_DEFAULT_MAPPING",
65
- "withOptionalConsentMapping"
66
- ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
67
- Object.defineProperty(exports, '__esModule', {
68
- value: true
69
- });