@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.
- package/AGENTS.md +74 -48
- package/README.md +3 -3
- package/dist/e2e-test-utils.js +60 -24
- package/dist/engine/compile.js +45 -45
- package/dist/engine/runtime.js +119 -119
- package/dist/registry.js +186 -176
- package/dist/resolve.js +12 -12
- package/dist/vendors/_shared/attributes.js +5 -5
- package/dist/vendors/_shared/google-consent.js +10 -10
- package/dist/vendors/_shared/install-builders.js +9 -9
- package/dist/vendors/_shared/script-url.js +12 -12
- package/dist/vendors/ads-and-pixels/linkedin-insights.js +16 -16
- package/dist/vendors/ads-and-pixels/meta-pixel.js +82 -82
- package/dist/vendors/ads-and-pixels/microsoft-uet.js +57 -57
- package/dist/vendors/ads-and-pixels/openai-pixel.js +88 -0
- package/dist/vendors/ads-and-pixels/reddit-pixel.js +39 -39
- package/dist/vendors/ads-and-pixels/snapchat-pixel.js +25 -25
- package/dist/vendors/ads-and-pixels/tiktok-pixel.js +31 -31
- package/dist/vendors/ads-and-pixels/x-pixel.js +17 -17
- package/dist/vendors/analytics/adobe-analytics.js +17 -17
- package/dist/vendors/analytics/ahrefs-analytics.js +8 -8
- package/dist/vendors/analytics/amplitude.js +39 -39
- package/dist/vendors/analytics/clearbit.js +11 -11
- package/dist/vendors/analytics/cloudflare-web-analytics.js +13 -13
- package/dist/vendors/analytics/databuddy.js +45 -45
- package/dist/vendors/analytics/fathom-analytics.js +15 -15
- package/dist/vendors/analytics/google-tag.js +23 -23
- package/dist/vendors/analytics/heap.js +37 -37
- package/dist/vendors/analytics/hightouch.js +30 -30
- package/dist/vendors/analytics/hotjar.js +14 -14
- package/dist/vendors/analytics/logrocket.js +24 -24
- package/dist/vendors/analytics/matomo-analytics.js +51 -51
- package/dist/vendors/analytics/microsoft-clarity.js +31 -31
- package/dist/vendors/analytics/mixpanel-analytics.js +31 -31
- package/dist/vendors/analytics/pirsch.js +27 -27
- package/dist/vendors/analytics/plausible-analytics.js +24 -24
- package/dist/vendors/analytics/posthog.js +84 -79
- package/dist/vendors/analytics/promptwatch.js +8 -8
- package/dist/vendors/analytics/rudderstack.js +50 -50
- package/dist/vendors/analytics/rybbit-analytics.js +30 -30
- package/dist/vendors/analytics/segment.js +16 -16
- package/dist/vendors/analytics/umami-analytics.js +16 -16
- package/dist/vendors/analytics/vercel-analytics.js +22 -22
- package/dist/vendors/functional/crisp.js +49 -51
- package/dist/vendors/functional/intercom.js +18 -18
- package/dist/vendors/tag-managers/google-tag-manager.js +20 -20
- package/dist-types/__tests__/helpers.d.ts +10 -10
- package/dist-types/engine/compile.d.ts +2 -2
- package/dist-types/engine/runtime.d.ts +3 -3
- package/dist-types/registry.d.ts +182 -173
- package/dist-types/resolve.d.ts +2 -2
- package/dist-types/types.d.ts +2 -2
- package/dist-types/vendors/_shared/attributes.d.ts +2 -2
- package/dist-types/vendors/_shared/google-consent.d.ts +2 -2
- package/dist-types/vendors/_shared/install-builders.d.ts +1 -1
- package/dist-types/vendors/_shared/script-url.d.ts +6 -6
- package/dist-types/vendors/ads-and-pixels/linkedin-insights.d.ts +14 -14
- package/dist-types/vendors/ads-and-pixels/meta-pixel.d.ts +27 -27
- package/dist-types/vendors/ads-and-pixels/microsoft-uet.d.ts +40 -40
- package/dist-types/vendors/ads-and-pixels/openai-pixel.d.ts +211 -0
- package/dist-types/vendors/ads-and-pixels/reddit-pixel.d.ts +28 -29
- package/dist-types/vendors/ads-and-pixels/snapchat-pixel.d.ts +23 -23
- package/dist-types/vendors/ads-and-pixels/tiktok-pixel.d.ts +22 -22
- package/dist-types/vendors/ads-and-pixels/x-pixel.d.ts +15 -15
- package/dist-types/vendors/analytics/adobe-analytics.d.ts +3 -3
- package/dist-types/vendors/analytics/ahrefs-analytics.d.ts +5 -5
- package/dist-types/vendors/analytics/amplitude.d.ts +24 -24
- package/dist-types/vendors/analytics/clearbit.d.ts +5 -5
- package/dist-types/vendors/analytics/cloudflare-web-analytics.d.ts +6 -6
- package/dist-types/vendors/analytics/databuddy.d.ts +34 -31
- package/dist-types/vendors/analytics/fathom-analytics.d.ts +8 -8
- package/dist-types/vendors/analytics/google-tag.d.ts +17 -17
- package/dist-types/vendors/analytics/heap.d.ts +17 -17
- package/dist-types/vendors/analytics/hightouch.d.ts +15 -15
- package/dist-types/vendors/analytics/hotjar.d.ts +9 -9
- package/dist-types/vendors/analytics/logrocket.d.ts +11 -11
- package/dist-types/vendors/analytics/matomo-analytics.d.ts +3 -3
- package/dist-types/vendors/analytics/microsoft-clarity.d.ts +12 -13
- package/dist-types/vendors/analytics/mixpanel-analytics.d.ts +20 -20
- package/dist-types/vendors/analytics/pirsch.d.ts +10 -10
- package/dist-types/vendors/analytics/plausible-analytics.d.ts +13 -13
- package/dist-types/vendors/analytics/posthog.d.ts +35 -32
- package/dist-types/vendors/analytics/promptwatch.d.ts +5 -5
- package/dist-types/vendors/analytics/rudderstack.d.ts +16 -16
- package/dist-types/vendors/analytics/rybbit-analytics.d.ts +15 -15
- package/dist-types/vendors/analytics/segment.d.ts +11 -11
- package/dist-types/vendors/analytics/umami-analytics.d.ts +9 -9
- package/dist-types/vendors/analytics/vercel-analytics.d.ts +13 -13
- package/dist-types/vendors/functional/crisp.d.ts +9 -9
- package/dist-types/vendors/functional/intercom.d.ts +12 -12
- package/dist-types/vendors/tag-managers/google-tag-manager.d.ts +16 -16
- package/docs/README.md +74 -48
- package/docs/assets/v3/brand-bar.png +0 -0
- package/docs/assets/v3/brand-card.png +0 -0
- package/docs/assets/v3/choice-wall.png +0 -0
- package/docs/assets/v3/mobile-card.png +0 -0
- package/docs/assets/v3/preferences.png +0 -0
- package/docs/customization/overview.md +45 -0
- package/docs/customization/recipes.md +79 -0
- package/docs/customization/slots.md +55 -0
- package/docs/customization/tokens.md +76 -0
- package/docs/customization/translations.md +49 -0
- package/docs/frameworks/javascript/script-loader.md +30 -339
- package/docs/frameworks/next/script-loader.md +134 -467
- package/docs/frameworks/react/script-loader.md +35 -535
- package/docs/guides/consent-state.md +60 -0
- package/docs/guides/data-fetching.md +163 -0
- package/docs/guides/deployment-modes.md +63 -0
- package/docs/guides/troubleshooting.md +68 -0
- package/docs/guides/verify-consent.md +62 -0
- package/docs/integrations/adobe-analytics.md +239 -105
- package/docs/integrations/ahrefs-analytics.md +238 -104
- package/docs/integrations/amplitude.md +219 -157
- package/docs/integrations/building-integrations.md +32 -224
- package/docs/integrations/clearbit.md +247 -86
- package/docs/integrations/cloudflare-web-analytics.md +250 -84
- package/docs/integrations/crisp.md +251 -97
- package/docs/integrations/databuddy.md +259 -153
- package/docs/integrations/fathom-analytics.md +239 -96
- package/docs/integrations/google-maps.md +328 -207
- package/docs/integrations/google-tag-manager.md +248 -96
- package/docs/integrations/google-tag.md +261 -90
- package/docs/integrations/heap.md +222 -149
- package/docs/integrations/hightouch.md +225 -131
- package/docs/integrations/hotjar.md +239 -90
- package/docs/integrations/intercom.md +239 -98
- package/docs/integrations/linkedin-insights.md +243 -113
- package/docs/integrations/logrocket.md +241 -123
- package/docs/integrations/matomo-analytics.md +256 -111
- package/docs/integrations/meta-pixel.md +197 -324
- package/docs/integrations/microsoft-clarity.md +233 -114
- package/docs/integrations/microsoft-uet.md +245 -110
- package/docs/integrations/mixpanel-analytics.md +252 -87
- package/docs/integrations/openai-pixel.md +441 -0
- package/docs/integrations/overview.md +95 -133
- package/docs/integrations/pirsch.md +249 -96
- package/docs/integrations/plausible-analytics.md +241 -100
- package/docs/integrations/posthog.md +353 -214
- package/docs/integrations/promptwatch.md +251 -81
- package/docs/integrations/reddit-pixel.md +226 -173
- package/docs/integrations/rudderstack.md +244 -187
- package/docs/integrations/rybbit-analytics.md +244 -91
- package/docs/integrations/segment.md +238 -92
- package/docs/integrations/snapchat-pixel.md +240 -110
- package/docs/integrations/tiktok-pixel.md +249 -81
- package/docs/integrations/umami-analytics.md +242 -95
- package/docs/integrations/vercel-analytics.md +242 -90
- package/docs/integrations/x-pixel.md +238 -104
- package/docs/integrations/youtube.md +354 -142
- package/docs/upgrade-v3.md +334 -0
- package/package.json +85 -78
- package/readme.json +2 -2
- package/dist/e2e-test-utils.cjs +0 -166
- package/dist/engine/compile.cjs +0 -130
- package/dist/engine/runtime.cjs +0 -475
- package/dist/registry.cjs +0 -423
- package/dist/resolve.cjs +0 -71
- package/dist/types.cjs +0 -69
- package/dist/vendors/_shared/attributes.cjs +0 -55
- package/dist/vendors/_shared/google-consent.cjs +0 -69
- package/dist/vendors/_shared/install-builders.cjs +0 -59
- package/dist/vendors/_shared/script-url.cjs +0 -78
- package/dist/vendors/ads-and-pixels/linkedin-insights.cjs +0 -89
- package/dist/vendors/ads-and-pixels/meta-pixel.cjs +0 -206
- package/dist/vendors/ads-and-pixels/microsoft-uet.cjs +0 -151
- package/dist/vendors/ads-and-pixels/reddit-pixel.cjs +0 -151
- package/dist/vendors/ads-and-pixels/snapchat-pixel.cjs +0 -131
- package/dist/vendors/ads-and-pixels/tiktok-pixel.cjs +0 -130
- package/dist/vendors/ads-and-pixels/x-pixel.cjs +0 -92
- package/dist/vendors/analytics/adobe-analytics.cjs +0 -90
- package/dist/vendors/analytics/ahrefs-analytics.cjs +0 -68
- package/dist/vendors/analytics/amplitude.cjs +0 -193
- package/dist/vendors/analytics/clearbit.cjs +0 -69
- package/dist/vendors/analytics/cloudflare-web-analytics.cjs +0 -73
- package/dist/vendors/analytics/databuddy.cjs +0 -144
- package/dist/vendors/analytics/fathom-analytics.cjs +0 -76
- package/dist/vendors/analytics/google-tag.cjs +0 -107
- package/dist/vendors/analytics/heap.cjs +0 -181
- package/dist/vendors/analytics/hightouch.cjs +0 -153
- package/dist/vendors/analytics/hotjar.cjs +0 -85
- package/dist/vendors/analytics/logrocket.cjs +0 -99
- package/dist/vendors/analytics/matomo-analytics.cjs +0 -232
- package/dist/vendors/analytics/microsoft-clarity.cjs +0 -138
- package/dist/vendors/analytics/mixpanel-analytics.cjs +0 -134
- package/dist/vendors/analytics/pirsch.cjs +0 -108
- package/dist/vendors/analytics/plausible-analytics.cjs +0 -122
- package/dist/vendors/analytics/posthog.cjs +0 -236
- package/dist/vendors/analytics/promptwatch.cjs +0 -70
- package/dist/vendors/analytics/rudderstack.cjs +0 -227
- package/dist/vendors/analytics/rybbit-analytics.cjs +0 -104
- package/dist/vendors/analytics/segment.cjs +0 -97
- package/dist/vendors/analytics/umami-analytics.cjs +0 -80
- package/dist/vendors/analytics/vercel-analytics.cjs +0 -94
- package/dist/vendors/functional/crisp.cjs +0 -143
- package/dist/vendors/functional/intercom.cjs +0 -89
- package/dist/vendors/tag-managers/google-tag-manager.cjs +0 -100
- package/docs/shared/react/guides/script-loader.md +0 -311
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AllConsentNames, Script } from 'c15t';
|
|
1
|
+
import type { AllConsentNames, Script } from '@c15t/core';
|
|
2
2
|
declare global {
|
|
3
3
|
interface Window {
|
|
4
4
|
dataLayer: unknown[];
|
|
@@ -14,39 +14,39 @@ declare global {
|
|
|
14
14
|
export declare const gtagManifest: {
|
|
15
15
|
readonly kind: "c15t.vendor-manifest";
|
|
16
16
|
readonly schemaVersion: 1;
|
|
17
|
-
readonly vendor: 'gtag';
|
|
18
|
-
readonly category: '{{category}}';
|
|
19
17
|
readonly alwaysLoad: true;
|
|
20
|
-
readonly persistAfterConsentRevoked: true;
|
|
21
18
|
readonly bootstrap: [{
|
|
22
|
-
readonly
|
|
19
|
+
readonly ifUndefined: true;
|
|
23
20
|
readonly name: 'dataLayer';
|
|
21
|
+
readonly type: 'setGlobal';
|
|
24
22
|
readonly value: readonly [];
|
|
25
|
-
readonly ifUndefined: true;
|
|
26
23
|
}, {
|
|
27
|
-
readonly
|
|
24
|
+
readonly ifUndefined: true;
|
|
28
25
|
readonly name: 'gtag';
|
|
29
26
|
readonly queue: 'dataLayer';
|
|
30
|
-
readonly
|
|
27
|
+
readonly type: 'defineQueueFunction';
|
|
31
28
|
}];
|
|
29
|
+
readonly category: '{{category}}';
|
|
30
|
+
readonly consentMapping: Record<string, string[]>;
|
|
31
|
+
readonly consentSignal: 'gtag';
|
|
32
32
|
readonly install: [{
|
|
33
|
-
readonly type: 'callGlobal';
|
|
34
|
-
readonly global: 'gtag';
|
|
35
33
|
readonly args: ["js", {
|
|
36
34
|
readonly kind: "c15t.runtime-value";
|
|
37
35
|
readonly value: 'date';
|
|
38
36
|
}];
|
|
39
|
-
}, {
|
|
40
|
-
readonly type: 'callGlobal';
|
|
41
37
|
readonly global: 'gtag';
|
|
38
|
+
readonly type: 'callGlobal';
|
|
39
|
+
}, {
|
|
42
40
|
readonly args: ["config", "{{id}}"];
|
|
41
|
+
readonly global: 'gtag';
|
|
42
|
+
readonly type: 'callGlobal';
|
|
43
43
|
}, {
|
|
44
|
-
readonly type: 'loadScript';
|
|
45
|
-
readonly src: 'https://www.googletagmanager.com/gtag/js?id={{id}}';
|
|
46
44
|
readonly async: true;
|
|
45
|
+
readonly src: 'https://www.googletagmanager.com/gtag/js?id={{id}}';
|
|
46
|
+
readonly type: 'loadScript';
|
|
47
47
|
}];
|
|
48
|
-
readonly
|
|
49
|
-
readonly
|
|
48
|
+
readonly persistAfterConsentRevoked: true;
|
|
49
|
+
readonly vendor: 'gtag';
|
|
50
50
|
};
|
|
51
51
|
export interface GtagOptions {
|
|
52
52
|
/**
|
|
@@ -90,4 +90,4 @@ export interface GtagOptions {
|
|
|
90
90
|
* @param options - The options for the gtag script.
|
|
91
91
|
* @returns The Google Tag Manager script.
|
|
92
92
|
*/
|
|
93
|
-
export declare
|
|
93
|
+
export declare const gtag: ({ id, category, consentMapping, script, }: GtagOptions) => Script;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Script } from 'c15t';
|
|
1
|
+
import type { Script } from '@c15t/core';
|
|
2
2
|
/**
|
|
3
3
|
* Default Heap config-loader base URL.
|
|
4
4
|
*
|
|
@@ -19,9 +19,9 @@ type JsonPrimitive = string | number | boolean | null;
|
|
|
19
19
|
type JsonValue = JsonPrimitive | JsonValue[] | {
|
|
20
20
|
[key: string]: JsonValue;
|
|
21
21
|
};
|
|
22
|
-
|
|
22
|
+
interface JsonRecord {
|
|
23
23
|
[key: string]: JsonValue;
|
|
24
|
-
}
|
|
24
|
+
}
|
|
25
25
|
export interface HeapReadyCallback {
|
|
26
26
|
/** Heap method name captured by the pre-load snippet stub. */
|
|
27
27
|
name: (typeof HEAP_QUEUE_METHODS)[number];
|
|
@@ -223,43 +223,43 @@ declare global {
|
|
|
223
223
|
export declare const heapManifest: {
|
|
224
224
|
readonly kind: "c15t.vendor-manifest";
|
|
225
225
|
readonly schemaVersion: 1;
|
|
226
|
-
readonly vendor: 'heap';
|
|
227
226
|
readonly category: 'measurement';
|
|
228
227
|
readonly install: [{
|
|
229
|
-
readonly
|
|
228
|
+
readonly ifUndefined: true;
|
|
230
229
|
readonly name: 'heapReadyCb';
|
|
230
|
+
readonly type: 'setGlobal';
|
|
231
231
|
readonly value: readonly [];
|
|
232
|
-
readonly ifUndefined: true;
|
|
233
232
|
}, {
|
|
234
|
-
readonly
|
|
233
|
+
readonly ifUndefined: true;
|
|
235
234
|
readonly name: 'heap';
|
|
235
|
+
readonly type: 'setGlobal';
|
|
236
236
|
readonly value: readonly [];
|
|
237
|
-
readonly ifUndefined: true;
|
|
238
237
|
}, {
|
|
239
|
-
readonly type: 'setGlobalPath';
|
|
240
238
|
readonly path: ["heap", "envId"];
|
|
239
|
+
readonly type: 'setGlobalPath';
|
|
241
240
|
readonly value: '{{envId}}';
|
|
242
241
|
}, {
|
|
243
|
-
readonly type: 'setGlobalPath';
|
|
244
242
|
readonly path: ["heap", "appid"];
|
|
243
|
+
readonly type: 'setGlobalPath';
|
|
245
244
|
readonly value: '{{envId}}';
|
|
246
245
|
}, {
|
|
247
|
-
readonly type: 'setGlobalPath';
|
|
248
246
|
readonly path: ["heap", "clientConfig"];
|
|
247
|
+
readonly type: 'setGlobalPath';
|
|
249
248
|
readonly value: '{{clientConfig}}';
|
|
250
249
|
}, {
|
|
251
|
-
readonly
|
|
252
|
-
readonly target: 'heap';
|
|
250
|
+
readonly methods: ["init", "startTracking", "stopTracking", "track", "resetIdentity", "identify", "identifyHashed", "getSessionId", "getUserId", "getIdentity", "addUserProperties", "addEventProperties", "removeEventProperty", "clearEventProperties", "addAccountProperties", "addAdapter", "addTransformer", "addTransformerFn", "onReady", "addPageviewProperties", "removePageviewProperty", "clearPageviewProperties", "trackPageview"];
|
|
253
251
|
readonly queue: {
|
|
254
252
|
readonly global: 'heapReadyCb';
|
|
255
253
|
};
|
|
256
254
|
readonly queueFormat: 'callback';
|
|
257
|
-
readonly
|
|
255
|
+
readonly target: 'heap';
|
|
256
|
+
readonly type: 'defineQueueMethods';
|
|
258
257
|
}, {
|
|
259
|
-
readonly type: 'loadScript';
|
|
260
|
-
readonly src: '{{scriptUrl}}';
|
|
261
258
|
readonly async: true;
|
|
259
|
+
readonly src: '{{scriptUrl}}';
|
|
260
|
+
readonly type: 'loadScript';
|
|
262
261
|
}];
|
|
262
|
+
readonly vendor: 'heap';
|
|
263
263
|
};
|
|
264
264
|
export interface HeapOptions {
|
|
265
265
|
/**
|
|
@@ -312,5 +312,5 @@ export interface HeapOptions {
|
|
|
312
312
|
* });
|
|
313
313
|
* ```
|
|
314
314
|
*/
|
|
315
|
-
export declare
|
|
315
|
+
export declare const heap: ({ envId, clientConfig, scriptUrl, }: HeapOptions) => Script;
|
|
316
316
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Script } from 'c15t';
|
|
1
|
+
import type { Script } from '@c15t/core';
|
|
2
2
|
export declare const HIGHTOUCH_QUEUE_METHODS: readonly ['trackSubmit', 'trackClick', 'trackLink', 'trackForm', 'pageview', 'identify', 'reset', 'group', 'track', 'ready', 'alias', 'debug', 'page', 'once', 'off', 'on', 'addSourceMiddleware', 'addIntegrationMiddleware', 'setAnonymousId', 'addDestinationMiddleware', 'load'];
|
|
3
3
|
/**
|
|
4
4
|
* Public Hightouch Events browser API exposed on `window.htevents`.
|
|
@@ -197,40 +197,40 @@ declare global {
|
|
|
197
197
|
export declare const hightouchManifest: {
|
|
198
198
|
readonly kind: "c15t.vendor-manifest";
|
|
199
199
|
readonly schemaVersion: 1;
|
|
200
|
-
readonly vendor: 'hightouch';
|
|
201
|
-
readonly category: 'measurement';
|
|
202
200
|
readonly bootstrap: [{
|
|
203
|
-
readonly
|
|
201
|
+
readonly ifUndefined: true;
|
|
204
202
|
readonly name: 'htevents';
|
|
203
|
+
readonly type: 'setGlobal';
|
|
205
204
|
readonly value: readonly [];
|
|
206
|
-
readonly ifUndefined: true;
|
|
207
205
|
}, {
|
|
208
|
-
readonly type: 'defineQueueMethods';
|
|
209
|
-
readonly target: 'htevents';
|
|
210
206
|
readonly methods: ["trackSubmit", "trackClick", "trackLink", "trackForm", "pageview", "identify", "reset", "group", "track", "ready", "alias", "debug", "page", "once", "off", "on", "addSourceMiddleware", "addIntegrationMiddleware", "setAnonymousId", "addDestinationMiddleware", "load"];
|
|
207
|
+
readonly target: 'htevents';
|
|
208
|
+
readonly type: 'defineQueueMethods';
|
|
211
209
|
}, {
|
|
212
|
-
readonly type: 'setGlobalPath';
|
|
213
210
|
readonly path: ["htevents", "_writeKey"];
|
|
211
|
+
readonly type: 'setGlobalPath';
|
|
214
212
|
readonly value: '{{writeKey}}';
|
|
215
213
|
}, {
|
|
216
|
-
readonly type: 'setGlobalPath';
|
|
217
214
|
readonly path: ["htevents", "_loadOptions"];
|
|
215
|
+
readonly type: 'setGlobalPath';
|
|
218
216
|
readonly value: '{{loadOptions}}';
|
|
219
217
|
}];
|
|
218
|
+
readonly category: 'measurement';
|
|
220
219
|
readonly install: [{
|
|
221
|
-
readonly
|
|
220
|
+
readonly args: ["{{writeKey}}", "{{loadOptions}}"];
|
|
222
221
|
readonly global: 'htevents';
|
|
223
222
|
readonly method: 'load';
|
|
224
|
-
readonly args: ["{{writeKey}}", "{{loadOptions}}"];
|
|
225
|
-
}, {
|
|
226
223
|
readonly type: 'callGlobal';
|
|
224
|
+
}, {
|
|
227
225
|
readonly global: 'htevents';
|
|
228
226
|
readonly method: 'page';
|
|
227
|
+
readonly type: 'callGlobal';
|
|
229
228
|
}, {
|
|
230
|
-
readonly type: 'loadScript';
|
|
231
|
-
readonly src: '{{scriptUrl}}';
|
|
232
229
|
readonly async: true;
|
|
230
|
+
readonly src: '{{scriptUrl}}';
|
|
231
|
+
readonly type: 'loadScript';
|
|
233
232
|
}];
|
|
233
|
+
readonly vendor: 'hightouch';
|
|
234
234
|
};
|
|
235
235
|
export interface HightouchOptions {
|
|
236
236
|
/**
|
|
@@ -282,4 +282,4 @@ export interface HightouchOptions {
|
|
|
282
282
|
* });
|
|
283
283
|
* ```
|
|
284
284
|
*/
|
|
285
|
-
export declare
|
|
285
|
+
export declare const hightouch: ({ writeKey, apiHost, trackPageView, scriptUrl, }: HightouchOptions) => Script;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Script } from 'c15t';
|
|
1
|
+
import type { Script } from '@c15t/core';
|
|
2
2
|
declare global {
|
|
3
3
|
interface Window {
|
|
4
4
|
hj?: ((...args: unknown[]) => void) & {
|
|
@@ -19,29 +19,29 @@ declare global {
|
|
|
19
19
|
export declare const hotjarManifest: {
|
|
20
20
|
readonly kind: "c15t.vendor-manifest";
|
|
21
21
|
readonly schemaVersion: 1;
|
|
22
|
-
readonly vendor: 'hotjar';
|
|
23
22
|
readonly category: 'measurement';
|
|
24
23
|
readonly install: [{
|
|
25
|
-
readonly
|
|
24
|
+
readonly ifUndefined: true;
|
|
26
25
|
readonly name: '_hjSettings';
|
|
26
|
+
readonly type: 'setGlobal';
|
|
27
27
|
readonly value: {
|
|
28
28
|
readonly hjid: '{{siteId}}';
|
|
29
29
|
readonly hjsv: '{{version}}';
|
|
30
30
|
};
|
|
31
|
-
readonly ifUndefined: true;
|
|
32
31
|
}, {
|
|
33
|
-
readonly
|
|
32
|
+
readonly ifUndefined: true;
|
|
34
33
|
readonly name: 'hj';
|
|
35
34
|
readonly queue: {
|
|
36
35
|
readonly property: 'q';
|
|
37
36
|
};
|
|
38
37
|
readonly queueFormat: 'array';
|
|
39
|
-
readonly
|
|
38
|
+
readonly type: 'defineStubFunction';
|
|
40
39
|
}, {
|
|
41
|
-
readonly type: 'loadScript';
|
|
42
|
-
readonly src: '{{scriptUrl}}';
|
|
43
40
|
readonly async: true;
|
|
41
|
+
readonly src: '{{scriptUrl}}';
|
|
42
|
+
readonly type: 'loadScript';
|
|
44
43
|
}];
|
|
44
|
+
readonly vendor: 'hotjar';
|
|
45
45
|
};
|
|
46
46
|
export interface HotjarOptions {
|
|
47
47
|
/**
|
|
@@ -70,4 +70,4 @@ export interface HotjarOptions {
|
|
|
70
70
|
* hotjar({ siteId: 1234567 });
|
|
71
71
|
* ```
|
|
72
72
|
*/
|
|
73
|
-
export declare
|
|
73
|
+
export declare const hotjar: ({ siteId, version, scriptUrl, }: HotjarOptions) => Script;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Script } from 'c15t';
|
|
1
|
+
import type { Script } from '@c15t/core';
|
|
2
2
|
declare global {
|
|
3
3
|
interface Window {
|
|
4
4
|
LogRocket?: {
|
|
@@ -23,21 +23,21 @@ declare global {
|
|
|
23
23
|
export declare const logRocketManifest: {
|
|
24
24
|
readonly kind: "c15t.vendor-manifest";
|
|
25
25
|
readonly schemaVersion: 1;
|
|
26
|
-
readonly
|
|
26
|
+
readonly afterLoad: [{
|
|
27
|
+
readonly args: ["{{appId}}", "{{initOptions}}"];
|
|
28
|
+
readonly global: 'LogRocket';
|
|
29
|
+
readonly method: 'init';
|
|
30
|
+
readonly type: 'callGlobal';
|
|
31
|
+
}];
|
|
27
32
|
readonly category: 'measurement';
|
|
28
33
|
readonly install: [{
|
|
29
|
-
readonly type: 'loadScript';
|
|
30
|
-
readonly src: '{{scriptUrl}}';
|
|
31
34
|
readonly attributes: {
|
|
32
35
|
readonly crossorigin: 'anonymous';
|
|
33
36
|
};
|
|
37
|
+
readonly src: '{{scriptUrl}}';
|
|
38
|
+
readonly type: 'loadScript';
|
|
34
39
|
}];
|
|
35
|
-
readonly
|
|
36
|
-
readonly type: 'callGlobal';
|
|
37
|
-
readonly global: 'LogRocket';
|
|
38
|
-
readonly method: 'init';
|
|
39
|
-
readonly args: ["{{appId}}", "{{initOptions}}"];
|
|
40
|
-
}];
|
|
40
|
+
readonly vendor: 'logrocket';
|
|
41
41
|
};
|
|
42
42
|
export interface LogRocketOptions {
|
|
43
43
|
/**
|
|
@@ -98,4 +98,4 @@ export interface LogRocketOptions {
|
|
|
98
98
|
* });
|
|
99
99
|
* ```
|
|
100
100
|
*/
|
|
101
|
-
export declare
|
|
101
|
+
export declare const logRocket: (options: LogRocketOptions) => Script;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Script } from 'c15t';
|
|
2
|
-
import {
|
|
1
|
+
import type { Script } from '@c15t/core';
|
|
2
|
+
import type { VendorManifest } from '../../types';
|
|
3
3
|
declare global {
|
|
4
4
|
interface Window {
|
|
5
5
|
_paq?: unknown[];
|
|
@@ -38,4 +38,4 @@ export interface MatomoAnalyticsOptions {
|
|
|
38
38
|
* `trackerUrl`/`scriptUrl` values are not supplied). Provide `matomoUrl`, or
|
|
39
39
|
* provide both explicit `trackerUrl` and `scriptUrl`.
|
|
40
40
|
*/
|
|
41
|
-
export declare
|
|
41
|
+
export declare const matomoAnalytics: (options?: MatomoAnalyticsOptions) => Script;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Script } from 'c15t';
|
|
1
|
+
import type { Script } from '@c15t/core';
|
|
2
2
|
/**
|
|
3
3
|
* Microsoft Clarity Consent V2 storage state.
|
|
4
4
|
*
|
|
@@ -24,16 +24,15 @@ export interface ClarityConsentV2Payload {
|
|
|
24
24
|
* current c15t consent state.
|
|
25
25
|
*/
|
|
26
26
|
export type ClarityConsentValue = boolean | Partial<Record<keyof ClarityConsentV2Payload | 'ad_storage' | 'analytics_storage' | 'marketing' | 'measurement' | 'analytics', ClarityConsentState | boolean>>;
|
|
27
|
-
|
|
27
|
+
interface ClarityFunction {
|
|
28
28
|
(command: 'consent', value?: boolean): void;
|
|
29
29
|
(command: 'consentv2', value: ClarityConsentV2Payload): void;
|
|
30
|
-
(command: 'event', value: string): void;
|
|
30
|
+
(command: 'event' | 'upgrade', value: string): void;
|
|
31
31
|
(command: 'identify', id: string, session?: string, page?: string): unknown;
|
|
32
32
|
(command: 'set', key: string, value: string | string[]): void;
|
|
33
33
|
(command: 'start', options?: Record<string, unknown>): void;
|
|
34
|
-
(command: 'upgrade', reason: string): void;
|
|
35
34
|
(command: string, ...args: unknown[]): unknown;
|
|
36
|
-
}
|
|
35
|
+
}
|
|
37
36
|
declare global {
|
|
38
37
|
interface Window {
|
|
39
38
|
clarity?: ClarityFunction & {
|
|
@@ -50,23 +49,23 @@ declare global {
|
|
|
50
49
|
export declare const clarityManifest: {
|
|
51
50
|
readonly kind: "c15t.vendor-manifest";
|
|
52
51
|
readonly schemaVersion: 1;
|
|
53
|
-
readonly vendor: 'microsoft-clarity';
|
|
54
|
-
readonly category: 'measurement';
|
|
55
|
-
readonly persistAfterConsentRevoked: true;
|
|
56
52
|
readonly bootstrap: [{
|
|
57
|
-
readonly
|
|
53
|
+
readonly ifUndefined: true;
|
|
58
54
|
readonly name: 'clarity';
|
|
59
55
|
readonly queue: {
|
|
60
56
|
readonly property: 'q';
|
|
61
57
|
};
|
|
62
58
|
readonly queueFormat: 'array';
|
|
63
|
-
readonly
|
|
59
|
+
readonly type: 'defineStubFunction';
|
|
64
60
|
}];
|
|
61
|
+
readonly category: 'measurement';
|
|
65
62
|
readonly install: [{
|
|
66
|
-
readonly type: 'loadScript';
|
|
67
|
-
readonly src: '{{scriptUrl}}';
|
|
68
63
|
readonly async: true;
|
|
64
|
+
readonly src: '{{scriptUrl}}';
|
|
65
|
+
readonly type: 'loadScript';
|
|
69
66
|
}];
|
|
67
|
+
readonly persistAfterConsentRevoked: true;
|
|
68
|
+
readonly vendor: 'microsoft-clarity';
|
|
70
69
|
};
|
|
71
70
|
export interface ClarityOptions {
|
|
72
71
|
/**
|
|
@@ -94,5 +93,5 @@ export interface ClarityOptions {
|
|
|
94
93
|
* override is provided. Provide a valid Clarity project id string to prevent
|
|
95
94
|
* this error.
|
|
96
95
|
*/
|
|
97
|
-
export declare
|
|
96
|
+
export declare const clarity: ({ id, defaultConsent, scriptUrl, }: ClarityOptions) => Script;
|
|
98
97
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Script } from 'c15t';
|
|
1
|
+
import type { Script } from '@c15t/core';
|
|
2
2
|
declare global {
|
|
3
3
|
interface Window {
|
|
4
4
|
mixpanel?: {
|
|
@@ -31,51 +31,51 @@ declare global {
|
|
|
31
31
|
export declare const mixpanelAnalyticsManifest: {
|
|
32
32
|
readonly kind: "c15t.vendor-manifest";
|
|
33
33
|
readonly schemaVersion: 1;
|
|
34
|
-
readonly vendor: 'mixpanel-analytics';
|
|
35
|
-
readonly category: 'measurement';
|
|
36
34
|
readonly alwaysLoad: true;
|
|
35
|
+
readonly category: 'measurement';
|
|
37
36
|
readonly install: [{
|
|
38
|
-
readonly
|
|
37
|
+
readonly ifUndefined: true;
|
|
39
38
|
readonly name: 'mixpanel';
|
|
39
|
+
readonly type: 'setGlobal';
|
|
40
40
|
readonly value: readonly [];
|
|
41
|
-
readonly ifUndefined: true;
|
|
42
41
|
}, {
|
|
43
|
-
readonly type: 'setGlobalPath';
|
|
44
42
|
readonly path: ["mixpanel", "__SV"];
|
|
43
|
+
readonly type: 'setGlobalPath';
|
|
45
44
|
readonly value: 1.2;
|
|
46
45
|
}, {
|
|
47
|
-
readonly type: 'setGlobalPath';
|
|
48
46
|
readonly path: ["mixpanel", "_i"];
|
|
47
|
+
readonly type: 'setGlobalPath';
|
|
49
48
|
readonly value: readonly [readonly ["{{token}}", "{{initOptions}}", "mixpanel"]];
|
|
50
49
|
}, {
|
|
51
|
-
readonly type: 'defineQueueMethods';
|
|
52
|
-
readonly target: 'mixpanel';
|
|
53
50
|
readonly methods: ["track", "identify", "reset", "register", "opt_in_tracking", "opt_out_tracking"];
|
|
51
|
+
readonly target: 'mixpanel';
|
|
52
|
+
readonly type: 'defineQueueMethods';
|
|
54
53
|
}, {
|
|
55
|
-
readonly type: 'loadScript';
|
|
56
|
-
readonly src: '{{scriptUrl}}';
|
|
57
54
|
readonly async: true;
|
|
55
|
+
readonly src: '{{scriptUrl}}';
|
|
56
|
+
readonly type: 'loadScript';
|
|
58
57
|
}];
|
|
59
|
-
readonly
|
|
58
|
+
readonly onConsentDenied: [{
|
|
59
|
+
readonly global: 'mixpanel';
|
|
60
|
+
readonly method: 'opt_out_tracking';
|
|
60
61
|
readonly type: 'callGlobal';
|
|
62
|
+
}];
|
|
63
|
+
readonly onConsentGranted: [{
|
|
61
64
|
readonly global: 'mixpanel';
|
|
62
65
|
readonly method: 'opt_in_tracking';
|
|
66
|
+
readonly type: 'callGlobal';
|
|
63
67
|
}];
|
|
64
68
|
readonly onLoadDenied: [{
|
|
65
|
-
readonly type: 'callGlobal';
|
|
66
69
|
readonly global: 'mixpanel';
|
|
67
70
|
readonly method: 'opt_out_tracking';
|
|
68
|
-
}];
|
|
69
|
-
readonly onConsentGranted: [{
|
|
70
71
|
readonly type: 'callGlobal';
|
|
72
|
+
}];
|
|
73
|
+
readonly onLoadGranted: [{
|
|
71
74
|
readonly global: 'mixpanel';
|
|
72
75
|
readonly method: 'opt_in_tracking';
|
|
73
|
-
}];
|
|
74
|
-
readonly onConsentDenied: [{
|
|
75
76
|
readonly type: 'callGlobal';
|
|
76
|
-
readonly global: 'mixpanel';
|
|
77
|
-
readonly method: 'opt_out_tracking';
|
|
78
77
|
}];
|
|
78
|
+
readonly vendor: 'mixpanel-analytics';
|
|
79
79
|
};
|
|
80
80
|
export interface MixpanelAnalyticsOptions {
|
|
81
81
|
/** Your Mixpanel project token. */
|
|
@@ -110,4 +110,4 @@ export interface MixpanelAnalyticsOptions {
|
|
|
110
110
|
* });
|
|
111
111
|
* ```
|
|
112
112
|
*/
|
|
113
|
-
export declare
|
|
113
|
+
export declare const mixpanelAnalytics: ({ token, initOptions, scriptUrl, }: MixpanelAnalyticsOptions) => Script;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Script } from 'c15t';
|
|
1
|
+
import type { Script } from '@c15t/core';
|
|
2
2
|
declare global {
|
|
3
3
|
interface Window {
|
|
4
4
|
pirsch?: (eventName: string, options?: {
|
|
@@ -20,22 +20,22 @@ declare global {
|
|
|
20
20
|
export declare const pirschManifest: {
|
|
21
21
|
readonly kind: "c15t.vendor-manifest";
|
|
22
22
|
readonly schemaVersion: 1;
|
|
23
|
-
readonly vendor: 'pirsch';
|
|
24
23
|
readonly category: 'measurement';
|
|
25
24
|
readonly install: [{
|
|
26
|
-
readonly type: 'loadScript';
|
|
27
|
-
readonly src: '{{scriptUrl}}';
|
|
28
|
-
readonly defer: true;
|
|
29
25
|
readonly attributes: {
|
|
30
|
-
readonly id: '{{scriptElementId}}';
|
|
31
26
|
readonly 'data-code': '{{identificationCode}}';
|
|
32
|
-
readonly 'data-domain': '{{domain}}';
|
|
33
27
|
readonly 'data-dev': '{{dev}}';
|
|
34
|
-
readonly 'data-hit-endpoint': '{{hitEndpoint}}';
|
|
35
|
-
readonly 'data-event-endpoint': '{{eventEndpoint}}';
|
|
36
28
|
readonly 'data-disable-page-views': '{{disablePageViews}}';
|
|
29
|
+
readonly 'data-domain': '{{domain}}';
|
|
30
|
+
readonly 'data-event-endpoint': '{{eventEndpoint}}';
|
|
31
|
+
readonly 'data-hit-endpoint': '{{hitEndpoint}}';
|
|
32
|
+
readonly id: '{{scriptElementId}}';
|
|
37
33
|
};
|
|
34
|
+
readonly defer: true;
|
|
35
|
+
readonly src: '{{scriptUrl}}';
|
|
36
|
+
readonly type: 'loadScript';
|
|
38
37
|
}];
|
|
38
|
+
readonly vendor: 'pirsch';
|
|
39
39
|
};
|
|
40
40
|
export interface PirschOptions {
|
|
41
41
|
/**
|
|
@@ -93,4 +93,4 @@ export interface PirschOptions {
|
|
|
93
93
|
* });
|
|
94
94
|
* ```
|
|
95
95
|
*/
|
|
96
|
-
export declare
|
|
96
|
+
export declare const pirsch: (options: PirschOptions) => Script;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Script } from 'c15t';
|
|
1
|
+
import type { Script } from '@c15t/core';
|
|
2
2
|
export type PlausibleExtension = 'hash' | 'outbound-links' | 'file-downloads' | 'tagged-events' | 'revenue' | 'pageview-props' | 'compat' | 'local' | 'manual';
|
|
3
3
|
export interface PlausibleInitOptions {
|
|
4
4
|
customProperties?: Record<string, unknown>;
|
|
@@ -29,29 +29,29 @@ declare global {
|
|
|
29
29
|
export declare const plausibleAnalyticsManifest: {
|
|
30
30
|
readonly kind: "c15t.vendor-manifest";
|
|
31
31
|
readonly schemaVersion: 1;
|
|
32
|
-
readonly vendor: 'plausible-analytics';
|
|
33
|
-
readonly category: 'measurement';
|
|
34
32
|
readonly bootstrap: [{
|
|
35
|
-
readonly
|
|
33
|
+
readonly ifUndefined: true;
|
|
36
34
|
readonly name: 'plausible';
|
|
35
|
+
readonly properties: {
|
|
36
|
+
readonly o: '{{initOptions}}';
|
|
37
|
+
};
|
|
37
38
|
readonly queue: {
|
|
38
39
|
readonly property: 'q';
|
|
39
40
|
};
|
|
40
41
|
readonly queueFormat: 'array';
|
|
41
|
-
readonly
|
|
42
|
-
readonly o: '{{initOptions}}';
|
|
43
|
-
};
|
|
44
|
-
readonly ifUndefined: true;
|
|
42
|
+
readonly type: 'defineStubFunction';
|
|
45
43
|
}];
|
|
44
|
+
readonly category: 'measurement';
|
|
46
45
|
readonly install: [{
|
|
47
|
-
readonly type: 'loadScript';
|
|
48
|
-
readonly src: '{{scriptUrl}}';
|
|
49
|
-
readonly defer: true;
|
|
50
46
|
readonly attributes: {
|
|
51
|
-
readonly 'data-domain': '{{domain}}';
|
|
52
47
|
readonly 'data-api': '{{apiAttribute}}';
|
|
48
|
+
readonly 'data-domain': '{{domain}}';
|
|
53
49
|
};
|
|
50
|
+
readonly defer: true;
|
|
51
|
+
readonly src: '{{scriptUrl}}';
|
|
52
|
+
readonly type: 'loadScript';
|
|
54
53
|
}];
|
|
54
|
+
readonly vendor: 'plausible-analytics';
|
|
55
55
|
};
|
|
56
56
|
export interface PlausibleAnalyticsOptions {
|
|
57
57
|
/**
|
|
@@ -119,4 +119,4 @@ export interface PlausibleAnalyticsOptions {
|
|
|
119
119
|
* });
|
|
120
120
|
* ```
|
|
121
121
|
*/
|
|
122
|
-
export declare
|
|
122
|
+
export declare const plausibleAnalytics: (options: PlausibleAnalyticsOptions) => Script;
|