@c15t/scripts 2.1.0 → 2.2.0-canary-20260804162155
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/AGENTS.md +62 -0
- package/README.md +32 -20
- package/dist/e2e-test-utils.cjs +51 -10
- package/dist/e2e-test-utils.js +37 -3
- package/dist/engine/compile.cjs +9 -5
- package/dist/engine/runtime.cjs +103 -17
- package/dist/engine/runtime.js +94 -12
- package/dist/registry.cjs +97 -12
- package/dist/registry.js +80 -0
- package/dist/resolve.cjs +9 -5
- package/dist/types.cjs +17 -13
- package/dist/vendors/_shared/attributes.cjs +13 -9
- package/dist/vendors/_shared/google-consent.cjs +14 -9
- package/dist/vendors/_shared/install-builders.cjs +12 -8
- package/dist/vendors/_shared/script-url.cjs +16 -12
- package/dist/vendors/ads-and-pixels/linkedin-insights.cjs +9 -5
- package/dist/vendors/ads-and-pixels/meta-pixel.cjs +13 -9
- package/dist/vendors/ads-and-pixels/microsoft-uet.cjs +11 -7
- package/dist/vendors/ads-and-pixels/reddit-pixel.cjs +9 -5
- package/dist/vendors/ads-and-pixels/snapchat-pixel.cjs +11 -7
- package/dist/vendors/ads-and-pixels/tiktok-pixel.cjs +9 -5
- package/dist/vendors/ads-and-pixels/x-pixel.cjs +9 -5
- package/dist/vendors/analytics/adobe-analytics.cjs +90 -0
- package/dist/vendors/analytics/adobe-analytics.js +49 -0
- package/dist/vendors/analytics/ahrefs-analytics.cjs +11 -7
- package/dist/vendors/analytics/amplitude.cjs +193 -0
- package/dist/vendors/analytics/amplitude.js +134 -0
- package/dist/vendors/analytics/clearbit.cjs +69 -0
- package/dist/vendors/analytics/clearbit.js +28 -0
- package/dist/vendors/analytics/cloudflare-web-analytics.cjs +11 -7
- package/dist/vendors/analytics/databuddy.cjs +11 -7
- package/dist/vendors/analytics/fathom-analytics.cjs +11 -7
- package/dist/vendors/analytics/google-tag.cjs +11 -7
- package/dist/vendors/analytics/heap.cjs +181 -0
- package/dist/vendors/analytics/heap.js +134 -0
- package/dist/vendors/analytics/hightouch.cjs +153 -0
- package/dist/vendors/analytics/hightouch.js +109 -0
- package/dist/vendors/analytics/hotjar.cjs +11 -7
- package/dist/vendors/analytics/logrocket.cjs +99 -0
- package/dist/vendors/analytics/logrocket.js +58 -0
- package/dist/vendors/analytics/matomo-analytics.cjs +9 -5
- package/dist/vendors/analytics/microsoft-clarity.cjs +75 -47
- package/dist/vendors/analytics/microsoft-clarity.js +64 -40
- package/dist/vendors/analytics/mixpanel-analytics.cjs +31 -16
- package/dist/vendors/analytics/mixpanel-analytics.js +22 -11
- package/dist/vendors/analytics/pirsch.cjs +108 -0
- package/dist/vendors/analytics/pirsch.js +67 -0
- package/dist/vendors/analytics/plausible-analytics.cjs +9 -5
- package/dist/vendors/analytics/posthog.cjs +63 -27
- package/dist/vendors/analytics/posthog.js +52 -20
- package/dist/vendors/analytics/promptwatch.cjs +11 -7
- package/dist/vendors/analytics/rudderstack.cjs +227 -0
- package/dist/vendors/analytics/rudderstack.js +183 -0
- package/dist/vendors/analytics/rybbit-analytics.cjs +9 -5
- package/dist/vendors/analytics/segment.cjs +9 -5
- package/dist/vendors/analytics/umami-analytics.cjs +9 -5
- package/dist/vendors/analytics/vercel-analytics.cjs +11 -7
- package/dist/vendors/functional/crisp.cjs +9 -5
- package/dist/vendors/functional/intercom.cjs +11 -7
- package/dist/vendors/tag-managers/google-tag-manager.cjs +11 -7
- package/dist-types/registry.d.ts +313 -241
- package/dist-types/types.d.ts +46 -4
- package/dist-types/vendors/ads-and-pixels/linkedin-insights.d.ts +18 -18
- package/dist-types/vendors/ads-and-pixels/meta-pixel.d.ts +21 -21
- package/dist-types/vendors/ads-and-pixels/microsoft-uet.d.ts +32 -32
- package/dist-types/vendors/ads-and-pixels/reddit-pixel.d.ts +19 -19
- package/dist-types/vendors/ads-and-pixels/snapchat-pixel.d.ts +16 -16
- package/dist-types/vendors/ads-and-pixels/tiktok-pixel.d.ts +28 -28
- package/dist-types/vendors/ads-and-pixels/x-pixel.d.ts +13 -13
- package/dist-types/vendors/analytics/adobe-analytics.d.ts +75 -0
- package/dist-types/vendors/analytics/ahrefs-analytics.d.ts +7 -7
- package/dist-types/vendors/analytics/amplitude.d.ts +234 -0
- package/dist-types/vendors/analytics/clearbit.d.ts +60 -0
- package/dist-types/vendors/analytics/cloudflare-web-analytics.d.ts +7 -7
- package/dist-types/vendors/analytics/databuddy.d.ts +25 -25
- package/dist-types/vendors/analytics/fathom-analytics.d.ts +11 -11
- package/dist-types/vendors/analytics/google-tag.d.ts +17 -17
- package/dist-types/vendors/analytics/heap.d.ts +316 -0
- package/dist-types/vendors/analytics/hightouch.d.ts +285 -0
- package/dist-types/vendors/analytics/hotjar.d.ts +14 -14
- package/dist-types/vendors/analytics/logrocket.d.ts +101 -0
- package/dist-types/vendors/analytics/microsoft-clarity.d.ts +42 -30
- package/dist-types/vendors/analytics/mixpanel-analytics.d.ts +40 -28
- package/dist-types/vendors/analytics/pirsch.d.ts +96 -0
- package/dist-types/vendors/analytics/plausible-analytics.d.ts +13 -13
- package/dist-types/vendors/analytics/posthog.d.ts +63 -45
- package/dist-types/vendors/analytics/promptwatch.d.ts +7 -7
- package/dist-types/vendors/analytics/rudderstack.d.ts +330 -0
- package/dist-types/vendors/analytics/rybbit-analytics.d.ts +18 -18
- package/dist-types/vendors/analytics/segment.d.ts +13 -13
- package/dist-types/vendors/analytics/umami-analytics.d.ts +12 -12
- package/dist-types/vendors/analytics/vercel-analytics.d.ts +16 -16
- package/dist-types/vendors/functional/crisp.d.ts +11 -11
- package/dist-types/vendors/functional/intercom.d.ts +16 -16
- package/dist-types/vendors/tag-managers/google-tag-manager.d.ts +18 -18
- package/docs/README.md +62 -0
- package/docs/frameworks/javascript/script-loader.md +356 -0
- package/docs/frameworks/next/script-loader.md +501 -0
- package/docs/frameworks/react/script-loader.md +555 -0
- package/docs/integrations/adobe-analytics.md +160 -0
- package/docs/integrations/ahrefs-analytics.md +157 -0
- package/docs/integrations/amplitude.md +230 -0
- package/docs/integrations/building-integrations.md +239 -0
- package/docs/integrations/clearbit.md +130 -0
- package/docs/integrations/cloudflare-web-analytics.md +126 -0
- package/docs/integrations/crisp.md +140 -0
- package/docs/integrations/databuddy.md +205 -0
- package/docs/integrations/fathom-analytics.md +150 -0
- package/docs/integrations/google-maps.md +263 -0
- package/docs/integrations/google-tag-manager.md +154 -0
- package/docs/integrations/google-tag.md +134 -0
- package/docs/integrations/heap.md +219 -0
- package/docs/integrations/hightouch.md +199 -0
- package/docs/integrations/hotjar.md +143 -0
- package/docs/integrations/intercom.md +144 -0
- package/docs/integrations/linkedin-insights.md +161 -0
- package/docs/integrations/logrocket.md +175 -0
- package/docs/integrations/matomo-analytics.md +171 -0
- package/docs/integrations/meta-pixel.md +412 -0
- package/docs/integrations/microsoft-clarity.md +173 -0
- package/docs/integrations/microsoft-uet.md +156 -0
- package/docs/integrations/mixpanel-analytics.md +130 -0
- package/docs/integrations/overview.md +149 -0
- package/docs/integrations/pirsch.md +142 -0
- package/docs/integrations/plausible-analytics.md +154 -0
- package/docs/integrations/posthog.md +258 -0
- package/docs/integrations/promptwatch.md +121 -0
- package/docs/integrations/reddit-pixel.md +241 -0
- package/docs/integrations/rudderstack.md +271 -0
- package/docs/integrations/rybbit-analytics.md +143 -0
- package/docs/integrations/segment.md +146 -0
- package/docs/integrations/snapchat-pixel.md +163 -0
- package/docs/integrations/tiktok-pixel.md +123 -0
- package/docs/integrations/umami-analytics.md +148 -0
- package/docs/integrations/vercel-analytics.md +141 -0
- package/docs/integrations/x-pixel.md +157 -0
- package/docs/integrations/youtube.md +193 -0
- package/docs/shared/react/guides/script-loader.md +311 -0
- package/package.json +61 -7
- package/readme.json +8 -4
package/dist/engine/runtime.js
CHANGED
|
@@ -112,6 +112,8 @@ function executeStep(step) {
|
|
|
112
112
|
}
|
|
113
113
|
case 'setGlobalPath':
|
|
114
114
|
{
|
|
115
|
+
const rootGlobal = step.path[0];
|
|
116
|
+
if (step.ifGlobalIsQueue && (!rootGlobal || !Array.isArray(win[rootGlobal]))) break;
|
|
115
117
|
const pathTarget = getPathTarget(win, step.path);
|
|
116
118
|
if (!pathTarget) break;
|
|
117
119
|
pathTarget.target[pathTarget.key] = cloneStepValue(step.value);
|
|
@@ -121,12 +123,36 @@ function executeStep(step) {
|
|
|
121
123
|
{
|
|
122
124
|
const target = win[step.target];
|
|
123
125
|
if (null === target || 'object' != typeof target && 'function' != typeof target) break;
|
|
126
|
+
if (!step.queue && !Array.isArray(target)) break;
|
|
124
127
|
const targetRecord = target;
|
|
125
128
|
for (const methodName of step.methods)targetRecord[methodName] = (...args)=>{
|
|
126
129
|
const queueTarget = resolveQueueTarget(win, step.queue ?? {
|
|
127
130
|
global: step.target
|
|
128
131
|
}, targetRecord);
|
|
129
132
|
if (!queueTarget) return;
|
|
133
|
+
if ('methodCall' === step.queueFormat || 'wrappedMethodCall' === step.queueFormat || 'voidMethodCall' === step.queueFormat) {
|
|
134
|
+
const promise = new Promise((resolve)=>{
|
|
135
|
+
queueTarget.push({
|
|
136
|
+
name: methodName,
|
|
137
|
+
args,
|
|
138
|
+
resolve
|
|
139
|
+
});
|
|
140
|
+
});
|
|
141
|
+
if ('wrappedMethodCall' === step.queueFormat) return {
|
|
142
|
+
promise
|
|
143
|
+
};
|
|
144
|
+
if ('voidMethodCall' === step.queueFormat) return;
|
|
145
|
+
return promise;
|
|
146
|
+
}
|
|
147
|
+
if ('callback' === step.queueFormat) return void queueTarget.push({
|
|
148
|
+
name: methodName,
|
|
149
|
+
fn: ()=>{
|
|
150
|
+
const latestTarget = win[step.target];
|
|
151
|
+
if (null === latestTarget || 'object' != typeof latestTarget && 'function' != typeof latestTarget) return;
|
|
152
|
+
const method = latestTarget[methodName];
|
|
153
|
+
if ('function' == typeof method) method.apply(latestTarget, args);
|
|
154
|
+
}
|
|
155
|
+
});
|
|
130
156
|
queueTarget.push([
|
|
131
157
|
methodName,
|
|
132
158
|
...args
|
|
@@ -134,10 +160,31 @@ function executeStep(step) {
|
|
|
134
160
|
};
|
|
135
161
|
break;
|
|
136
162
|
}
|
|
163
|
+
case 'defineQueueClass':
|
|
164
|
+
{
|
|
165
|
+
const target = win[step.target];
|
|
166
|
+
if (null === target || 'object' != typeof target && 'function' != typeof target) break;
|
|
167
|
+
const queueProperty = step.queueProperty ?? '_q';
|
|
168
|
+
const QueueClass = function() {
|
|
169
|
+
this[queueProperty] = [];
|
|
170
|
+
};
|
|
171
|
+
const prototype = QueueClass.prototype;
|
|
172
|
+
for (const methodName of step.methods)prototype[methodName] = function(...args) {
|
|
173
|
+
const queueTarget = this[queueProperty];
|
|
174
|
+
if (Array.isArray(queueTarget)) queueTarget.push({
|
|
175
|
+
name: methodName,
|
|
176
|
+
args
|
|
177
|
+
});
|
|
178
|
+
return this;
|
|
179
|
+
};
|
|
180
|
+
target[step.name] = QueueClass;
|
|
181
|
+
break;
|
|
182
|
+
}
|
|
137
183
|
case 'defineGlobalMethods':
|
|
138
184
|
{
|
|
139
185
|
const target = win[step.target];
|
|
140
186
|
if (null === target || 'object' != typeof target && 'function' != typeof target) break;
|
|
187
|
+
if (step.ifGlobalIsQueue && !Array.isArray(target)) break;
|
|
141
188
|
const targetRecord = target;
|
|
142
189
|
for (const method of step.methods)targetRecord[method.name] = 'return' === method.behavior ? ()=>cloneStepValue(method.value) : ()=>{};
|
|
143
190
|
break;
|
|
@@ -233,22 +280,57 @@ function mapConsentState(mapping, consents) {
|
|
|
233
280
|
}
|
|
234
281
|
return result;
|
|
235
282
|
}
|
|
283
|
+
function partitionConsentIds(mapping, consents) {
|
|
284
|
+
const allowedConsentIds = [];
|
|
285
|
+
const deniedConsentIds = [];
|
|
286
|
+
for (const [c15tCategory, consentIds] of Object.entries(mapping)){
|
|
287
|
+
const isGranted = consents[c15tCategory];
|
|
288
|
+
for (const consentId of consentIds)(isGranted ? allowedConsentIds : deniedConsentIds).push(consentId);
|
|
289
|
+
}
|
|
290
|
+
return {
|
|
291
|
+
allowedConsentIds,
|
|
292
|
+
deniedConsentIds
|
|
293
|
+
};
|
|
294
|
+
}
|
|
236
295
|
function getConsentSignalSteps(resolvedManifest, mode, consents) {
|
|
237
296
|
if (!resolvedManifest.consentMapping || !resolvedManifest.consentSignal) return [];
|
|
238
|
-
const mapped = mapConsentState(resolvedManifest.consentMapping, consents);
|
|
239
297
|
switch(resolvedManifest.consentSignal){
|
|
240
298
|
case 'gtag':
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
'
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
299
|
+
{
|
|
300
|
+
const mapped = mapConsentState(resolvedManifest.consentMapping, consents);
|
|
301
|
+
return [
|
|
302
|
+
{
|
|
303
|
+
type: 'callGlobal',
|
|
304
|
+
global: resolvedManifest.consentSignalTarget ?? 'gtag',
|
|
305
|
+
args: [
|
|
306
|
+
'consent',
|
|
307
|
+
mode,
|
|
308
|
+
mapped
|
|
309
|
+
]
|
|
310
|
+
}
|
|
311
|
+
];
|
|
312
|
+
}
|
|
313
|
+
case 'rudderstack':
|
|
314
|
+
{
|
|
315
|
+
const partition = partitionConsentIds(resolvedManifest.consentMapping, consents);
|
|
316
|
+
return [
|
|
317
|
+
{
|
|
318
|
+
type: 'callGlobal',
|
|
319
|
+
global: resolvedManifest.consentSignalTarget ?? 'rudderanalytics',
|
|
320
|
+
method: 'consent',
|
|
321
|
+
args: [
|
|
322
|
+
{
|
|
323
|
+
consentManagement: {
|
|
324
|
+
enabled: true,
|
|
325
|
+
provider: 'custom',
|
|
326
|
+
allowedConsentIds: partition.allowedConsentIds,
|
|
327
|
+
deniedConsentIds: partition.deniedConsentIds
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
]
|
|
331
|
+
}
|
|
332
|
+
];
|
|
333
|
+
}
|
|
252
334
|
}
|
|
253
335
|
}
|
|
254
336
|
function resolvedManifestToScript(resolvedManifest) {
|
package/dist/registry.cjs
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __webpack_require__ = {};
|
|
3
3
|
(()=>{
|
|
4
|
-
__webpack_require__.d = (exports1,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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");
|
|
9
13
|
};
|
|
10
14
|
})();
|
|
11
15
|
(()=>{
|
|
@@ -23,13 +27,6 @@ var __webpack_require__ = {};
|
|
|
23
27
|
})();
|
|
24
28
|
var __webpack_exports__ = {};
|
|
25
29
|
__webpack_require__.r(__webpack_exports__);
|
|
26
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
-
BUILT_IN_INTEGRATION_CATEGORIES: ()=>BUILT_IN_INTEGRATION_CATEGORIES,
|
|
28
|
-
builtInScriptIntegrations: ()=>builtInScriptIntegrations,
|
|
29
|
-
getBuiltInScriptIntegration: ()=>getBuiltInScriptIntegration,
|
|
30
|
-
getBuiltInScriptIntegrationBySubpath: ()=>getBuiltInScriptIntegrationBySubpath,
|
|
31
|
-
getBuiltInScriptIntegrationByVendor: ()=>getBuiltInScriptIntegrationByVendor
|
|
32
|
-
});
|
|
33
30
|
const BUILT_IN_INTEGRATION_CATEGORIES = [
|
|
34
31
|
{
|
|
35
32
|
key: 'analytics',
|
|
@@ -79,6 +76,26 @@ const builtInScriptIntegrations = [
|
|
|
79
76
|
integrationCategory: 'analytics',
|
|
80
77
|
consentCategory: 'measurement'
|
|
81
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
|
+
},
|
|
82
99
|
{
|
|
83
100
|
key: 'cloudflareWebAnalytics',
|
|
84
101
|
vendor: 'cloudflare-web-analytics',
|
|
@@ -89,6 +106,16 @@ const builtInScriptIntegrations = [
|
|
|
89
106
|
integrationCategory: 'analytics',
|
|
90
107
|
consentCategory: 'measurement'
|
|
91
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
|
+
},
|
|
92
119
|
{
|
|
93
120
|
key: 'microsoft-clarity',
|
|
94
121
|
vendor: 'microsoft-clarity',
|
|
@@ -119,6 +146,16 @@ const builtInScriptIntegrations = [
|
|
|
119
146
|
integrationCategory: 'analytics',
|
|
120
147
|
consentCategory: 'measurement'
|
|
121
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
|
+
},
|
|
122
159
|
{
|
|
123
160
|
key: 'mixpanelAnalytics',
|
|
124
161
|
vendor: 'mixpanel-analytics',
|
|
@@ -139,6 +176,36 @@ const builtInScriptIntegrations = [
|
|
|
139
176
|
integrationCategory: 'analytics',
|
|
140
177
|
consentCategory: 'measurement'
|
|
141
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
|
+
},
|
|
142
209
|
{
|
|
143
210
|
key: 'matomoAnalytics',
|
|
144
211
|
vendor: 'matomo-analytics',
|
|
@@ -169,6 +236,16 @@ const builtInScriptIntegrations = [
|
|
|
169
236
|
integrationCategory: 'analytics',
|
|
170
237
|
consentCategory: 'measurement'
|
|
171
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
|
+
},
|
|
172
249
|
{
|
|
173
250
|
key: 'segment',
|
|
174
251
|
vendor: 'segment',
|
|
@@ -321,6 +398,14 @@ function getBuiltInScriptIntegrationBySubpath(subpath) {
|
|
|
321
398
|
function getBuiltInScriptIntegrationByVendor(vendor) {
|
|
322
399
|
return builtInScriptIntegrations.find((integration)=>integration.vendor === vendor);
|
|
323
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
|
+
});
|
|
324
409
|
exports.BUILT_IN_INTEGRATION_CATEGORIES = __webpack_exports__.BUILT_IN_INTEGRATION_CATEGORIES;
|
|
325
410
|
exports.builtInScriptIntegrations = __webpack_exports__.builtInScriptIntegrations;
|
|
326
411
|
exports.getBuiltInScriptIntegration = __webpack_exports__.getBuiltInScriptIntegration;
|
package/dist/registry.js
CHANGED
|
@@ -47,6 +47,26 @@ const builtInScriptIntegrations = [
|
|
|
47
47
|
integrationCategory: 'analytics',
|
|
48
48
|
consentCategory: 'measurement'
|
|
49
49
|
},
|
|
50
|
+
{
|
|
51
|
+
key: 'adobeAnalytics',
|
|
52
|
+
vendor: 'adobe-analytics',
|
|
53
|
+
label: 'Adobe Analytics',
|
|
54
|
+
hint: 'Adobe Experience Platform tags',
|
|
55
|
+
docsSlug: 'adobe-analytics',
|
|
56
|
+
packageSubpath: 'adobe-analytics',
|
|
57
|
+
integrationCategory: 'analytics',
|
|
58
|
+
consentCategory: 'measurement'
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
key: 'amplitude',
|
|
62
|
+
vendor: 'amplitude',
|
|
63
|
+
label: 'Amplitude',
|
|
64
|
+
hint: 'Product analytics',
|
|
65
|
+
docsSlug: 'amplitude',
|
|
66
|
+
packageSubpath: 'amplitude',
|
|
67
|
+
integrationCategory: 'analytics',
|
|
68
|
+
consentCategory: 'measurement'
|
|
69
|
+
},
|
|
50
70
|
{
|
|
51
71
|
key: 'cloudflareWebAnalytics',
|
|
52
72
|
vendor: 'cloudflare-web-analytics',
|
|
@@ -57,6 +77,16 @@ const builtInScriptIntegrations = [
|
|
|
57
77
|
integrationCategory: 'analytics',
|
|
58
78
|
consentCategory: 'measurement'
|
|
59
79
|
},
|
|
80
|
+
{
|
|
81
|
+
key: 'clearbit',
|
|
82
|
+
vendor: 'clearbit',
|
|
83
|
+
label: 'Clearbit',
|
|
84
|
+
hint: 'Visitor and company enrichment',
|
|
85
|
+
docsSlug: 'clearbit',
|
|
86
|
+
packageSubpath: 'clearbit',
|
|
87
|
+
integrationCategory: 'analytics',
|
|
88
|
+
consentCategory: 'marketing'
|
|
89
|
+
},
|
|
60
90
|
{
|
|
61
91
|
key: 'microsoft-clarity',
|
|
62
92
|
vendor: 'microsoft-clarity',
|
|
@@ -87,6 +117,16 @@ const builtInScriptIntegrations = [
|
|
|
87
117
|
integrationCategory: 'analytics',
|
|
88
118
|
consentCategory: 'measurement'
|
|
89
119
|
},
|
|
120
|
+
{
|
|
121
|
+
key: 'heap',
|
|
122
|
+
vendor: 'heap',
|
|
123
|
+
label: 'Heap',
|
|
124
|
+
hint: 'Autocapture product analytics',
|
|
125
|
+
docsSlug: 'heap',
|
|
126
|
+
packageSubpath: 'heap',
|
|
127
|
+
integrationCategory: 'analytics',
|
|
128
|
+
consentCategory: 'measurement'
|
|
129
|
+
},
|
|
90
130
|
{
|
|
91
131
|
key: 'mixpanelAnalytics',
|
|
92
132
|
vendor: 'mixpanel-analytics',
|
|
@@ -107,6 +147,36 @@ const builtInScriptIntegrations = [
|
|
|
107
147
|
integrationCategory: 'analytics',
|
|
108
148
|
consentCategory: 'measurement'
|
|
109
149
|
},
|
|
150
|
+
{
|
|
151
|
+
key: 'hightouch',
|
|
152
|
+
vendor: 'hightouch',
|
|
153
|
+
label: 'Hightouch',
|
|
154
|
+
hint: 'Customer data platform events',
|
|
155
|
+
docsSlug: 'hightouch',
|
|
156
|
+
packageSubpath: 'hightouch',
|
|
157
|
+
integrationCategory: 'analytics',
|
|
158
|
+
consentCategory: 'measurement'
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
key: 'rudderstack',
|
|
162
|
+
vendor: 'rudderstack',
|
|
163
|
+
label: 'RudderStack',
|
|
164
|
+
hint: 'Customer data platform events',
|
|
165
|
+
docsSlug: 'rudderstack',
|
|
166
|
+
packageSubpath: 'rudderstack',
|
|
167
|
+
integrationCategory: 'analytics',
|
|
168
|
+
consentCategory: 'measurement'
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
key: 'logRocket',
|
|
172
|
+
vendor: 'logrocket',
|
|
173
|
+
label: 'LogRocket',
|
|
174
|
+
hint: 'Session replay and monitoring',
|
|
175
|
+
docsSlug: 'logrocket',
|
|
176
|
+
packageSubpath: 'logrocket',
|
|
177
|
+
integrationCategory: 'analytics',
|
|
178
|
+
consentCategory: 'measurement'
|
|
179
|
+
},
|
|
110
180
|
{
|
|
111
181
|
key: 'matomoAnalytics',
|
|
112
182
|
vendor: 'matomo-analytics',
|
|
@@ -137,6 +207,16 @@ const builtInScriptIntegrations = [
|
|
|
137
207
|
integrationCategory: 'analytics',
|
|
138
208
|
consentCategory: 'measurement'
|
|
139
209
|
},
|
|
210
|
+
{
|
|
211
|
+
key: 'pirsch',
|
|
212
|
+
vendor: 'pirsch',
|
|
213
|
+
label: 'Pirsch',
|
|
214
|
+
hint: 'Privacy-friendly cookieless analytics',
|
|
215
|
+
docsSlug: 'pirsch',
|
|
216
|
+
packageSubpath: 'pirsch',
|
|
217
|
+
integrationCategory: 'analytics',
|
|
218
|
+
consentCategory: 'measurement'
|
|
219
|
+
},
|
|
140
220
|
{
|
|
141
221
|
key: 'segment',
|
|
142
222
|
vendor: 'segment',
|
package/dist/resolve.cjs
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __webpack_require__ = {};
|
|
3
3
|
(()=>{
|
|
4
|
-
__webpack_require__.d = (exports1,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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");
|
|
9
13
|
};
|
|
10
14
|
})();
|
|
11
15
|
(()=>{
|
package/dist/types.cjs
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __webpack_require__ = {};
|
|
3
3
|
(()=>{
|
|
4
|
-
__webpack_require__.d = (exports1,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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");
|
|
9
13
|
};
|
|
10
14
|
})();
|
|
11
15
|
(()=>{
|
|
@@ -23,14 +27,6 @@ var __webpack_require__ = {};
|
|
|
23
27
|
})();
|
|
24
28
|
var __webpack_exports__ = {};
|
|
25
29
|
__webpack_require__.r(__webpack_exports__);
|
|
26
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
-
RUNTIME_VALUE_KIND: ()=>RUNTIME_VALUE_KIND,
|
|
28
|
-
VENDOR_MANIFEST_KIND: ()=>VENDOR_MANIFEST_KIND,
|
|
29
|
-
VENDOR_MANIFEST_SCHEMA_VERSION: ()=>VENDOR_MANIFEST_SCHEMA_VERSION,
|
|
30
|
-
runtimeDateValue: ()=>runtimeDateValue,
|
|
31
|
-
runtimeTimestampValue: ()=>runtimeTimestampValue,
|
|
32
|
-
vendorManifestContract: ()=>vendorManifestContract
|
|
33
|
-
});
|
|
34
30
|
const VENDOR_MANIFEST_KIND = 'c15t.vendor-manifest';
|
|
35
31
|
const VENDOR_MANIFEST_SCHEMA_VERSION = 1;
|
|
36
32
|
const vendorManifestContract = {
|
|
@@ -46,6 +42,14 @@ const runtimeTimestampValue = {
|
|
|
46
42
|
kind: RUNTIME_VALUE_KIND,
|
|
47
43
|
value: 'timestamp'
|
|
48
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
|
+
});
|
|
49
53
|
exports.RUNTIME_VALUE_KIND = __webpack_exports__.RUNTIME_VALUE_KIND;
|
|
50
54
|
exports.VENDOR_MANIFEST_KIND = __webpack_exports__.VENDOR_MANIFEST_KIND;
|
|
51
55
|
exports.VENDOR_MANIFEST_SCHEMA_VERSION = __webpack_exports__.VENDOR_MANIFEST_SCHEMA_VERSION;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __webpack_require__ = {};
|
|
3
3
|
(()=>{
|
|
4
|
-
__webpack_require__.d = (exports1,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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");
|
|
9
13
|
};
|
|
10
14
|
})();
|
|
11
15
|
(()=>{
|
|
@@ -23,10 +27,6 @@ var __webpack_require__ = {};
|
|
|
23
27
|
})();
|
|
24
28
|
var __webpack_exports__ = {};
|
|
25
29
|
__webpack_require__.r(__webpack_exports__);
|
|
26
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
-
booleanDataAttribute: ()=>booleanDataAttribute,
|
|
28
|
-
listDataAttribute: ()=>listDataAttribute
|
|
29
|
-
});
|
|
30
30
|
function booleanDataAttribute(value) {
|
|
31
31
|
if (void 0 === value) return;
|
|
32
32
|
if (value) return 'true';
|
|
@@ -40,6 +40,10 @@ function listDataAttribute(value) {
|
|
|
40
40
|
}
|
|
41
41
|
return value;
|
|
42
42
|
}
|
|
43
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
44
|
+
booleanDataAttribute: ()=>booleanDataAttribute,
|
|
45
|
+
listDataAttribute: ()=>listDataAttribute
|
|
46
|
+
});
|
|
43
47
|
exports.booleanDataAttribute = __webpack_exports__.booleanDataAttribute;
|
|
44
48
|
exports.listDataAttribute = __webpack_exports__.listDataAttribute;
|
|
45
49
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __webpack_require__ = {};
|
|
3
3
|
(()=>{
|
|
4
|
-
__webpack_require__.d = (exports1,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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");
|
|
9
13
|
};
|
|
10
14
|
})();
|
|
11
15
|
(()=>{
|
|
@@ -23,10 +27,6 @@ var __webpack_require__ = {};
|
|
|
23
27
|
})();
|
|
24
28
|
var __webpack_exports__ = {};
|
|
25
29
|
__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
30
|
const GOOGLE_CONSENT_MODE_V2_DEFAULT_MAPPING = {
|
|
31
31
|
necessary: [
|
|
32
32
|
'security_storage'
|
|
@@ -53,6 +53,11 @@ function withOptionalConsentMapping(manifest, consentMapping) {
|
|
|
53
53
|
consentMapping
|
|
54
54
|
};
|
|
55
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
|
+
});
|
|
56
61
|
exports.GOOGLE_CONSENT_MODE_V2_DEFAULT_MAPPING = __webpack_exports__.GOOGLE_CONSENT_MODE_V2_DEFAULT_MAPPING;
|
|
57
62
|
exports.withOptionalConsentMapping = __webpack_exports__.withOptionalConsentMapping;
|
|
58
63
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __webpack_require__ = {};
|
|
3
3
|
(()=>{
|
|
4
|
-
__webpack_require__.d = (exports1,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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");
|
|
9
13
|
};
|
|
10
14
|
})();
|
|
11
15
|
(()=>{
|
|
@@ -23,9 +27,6 @@ var __webpack_require__ = {};
|
|
|
23
27
|
})();
|
|
24
28
|
var __webpack_exports__ = {};
|
|
25
29
|
__webpack_require__.r(__webpack_exports__);
|
|
26
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
-
buildQueuePixelInstall: ()=>buildQueuePixelInstall
|
|
28
|
-
});
|
|
29
30
|
function buildQueuePixelInstall({ global, initArgs, trackStep, scriptPlaceholder = "{{scriptUrl}}" }) {
|
|
30
31
|
const install = [
|
|
31
32
|
{
|
|
@@ -46,6 +47,9 @@ function buildQueuePixelInstall({ global, initArgs, trackStep, scriptPlaceholder
|
|
|
46
47
|
});
|
|
47
48
|
return install;
|
|
48
49
|
}
|
|
50
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
51
|
+
buildQueuePixelInstall: ()=>buildQueuePixelInstall
|
|
52
|
+
});
|
|
49
53
|
exports.buildQueuePixelInstall = __webpack_exports__.buildQueuePixelInstall;
|
|
50
54
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
51
55
|
"buildQueuePixelInstall"
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __webpack_require__ = {};
|
|
3
3
|
(()=>{
|
|
4
|
-
__webpack_require__.d = (exports1,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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");
|
|
9
13
|
};
|
|
10
14
|
})();
|
|
11
15
|
(()=>{
|
|
@@ -23,13 +27,6 @@ var __webpack_require__ = {};
|
|
|
23
27
|
})();
|
|
24
28
|
var __webpack_exports__ = {};
|
|
25
29
|
__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
30
|
function trimToUndefined(value) {
|
|
34
31
|
if (void 0 === value) return;
|
|
35
32
|
const trimmed = value.trim();
|
|
@@ -57,6 +54,13 @@ function joinUrlPath(base, path) {
|
|
|
57
54
|
if (0 === trimmedPath.length) throw new TypeError(`joinUrlPath requires a non-empty path. Received base=${JSON.stringify(base)}, path=${JSON.stringify(path)}.`);
|
|
58
55
|
return `${stripTrailingSlashes(trimmedBase)}/${stripLeadingSlashes(trimmedPath)}`;
|
|
59
56
|
}
|
|
57
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
58
|
+
joinUrlPath: ()=>joinUrlPath,
|
|
59
|
+
resolveScriptUrl: ()=>resolveScriptUrl,
|
|
60
|
+
stripLeadingSlashes: ()=>stripLeadingSlashes,
|
|
61
|
+
stripTrailingSlashes: ()=>stripTrailingSlashes,
|
|
62
|
+
trimToUndefined: ()=>trimToUndefined
|
|
63
|
+
});
|
|
60
64
|
exports.joinUrlPath = __webpack_exports__.joinUrlPath;
|
|
61
65
|
exports.resolveScriptUrl = __webpack_exports__.resolveScriptUrl;
|
|
62
66
|
exports.stripLeadingSlashes = __webpack_exports__.stripLeadingSlashes;
|