@c15t/scripts 2.0.1 → 2.1.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.
- package/README.md +9 -9
- package/dist/engine/runtime.cjs +11 -0
- package/dist/engine/runtime.js +11 -0
- package/dist/registry.cjs +338 -0
- package/dist/registry.js +292 -0
- package/dist/types.cjs +18 -0
- package/dist/types.js +10 -1
- package/dist/vendors/_shared/attributes.cjs +51 -0
- package/dist/vendors/_shared/attributes.js +14 -0
- package/dist/vendors/_shared/google-consent.cjs +64 -0
- package/dist/vendors/_shared/google-consent.js +27 -0
- package/dist/vendors/_shared/install-builders.cjs +55 -0
- package/dist/vendors/_shared/install-builders.js +21 -0
- package/dist/vendors/_shared/script-url.cjs +74 -0
- package/dist/vendors/_shared/script-url.js +28 -0
- package/dist/{linkedin-insights.cjs → vendors/ads-and-pixels/linkedin-insights.cjs} +2 -2
- package/dist/{linkedin-insights.js → vendors/ads-and-pixels/linkedin-insights.js} +2 -2
- package/dist/vendors/ads-and-pixels/meta-pixel.cjs +202 -0
- package/dist/vendors/ads-and-pixels/meta-pixel.js +153 -0
- package/dist/{microsoft-uet.cjs → vendors/ads-and-pixels/microsoft-uet.cjs} +31 -14
- package/dist/{microsoft-uet.js → vendors/ads-and-pixels/microsoft-uet.js} +31 -14
- package/dist/vendors/ads-and-pixels/reddit-pixel.cjs +147 -0
- package/dist/vendors/ads-and-pixels/reddit-pixel.js +107 -0
- package/dist/vendors/ads-and-pixels/snapchat-pixel.cjs +127 -0
- package/dist/vendors/ads-and-pixels/snapchat-pixel.js +87 -0
- package/dist/{tiktok-pixel.cjs → vendors/ads-and-pixels/tiktok-pixel.cjs} +2 -2
- package/dist/{tiktok-pixel.js → vendors/ads-and-pixels/tiktok-pixel.js} +2 -2
- package/dist/{x-pixel.cjs → vendors/ads-and-pixels/x-pixel.cjs} +6 -3
- package/dist/{x-pixel.js → vendors/ads-and-pixels/x-pixel.js} +6 -3
- package/dist/vendors/analytics/ahrefs-analytics.cjs +64 -0
- package/dist/vendors/analytics/ahrefs-analytics.js +27 -0
- package/dist/vendors/analytics/cloudflare-web-analytics.cjs +69 -0
- package/dist/vendors/analytics/cloudflare-web-analytics.js +32 -0
- package/dist/{databuddy.cjs → vendors/analytics/databuddy.cjs} +3 -3
- package/dist/{databuddy.js → vendors/analytics/databuddy.js} +3 -3
- package/dist/vendors/analytics/fathom-analytics.cjs +72 -0
- package/dist/vendors/analytics/fathom-analytics.js +35 -0
- package/dist/{google-tag.cjs → vendors/analytics/google-tag.cjs} +7 -28
- package/dist/{google-tag.js → vendors/analytics/google-tag.js} +7 -28
- package/dist/vendors/analytics/hotjar.cjs +81 -0
- package/dist/vendors/analytics/hotjar.js +44 -0
- package/dist/vendors/analytics/matomo-analytics.cjs +228 -0
- package/dist/vendors/analytics/matomo-analytics.js +191 -0
- package/dist/vendors/analytics/microsoft-clarity.cjs +110 -0
- package/dist/vendors/analytics/microsoft-clarity.js +73 -0
- package/dist/vendors/analytics/mixpanel-analytics.cjs +119 -0
- package/dist/vendors/analytics/mixpanel-analytics.js +82 -0
- package/dist/vendors/analytics/plausible-analytics.cjs +118 -0
- package/dist/vendors/analytics/plausible-analytics.js +81 -0
- package/dist/{posthog.cjs → vendors/analytics/posthog.cjs} +69 -6
- package/dist/vendors/analytics/posthog.js +163 -0
- package/dist/vendors/analytics/promptwatch.cjs +66 -0
- package/dist/vendors/analytics/promptwatch.js +29 -0
- package/dist/vendors/analytics/rybbit-analytics.cjs +100 -0
- package/dist/vendors/analytics/rybbit-analytics.js +63 -0
- package/dist/vendors/analytics/segment.cjs +93 -0
- package/dist/vendors/analytics/segment.js +56 -0
- package/dist/vendors/analytics/umami-analytics.cjs +76 -0
- package/dist/vendors/analytics/umami-analytics.js +39 -0
- package/dist/vendors/analytics/vercel-analytics.cjs +90 -0
- package/dist/vendors/analytics/vercel-analytics.js +53 -0
- package/dist/vendors/functional/crisp.cjs +139 -0
- package/dist/vendors/functional/crisp.js +102 -0
- package/dist/vendors/functional/intercom.cjs +85 -0
- package/dist/vendors/functional/intercom.js +45 -0
- package/dist/{google-tag-manager.cjs → vendors/tag-managers/google-tag-manager.cjs} +6 -27
- package/dist/{google-tag-manager.js → vendors/tag-managers/google-tag-manager.js} +6 -27
- package/dist-types/__tests__/helpers.d.ts +141 -0
- package/dist-types/engine/runtime.d.ts +1 -1
- package/dist-types/registry.d.ts +368 -0
- package/dist-types/types.d.ts +13 -0
- package/dist-types/vendors/_shared/attributes.d.ts +35 -0
- package/dist-types/vendors/_shared/google-consent.d.ts +47 -0
- package/dist-types/vendors/_shared/install-builders.d.ts +30 -0
- package/dist-types/vendors/_shared/script-url.d.ts +75 -0
- package/dist-types/{linkedin-insights.d.ts → vendors/ads-and-pixels/linkedin-insights.d.ts} +22 -9
- package/dist-types/vendors/ads-and-pixels/meta-pixel.d.ts +289 -0
- package/dist-types/{microsoft-uet.d.ts → vendors/ads-and-pixels/microsoft-uet.d.ts} +21 -10
- package/dist-types/vendors/ads-and-pixels/reddit-pixel.d.ts +211 -0
- package/dist-types/vendors/ads-and-pixels/snapchat-pixel.d.ts +171 -0
- package/dist-types/{tiktok-pixel.d.ts → vendors/ads-and-pixels/tiktok-pixel.d.ts} +20 -5
- package/dist-types/{x-pixel.d.ts → vendors/ads-and-pixels/x-pixel.d.ts} +21 -4
- package/dist-types/vendors/analytics/ahrefs-analytics.d.ts +62 -0
- package/dist-types/vendors/analytics/cloudflare-web-analytics.d.ts +67 -0
- package/dist-types/vendors/analytics/fathom-analytics.d.ts +90 -0
- package/dist-types/{google-tag.d.ts → vendors/analytics/google-tag.d.ts} +5 -8
- package/dist-types/vendors/analytics/hotjar.d.ts +73 -0
- package/dist-types/vendors/analytics/matomo-analytics.d.ts +41 -0
- package/dist-types/vendors/analytics/microsoft-clarity.d.ts +86 -0
- package/dist-types/vendors/analytics/mixpanel-analytics.d.ts +101 -0
- package/dist-types/vendors/analytics/plausible-analytics.d.ts +122 -0
- package/dist-types/{posthog.d.ts → vendors/analytics/posthog.d.ts} +47 -5
- package/dist-types/vendors/analytics/promptwatch.d.ts +36 -0
- package/dist-types/vendors/analytics/rybbit-analytics.d.ts +82 -0
- package/dist-types/vendors/analytics/segment.d.ts +158 -0
- package/dist-types/vendors/analytics/umami-analytics.d.ts +93 -0
- package/dist-types/vendors/analytics/vercel-analytics.d.ts +66 -0
- package/dist-types/vendors/functional/crisp.d.ts +78 -0
- package/dist-types/vendors/functional/intercom.d.ts +135 -0
- package/dist-types/{google-tag-manager.d.ts → vendors/tag-managers/google-tag-manager.d.ts} +5 -8
- package/package.json +165 -4
- package/dist/meta-pixel.cjs +0 -129
- package/dist/meta-pixel.js +0 -89
- package/dist/posthog.js +0 -100
- package/dist-types/meta-pixel.d.ts +0 -185
- /package/dist-types/{databuddy.d.ts → vendors/analytics/databuddy.d.ts} +0 -0
package/dist/registry.js
ADDED
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
const BUILT_IN_INTEGRATION_CATEGORIES = [
|
|
2
|
+
{
|
|
3
|
+
key: 'analytics',
|
|
4
|
+
label: 'Analytics'
|
|
5
|
+
},
|
|
6
|
+
{
|
|
7
|
+
key: 'ads-and-pixels',
|
|
8
|
+
label: 'Ads & Pixels'
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
key: 'functional',
|
|
12
|
+
label: 'Functional'
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
key: 'tag-manager',
|
|
16
|
+
label: 'Tag Managers'
|
|
17
|
+
}
|
|
18
|
+
];
|
|
19
|
+
const builtInScriptIntegrations = [
|
|
20
|
+
{
|
|
21
|
+
key: 'googleTagManager',
|
|
22
|
+
vendor: 'google-tag-manager',
|
|
23
|
+
label: 'Google Tag Manager',
|
|
24
|
+
hint: "GTM container script",
|
|
25
|
+
docsSlug: 'google-tag-manager',
|
|
26
|
+
packageSubpath: 'google-tag-manager',
|
|
27
|
+
integrationCategory: 'tag-manager',
|
|
28
|
+
consentCategory: 'necessary'
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
key: 'gtag',
|
|
32
|
+
vendor: 'gtag',
|
|
33
|
+
label: 'Google Tag (gtag.js)',
|
|
34
|
+
hint: 'Google Analytics 4',
|
|
35
|
+
docsSlug: 'google-tag',
|
|
36
|
+
packageSubpath: 'google-tag',
|
|
37
|
+
integrationCategory: 'analytics',
|
|
38
|
+
consentCategory: 'measurement'
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
key: 'ahrefsAnalytics',
|
|
42
|
+
vendor: 'ahrefs-analytics',
|
|
43
|
+
label: 'Ahrefs Analytics',
|
|
44
|
+
hint: 'Cookieless web analytics from Ahrefs',
|
|
45
|
+
docsSlug: 'ahrefs-analytics',
|
|
46
|
+
packageSubpath: 'ahrefs-analytics',
|
|
47
|
+
integrationCategory: 'analytics',
|
|
48
|
+
consentCategory: 'measurement'
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
key: 'cloudflareWebAnalytics',
|
|
52
|
+
vendor: 'cloudflare-web-analytics',
|
|
53
|
+
label: 'Cloudflare Web Analytics',
|
|
54
|
+
hint: 'Cookieless analytics from Cloudflare',
|
|
55
|
+
docsSlug: 'cloudflare-web-analytics',
|
|
56
|
+
packageSubpath: 'cloudflare-web-analytics',
|
|
57
|
+
integrationCategory: 'analytics',
|
|
58
|
+
consentCategory: 'measurement'
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
key: 'microsoft-clarity',
|
|
62
|
+
vendor: 'microsoft-clarity',
|
|
63
|
+
label: 'Microsoft Clarity',
|
|
64
|
+
hint: 'Session replay and heatmaps',
|
|
65
|
+
docsSlug: 'microsoft-clarity',
|
|
66
|
+
packageSubpath: 'microsoft-clarity',
|
|
67
|
+
integrationCategory: 'analytics',
|
|
68
|
+
consentCategory: 'measurement'
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
key: 'databuddy',
|
|
72
|
+
vendor: 'databuddy',
|
|
73
|
+
label: 'Databuddy',
|
|
74
|
+
hint: 'Data collection',
|
|
75
|
+
docsSlug: 'databuddy',
|
|
76
|
+
packageSubpath: 'databuddy',
|
|
77
|
+
integrationCategory: 'analytics',
|
|
78
|
+
consentCategory: 'measurement'
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
key: 'fathomAnalytics',
|
|
82
|
+
vendor: 'fathom-analytics',
|
|
83
|
+
label: 'Fathom Analytics',
|
|
84
|
+
hint: 'Privacy-friendly cookieless analytics',
|
|
85
|
+
docsSlug: 'fathom-analytics',
|
|
86
|
+
packageSubpath: 'fathom-analytics',
|
|
87
|
+
integrationCategory: 'analytics',
|
|
88
|
+
consentCategory: 'measurement'
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
key: 'mixpanelAnalytics',
|
|
92
|
+
vendor: 'mixpanel-analytics',
|
|
93
|
+
label: 'Mixpanel Analytics',
|
|
94
|
+
hint: 'Product analytics and funnels',
|
|
95
|
+
docsSlug: 'mixpanel-analytics',
|
|
96
|
+
packageSubpath: 'mixpanel-analytics',
|
|
97
|
+
integrationCategory: 'analytics',
|
|
98
|
+
consentCategory: 'measurement'
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
key: 'hotjar',
|
|
102
|
+
vendor: 'hotjar',
|
|
103
|
+
label: 'Hotjar',
|
|
104
|
+
hint: 'Heatmaps and session recordings',
|
|
105
|
+
docsSlug: 'hotjar',
|
|
106
|
+
packageSubpath: 'hotjar',
|
|
107
|
+
integrationCategory: 'analytics',
|
|
108
|
+
consentCategory: 'measurement'
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
key: 'matomoAnalytics',
|
|
112
|
+
vendor: 'matomo-analytics',
|
|
113
|
+
label: 'Matomo Analytics',
|
|
114
|
+
hint: 'Self-hosted privacy analytics',
|
|
115
|
+
docsSlug: 'matomo-analytics',
|
|
116
|
+
packageSubpath: 'matomo-analytics',
|
|
117
|
+
integrationCategory: 'analytics',
|
|
118
|
+
consentCategory: 'measurement'
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
key: 'posthog',
|
|
122
|
+
vendor: 'posthog',
|
|
123
|
+
label: 'PostHog',
|
|
124
|
+
hint: 'Product analytics',
|
|
125
|
+
docsSlug: 'posthog',
|
|
126
|
+
packageSubpath: 'posthog',
|
|
127
|
+
integrationCategory: 'analytics',
|
|
128
|
+
consentCategory: 'measurement'
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
key: 'promptwatch',
|
|
132
|
+
vendor: 'promptwatch',
|
|
133
|
+
label: 'Promptwatch',
|
|
134
|
+
hint: 'AI traffic analytics',
|
|
135
|
+
docsSlug: 'promptwatch',
|
|
136
|
+
packageSubpath: 'promptwatch',
|
|
137
|
+
integrationCategory: 'analytics',
|
|
138
|
+
consentCategory: 'measurement'
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
key: 'segment',
|
|
142
|
+
vendor: 'segment',
|
|
143
|
+
label: 'Segment',
|
|
144
|
+
hint: 'Customer data platform',
|
|
145
|
+
docsSlug: 'segment',
|
|
146
|
+
packageSubpath: 'segment',
|
|
147
|
+
integrationCategory: 'analytics',
|
|
148
|
+
consentCategory: 'measurement'
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
key: 'rybbitAnalytics',
|
|
152
|
+
vendor: 'rybbit-analytics',
|
|
153
|
+
label: 'Rybbit Analytics',
|
|
154
|
+
hint: 'Privacy-friendly web analytics',
|
|
155
|
+
docsSlug: 'rybbit-analytics',
|
|
156
|
+
packageSubpath: 'rybbit-analytics',
|
|
157
|
+
integrationCategory: 'analytics',
|
|
158
|
+
consentCategory: 'measurement'
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
key: 'plausibleAnalytics',
|
|
162
|
+
vendor: 'plausible-analytics',
|
|
163
|
+
label: 'Plausible Analytics',
|
|
164
|
+
hint: 'Privacy-friendly cookieless analytics',
|
|
165
|
+
docsSlug: 'plausible-analytics',
|
|
166
|
+
packageSubpath: 'plausible-analytics',
|
|
167
|
+
integrationCategory: 'analytics',
|
|
168
|
+
consentCategory: 'measurement'
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
key: 'umamiAnalytics',
|
|
172
|
+
vendor: 'umami-analytics',
|
|
173
|
+
label: 'Umami Analytics',
|
|
174
|
+
hint: 'Open-source cookieless analytics',
|
|
175
|
+
docsSlug: 'umami-analytics',
|
|
176
|
+
packageSubpath: 'umami-analytics',
|
|
177
|
+
integrationCategory: 'analytics',
|
|
178
|
+
consentCategory: 'measurement'
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
key: 'vercelAnalytics',
|
|
182
|
+
vendor: 'vercel-analytics',
|
|
183
|
+
label: 'Vercel Analytics',
|
|
184
|
+
hint: 'Vercel web analytics',
|
|
185
|
+
docsSlug: 'vercel-analytics',
|
|
186
|
+
packageSubpath: 'vercel-analytics',
|
|
187
|
+
integrationCategory: 'analytics',
|
|
188
|
+
consentCategory: 'measurement'
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
key: 'crisp',
|
|
192
|
+
vendor: 'crisp',
|
|
193
|
+
label: 'Crisp',
|
|
194
|
+
hint: 'Live chat widget',
|
|
195
|
+
docsSlug: 'crisp',
|
|
196
|
+
packageSubpath: 'crisp',
|
|
197
|
+
integrationCategory: 'functional',
|
|
198
|
+
consentCategory: 'functionality'
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
key: 'intercom',
|
|
202
|
+
vendor: 'intercom',
|
|
203
|
+
label: 'Intercom',
|
|
204
|
+
hint: 'Messenger and live chat widget',
|
|
205
|
+
docsSlug: 'intercom',
|
|
206
|
+
packageSubpath: 'intercom',
|
|
207
|
+
integrationCategory: 'functional',
|
|
208
|
+
consentCategory: 'functionality'
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
key: 'metaPixel',
|
|
212
|
+
vendor: 'meta-pixel',
|
|
213
|
+
label: 'Meta Pixel',
|
|
214
|
+
hint: 'Facebook/Instagram tracking',
|
|
215
|
+
docsSlug: 'meta-pixel',
|
|
216
|
+
packageSubpath: 'meta-pixel',
|
|
217
|
+
integrationCategory: 'ads-and-pixels',
|
|
218
|
+
consentCategory: 'marketing'
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
key: 'redditPixel',
|
|
222
|
+
vendor: 'reddit-pixel',
|
|
223
|
+
label: 'Reddit Pixel',
|
|
224
|
+
hint: 'Reddit ads tracking',
|
|
225
|
+
docsSlug: 'reddit-pixel',
|
|
226
|
+
packageSubpath: 'reddit-pixel',
|
|
227
|
+
integrationCategory: 'ads-and-pixels',
|
|
228
|
+
consentCategory: 'marketing'
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
key: 'tiktokPixel',
|
|
232
|
+
vendor: 'tiktok-pixel',
|
|
233
|
+
label: 'TikTok Pixel',
|
|
234
|
+
hint: 'TikTok ads tracking',
|
|
235
|
+
docsSlug: 'tiktok-pixel',
|
|
236
|
+
packageSubpath: 'tiktok-pixel',
|
|
237
|
+
integrationCategory: 'ads-and-pixels',
|
|
238
|
+
consentCategory: 'marketing'
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
key: 'linkedinInsights',
|
|
242
|
+
vendor: 'linkedin-insights',
|
|
243
|
+
label: 'LinkedIn Insight Tag',
|
|
244
|
+
hint: 'LinkedIn conversion tracking',
|
|
245
|
+
docsSlug: 'linkedin-insights',
|
|
246
|
+
packageSubpath: 'linkedin-insights',
|
|
247
|
+
integrationCategory: 'ads-and-pixels',
|
|
248
|
+
consentCategory: 'marketing'
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
key: 'microsoftUet',
|
|
252
|
+
vendor: 'microsoft-uet',
|
|
253
|
+
label: 'Microsoft UET',
|
|
254
|
+
hint: 'Bing Ads tracking',
|
|
255
|
+
docsSlug: 'microsoft-uet',
|
|
256
|
+
packageSubpath: 'microsoft-uet',
|
|
257
|
+
integrationCategory: 'ads-and-pixels',
|
|
258
|
+
consentCategory: 'marketing'
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
key: 'snapchatPixel',
|
|
262
|
+
vendor: 'snapchat-pixel',
|
|
263
|
+
label: 'Snapchat Pixel',
|
|
264
|
+
hint: 'Snapchat ads tracking',
|
|
265
|
+
docsSlug: 'snapchat-pixel',
|
|
266
|
+
packageSubpath: 'snapchat-pixel',
|
|
267
|
+
integrationCategory: 'ads-and-pixels',
|
|
268
|
+
consentCategory: 'marketing'
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
key: 'xPixel',
|
|
272
|
+
vendor: 'x-pixel',
|
|
273
|
+
label: 'X (Twitter) Pixel',
|
|
274
|
+
hint: 'X/Twitter conversion tracking',
|
|
275
|
+
docsSlug: 'x-pixel',
|
|
276
|
+
packageSubpath: 'x-pixel',
|
|
277
|
+
integrationCategory: 'ads-and-pixels',
|
|
278
|
+
consentCategory: 'marketing'
|
|
279
|
+
}
|
|
280
|
+
];
|
|
281
|
+
function getBuiltInScriptIntegration(key) {
|
|
282
|
+
const integration = builtInScriptIntegrations.find((item)=>item.key === key);
|
|
283
|
+
if (integration) return integration;
|
|
284
|
+
throw new Error(`Unknown built-in script integration: ${key}`);
|
|
285
|
+
}
|
|
286
|
+
function getBuiltInScriptIntegrationBySubpath(subpath) {
|
|
287
|
+
return builtInScriptIntegrations.find((integration)=>integration.packageSubpath === subpath);
|
|
288
|
+
}
|
|
289
|
+
function getBuiltInScriptIntegrationByVendor(vendor) {
|
|
290
|
+
return builtInScriptIntegrations.find((integration)=>integration.vendor === vendor);
|
|
291
|
+
}
|
|
292
|
+
export { BUILT_IN_INTEGRATION_CATEGORIES, builtInScriptIntegrations, getBuiltInScriptIntegration, getBuiltInScriptIntegrationBySubpath, getBuiltInScriptIntegrationByVendor };
|
package/dist/types.cjs
CHANGED
|
@@ -24,8 +24,11 @@ var __webpack_require__ = {};
|
|
|
24
24
|
var __webpack_exports__ = {};
|
|
25
25
|
__webpack_require__.r(__webpack_exports__);
|
|
26
26
|
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
RUNTIME_VALUE_KIND: ()=>RUNTIME_VALUE_KIND,
|
|
27
28
|
VENDOR_MANIFEST_KIND: ()=>VENDOR_MANIFEST_KIND,
|
|
28
29
|
VENDOR_MANIFEST_SCHEMA_VERSION: ()=>VENDOR_MANIFEST_SCHEMA_VERSION,
|
|
30
|
+
runtimeDateValue: ()=>runtimeDateValue,
|
|
31
|
+
runtimeTimestampValue: ()=>runtimeTimestampValue,
|
|
29
32
|
vendorManifestContract: ()=>vendorManifestContract
|
|
30
33
|
});
|
|
31
34
|
const VENDOR_MANIFEST_KIND = 'c15t.vendor-manifest';
|
|
@@ -34,12 +37,27 @@ const vendorManifestContract = {
|
|
|
34
37
|
kind: VENDOR_MANIFEST_KIND,
|
|
35
38
|
schemaVersion: VENDOR_MANIFEST_SCHEMA_VERSION
|
|
36
39
|
};
|
|
40
|
+
const RUNTIME_VALUE_KIND = 'c15t.runtime-value';
|
|
41
|
+
const runtimeDateValue = {
|
|
42
|
+
kind: RUNTIME_VALUE_KIND,
|
|
43
|
+
value: 'date'
|
|
44
|
+
};
|
|
45
|
+
const runtimeTimestampValue = {
|
|
46
|
+
kind: RUNTIME_VALUE_KIND,
|
|
47
|
+
value: 'timestamp'
|
|
48
|
+
};
|
|
49
|
+
exports.RUNTIME_VALUE_KIND = __webpack_exports__.RUNTIME_VALUE_KIND;
|
|
37
50
|
exports.VENDOR_MANIFEST_KIND = __webpack_exports__.VENDOR_MANIFEST_KIND;
|
|
38
51
|
exports.VENDOR_MANIFEST_SCHEMA_VERSION = __webpack_exports__.VENDOR_MANIFEST_SCHEMA_VERSION;
|
|
52
|
+
exports.runtimeDateValue = __webpack_exports__.runtimeDateValue;
|
|
53
|
+
exports.runtimeTimestampValue = __webpack_exports__.runtimeTimestampValue;
|
|
39
54
|
exports.vendorManifestContract = __webpack_exports__.vendorManifestContract;
|
|
40
55
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
56
|
+
"RUNTIME_VALUE_KIND",
|
|
41
57
|
"VENDOR_MANIFEST_KIND",
|
|
42
58
|
"VENDOR_MANIFEST_SCHEMA_VERSION",
|
|
59
|
+
"runtimeDateValue",
|
|
60
|
+
"runtimeTimestampValue",
|
|
43
61
|
"vendorManifestContract"
|
|
44
62
|
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
45
63
|
Object.defineProperty(exports, '__esModule', {
|
package/dist/types.js
CHANGED
|
@@ -4,4 +4,13 @@ const vendorManifestContract = {
|
|
|
4
4
|
kind: VENDOR_MANIFEST_KIND,
|
|
5
5
|
schemaVersion: VENDOR_MANIFEST_SCHEMA_VERSION
|
|
6
6
|
};
|
|
7
|
-
|
|
7
|
+
const RUNTIME_VALUE_KIND = 'c15t.runtime-value';
|
|
8
|
+
const runtimeDateValue = {
|
|
9
|
+
kind: RUNTIME_VALUE_KIND,
|
|
10
|
+
value: 'date'
|
|
11
|
+
};
|
|
12
|
+
const runtimeTimestampValue = {
|
|
13
|
+
kind: RUNTIME_VALUE_KIND,
|
|
14
|
+
value: 'timestamp'
|
|
15
|
+
};
|
|
16
|
+
export { RUNTIME_VALUE_KIND, VENDOR_MANIFEST_KIND, VENDOR_MANIFEST_SCHEMA_VERSION, runtimeDateValue, runtimeTimestampValue, vendorManifestContract };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
booleanDataAttribute: ()=>booleanDataAttribute,
|
|
28
|
+
listDataAttribute: ()=>listDataAttribute
|
|
29
|
+
});
|
|
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
|
+
exports.booleanDataAttribute = __webpack_exports__.booleanDataAttribute;
|
|
44
|
+
exports.listDataAttribute = __webpack_exports__.listDataAttribute;
|
|
45
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
46
|
+
"booleanDataAttribute",
|
|
47
|
+
"listDataAttribute"
|
|
48
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
49
|
+
Object.defineProperty(exports, '__esModule', {
|
|
50
|
+
value: true
|
|
51
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
function booleanDataAttribute(value) {
|
|
2
|
+
if (void 0 === value) return;
|
|
3
|
+
if (value) return 'true';
|
|
4
|
+
return 'false';
|
|
5
|
+
}
|
|
6
|
+
function listDataAttribute(value) {
|
|
7
|
+
if (void 0 === value) return;
|
|
8
|
+
if (Array.isArray(value)) {
|
|
9
|
+
if (0 === value.length) return;
|
|
10
|
+
return JSON.stringify(value);
|
|
11
|
+
}
|
|
12
|
+
return value;
|
|
13
|
+
}
|
|
14
|
+
export { booleanDataAttribute, listDataAttribute };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
GOOGLE_CONSENT_MODE_V2_DEFAULT_MAPPING: ()=>GOOGLE_CONSENT_MODE_V2_DEFAULT_MAPPING,
|
|
28
|
+
withOptionalConsentMapping: ()=>withOptionalConsentMapping
|
|
29
|
+
});
|
|
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
|
+
exports.GOOGLE_CONSENT_MODE_V2_DEFAULT_MAPPING = __webpack_exports__.GOOGLE_CONSENT_MODE_V2_DEFAULT_MAPPING;
|
|
57
|
+
exports.withOptionalConsentMapping = __webpack_exports__.withOptionalConsentMapping;
|
|
58
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
59
|
+
"GOOGLE_CONSENT_MODE_V2_DEFAULT_MAPPING",
|
|
60
|
+
"withOptionalConsentMapping"
|
|
61
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
62
|
+
Object.defineProperty(exports, '__esModule', {
|
|
63
|
+
value: true
|
|
64
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const GOOGLE_CONSENT_MODE_V2_DEFAULT_MAPPING = {
|
|
2
|
+
necessary: [
|
|
3
|
+
'security_storage'
|
|
4
|
+
],
|
|
5
|
+
functionality: [
|
|
6
|
+
'functionality_storage'
|
|
7
|
+
],
|
|
8
|
+
measurement: [
|
|
9
|
+
'analytics_storage'
|
|
10
|
+
],
|
|
11
|
+
marketing: [
|
|
12
|
+
'ad_storage',
|
|
13
|
+
'ad_user_data',
|
|
14
|
+
'ad_personalization'
|
|
15
|
+
],
|
|
16
|
+
experience: [
|
|
17
|
+
'personalization_storage'
|
|
18
|
+
]
|
|
19
|
+
};
|
|
20
|
+
function withOptionalConsentMapping(manifest, consentMapping) {
|
|
21
|
+
if (void 0 === consentMapping) return manifest;
|
|
22
|
+
return {
|
|
23
|
+
...manifest,
|
|
24
|
+
consentMapping
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export { GOOGLE_CONSENT_MODE_V2_DEFAULT_MAPPING, withOptionalConsentMapping };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
buildQueuePixelInstall: ()=>buildQueuePixelInstall
|
|
28
|
+
});
|
|
29
|
+
function buildQueuePixelInstall({ global, initArgs, trackStep, scriptPlaceholder = "{{scriptUrl}}" }) {
|
|
30
|
+
const install = [
|
|
31
|
+
{
|
|
32
|
+
type: 'callGlobal',
|
|
33
|
+
global,
|
|
34
|
+
args: initArgs
|
|
35
|
+
}
|
|
36
|
+
];
|
|
37
|
+
if (void 0 !== trackStep) install.push({
|
|
38
|
+
type: 'callGlobal',
|
|
39
|
+
global,
|
|
40
|
+
args: trackStep.args
|
|
41
|
+
});
|
|
42
|
+
install.push({
|
|
43
|
+
type: 'loadScript',
|
|
44
|
+
src: scriptPlaceholder,
|
|
45
|
+
async: true
|
|
46
|
+
});
|
|
47
|
+
return install;
|
|
48
|
+
}
|
|
49
|
+
exports.buildQueuePixelInstall = __webpack_exports__.buildQueuePixelInstall;
|
|
50
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
51
|
+
"buildQueuePixelInstall"
|
|
52
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
53
|
+
Object.defineProperty(exports, '__esModule', {
|
|
54
|
+
value: true
|
|
55
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
function buildQueuePixelInstall({ global, initArgs, trackStep, scriptPlaceholder = "{{scriptUrl}}" }) {
|
|
2
|
+
const install = [
|
|
3
|
+
{
|
|
4
|
+
type: 'callGlobal',
|
|
5
|
+
global,
|
|
6
|
+
args: initArgs
|
|
7
|
+
}
|
|
8
|
+
];
|
|
9
|
+
if (void 0 !== trackStep) install.push({
|
|
10
|
+
type: 'callGlobal',
|
|
11
|
+
global,
|
|
12
|
+
args: trackStep.args
|
|
13
|
+
});
|
|
14
|
+
install.push({
|
|
15
|
+
type: 'loadScript',
|
|
16
|
+
src: scriptPlaceholder,
|
|
17
|
+
async: true
|
|
18
|
+
});
|
|
19
|
+
return install;
|
|
20
|
+
}
|
|
21
|
+
export { buildQueuePixelInstall };
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
joinUrlPath: ()=>joinUrlPath,
|
|
28
|
+
resolveScriptUrl: ()=>resolveScriptUrl,
|
|
29
|
+
stripLeadingSlashes: ()=>stripLeadingSlashes,
|
|
30
|
+
stripTrailingSlashes: ()=>stripTrailingSlashes,
|
|
31
|
+
trimToUndefined: ()=>trimToUndefined
|
|
32
|
+
});
|
|
33
|
+
function trimToUndefined(value) {
|
|
34
|
+
if (void 0 === value) return;
|
|
35
|
+
const trimmed = value.trim();
|
|
36
|
+
if (0 === trimmed.length) return;
|
|
37
|
+
return trimmed;
|
|
38
|
+
}
|
|
39
|
+
function resolveScriptUrl(override, fallback) {
|
|
40
|
+
if (void 0 !== override) return override;
|
|
41
|
+
return fallback;
|
|
42
|
+
}
|
|
43
|
+
function stripLeadingSlashes(value) {
|
|
44
|
+
let index = 0;
|
|
45
|
+
while(index < value.length && 47 === value.charCodeAt(index))index += 1;
|
|
46
|
+
return 0 === index ? value : value.slice(index);
|
|
47
|
+
}
|
|
48
|
+
function stripTrailingSlashes(value) {
|
|
49
|
+
let end = value.length;
|
|
50
|
+
while(end > 0 && 47 === value.charCodeAt(end - 1))end -= 1;
|
|
51
|
+
return end === value.length ? value : value.slice(0, end);
|
|
52
|
+
}
|
|
53
|
+
function joinUrlPath(base, path) {
|
|
54
|
+
const trimmedBase = base.trim();
|
|
55
|
+
const trimmedPath = path.trim();
|
|
56
|
+
if (0 === trimmedBase.length) throw new TypeError(`joinUrlPath requires a non-empty base URL. Received base=${JSON.stringify(base)}, path=${JSON.stringify(path)}.`);
|
|
57
|
+
if (0 === trimmedPath.length) throw new TypeError(`joinUrlPath requires a non-empty path. Received base=${JSON.stringify(base)}, path=${JSON.stringify(path)}.`);
|
|
58
|
+
return `${stripTrailingSlashes(trimmedBase)}/${stripLeadingSlashes(trimmedPath)}`;
|
|
59
|
+
}
|
|
60
|
+
exports.joinUrlPath = __webpack_exports__.joinUrlPath;
|
|
61
|
+
exports.resolveScriptUrl = __webpack_exports__.resolveScriptUrl;
|
|
62
|
+
exports.stripLeadingSlashes = __webpack_exports__.stripLeadingSlashes;
|
|
63
|
+
exports.stripTrailingSlashes = __webpack_exports__.stripTrailingSlashes;
|
|
64
|
+
exports.trimToUndefined = __webpack_exports__.trimToUndefined;
|
|
65
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
66
|
+
"joinUrlPath",
|
|
67
|
+
"resolveScriptUrl",
|
|
68
|
+
"stripLeadingSlashes",
|
|
69
|
+
"stripTrailingSlashes",
|
|
70
|
+
"trimToUndefined"
|
|
71
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
72
|
+
Object.defineProperty(exports, '__esModule', {
|
|
73
|
+
value: true
|
|
74
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
function trimToUndefined(value) {
|
|
2
|
+
if (void 0 === value) return;
|
|
3
|
+
const trimmed = value.trim();
|
|
4
|
+
if (0 === trimmed.length) return;
|
|
5
|
+
return trimmed;
|
|
6
|
+
}
|
|
7
|
+
function resolveScriptUrl(override, fallback) {
|
|
8
|
+
if (void 0 !== override) return override;
|
|
9
|
+
return fallback;
|
|
10
|
+
}
|
|
11
|
+
function stripLeadingSlashes(value) {
|
|
12
|
+
let index = 0;
|
|
13
|
+
while(index < value.length && 47 === value.charCodeAt(index))index += 1;
|
|
14
|
+
return 0 === index ? value : value.slice(index);
|
|
15
|
+
}
|
|
16
|
+
function stripTrailingSlashes(value) {
|
|
17
|
+
let end = value.length;
|
|
18
|
+
while(end > 0 && 47 === value.charCodeAt(end - 1))end -= 1;
|
|
19
|
+
return end === value.length ? value : value.slice(0, end);
|
|
20
|
+
}
|
|
21
|
+
function joinUrlPath(base, path) {
|
|
22
|
+
const trimmedBase = base.trim();
|
|
23
|
+
const trimmedPath = path.trim();
|
|
24
|
+
if (0 === trimmedBase.length) throw new TypeError(`joinUrlPath requires a non-empty base URL. Received base=${JSON.stringify(base)}, path=${JSON.stringify(path)}.`);
|
|
25
|
+
if (0 === trimmedPath.length) throw new TypeError(`joinUrlPath requires a non-empty path. Received base=${JSON.stringify(base)}, path=${JSON.stringify(path)}.`);
|
|
26
|
+
return `${stripTrailingSlashes(trimmedBase)}/${stripLeadingSlashes(trimmedPath)}`;
|
|
27
|
+
}
|
|
28
|
+
export { joinUrlPath, resolveScriptUrl, stripLeadingSlashes, stripTrailingSlashes, trimToUndefined };
|