@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 { Script } from 'c15t';
|
|
1
|
+
import type { Script } from '@c15t/core';
|
|
2
2
|
export type SnapchatPixelEventName = 'PAGE_VIEW' | 'VIEW_CONTENT' | 'ADD_CART' | 'PURCHASE' | 'SIGN_UP' | 'SAVE' | 'START_CHECKOUT' | 'APP_OPEN' | 'ADD_BILLING' | 'SEARCH' | 'SUBSCRIBE' | 'AD_CLICK' | 'AD_VIEW' | 'COMPLETE_TUTORIAL' | 'LEVEL_COMPLETE' | 'INVITE' | 'LOGIN' | 'SHARE' | 'RESERVE' | 'ACHIEVEMENT_UNLOCKED' | 'ADD_TO_WISHLIST' | 'SPENT_CREDITS' | 'RATE' | 'START_TRIAL' | 'LIST_VIEW';
|
|
3
3
|
export interface SnapchatPixelEventProperties {
|
|
4
4
|
/** Total monetary value for commerce events such as `PURCHASE`. */
|
|
@@ -38,11 +38,11 @@ export interface SnapchatPixelEventProperties {
|
|
|
38
38
|
event_tag?: string;
|
|
39
39
|
[key: string]: unknown;
|
|
40
40
|
}
|
|
41
|
-
|
|
42
|
-
(command: 'track', eventName: SnapchatPixelEventName | (string &
|
|
41
|
+
interface SnapchatPixelFunction {
|
|
42
|
+
(command: 'track', eventName: SnapchatPixelEventName | (string & Record<never, never>), properties?: SnapchatPixelEventProperties): void;
|
|
43
43
|
(command: 'init', pixelId: string, config?: Record<string, unknown>): void;
|
|
44
44
|
(command: string, ...args: unknown[]): void;
|
|
45
|
-
}
|
|
45
|
+
}
|
|
46
46
|
declare global {
|
|
47
47
|
interface Window {
|
|
48
48
|
snaptr?: SnapchatPixelFunction & {
|
|
@@ -64,37 +64,37 @@ declare global {
|
|
|
64
64
|
export declare const snapchatPixelManifest: {
|
|
65
65
|
readonly kind: "c15t.vendor-manifest";
|
|
66
66
|
readonly schemaVersion: 1;
|
|
67
|
-
readonly vendor: 'snapchat-pixel';
|
|
68
|
-
readonly category: 'marketing';
|
|
69
67
|
readonly bootstrap: [{
|
|
70
|
-
readonly
|
|
68
|
+
readonly aliases: ["_snaptr"];
|
|
69
|
+
readonly dispatchProperty: 'handleRequest';
|
|
70
|
+
readonly ifUndefined: true;
|
|
71
71
|
readonly name: 'snaptr';
|
|
72
|
+
readonly properties: {
|
|
73
|
+
readonly loaded: true;
|
|
74
|
+
readonly version: '1.0';
|
|
75
|
+
};
|
|
72
76
|
readonly queue: {
|
|
73
77
|
readonly property: 'queue';
|
|
74
78
|
};
|
|
75
|
-
readonly dispatchProperty: 'handleRequest';
|
|
76
79
|
readonly queueFormat: 'array';
|
|
77
|
-
readonly aliases: ["_snaptr"];
|
|
78
80
|
readonly selfReferences: ["push"];
|
|
79
|
-
readonly
|
|
80
|
-
readonly loaded: true;
|
|
81
|
-
readonly version: '1.0';
|
|
82
|
-
};
|
|
83
|
-
readonly ifUndefined: true;
|
|
81
|
+
readonly type: 'defineStubFunction';
|
|
84
82
|
}];
|
|
83
|
+
readonly category: 'marketing';
|
|
85
84
|
readonly install: [{
|
|
86
|
-
readonly type: 'callGlobal';
|
|
87
|
-
readonly global: 'snaptr';
|
|
88
85
|
readonly args: ["init", "{{pixelId}}"];
|
|
89
|
-
}, {
|
|
90
|
-
readonly type: 'callGlobal';
|
|
91
86
|
readonly global: 'snaptr';
|
|
87
|
+
readonly type: 'callGlobal';
|
|
88
|
+
}, {
|
|
92
89
|
readonly args: ["track", "PAGE_VIEW"];
|
|
90
|
+
readonly global: 'snaptr';
|
|
91
|
+
readonly type: 'callGlobal';
|
|
93
92
|
}, {
|
|
94
|
-
readonly type: 'loadScript';
|
|
95
|
-
readonly src: '{{scriptUrl}}';
|
|
96
93
|
readonly async: true;
|
|
94
|
+
readonly src: '{{scriptUrl}}';
|
|
95
|
+
readonly type: 'loadScript';
|
|
97
96
|
}];
|
|
97
|
+
readonly vendor: 'snapchat-pixel';
|
|
98
98
|
};
|
|
99
99
|
export interface SnapchatPixelOptions {
|
|
100
100
|
/**
|
|
@@ -128,7 +128,7 @@ export interface SnapchatPixelOptions {
|
|
|
128
128
|
* @returns A resolved c15t `Script` configuration that defines the Snapchat
|
|
129
129
|
* queue stub, runs `init` (and optionally `PAGE_VIEW`), and then loads the
|
|
130
130
|
* Snapchat SDK script URL.
|
|
131
|
-
* @throws `resolveManifest` may throw when required placeholders cannot be
|
|
131
|
+
* @throws {Error} `resolveManifest` may throw when required placeholders cannot be
|
|
132
132
|
* resolved (for example, when `pixelId` is missing/empty) or when provided
|
|
133
133
|
* manifest values are invalid for interpolation.
|
|
134
134
|
*
|
|
@@ -149,7 +149,7 @@ export interface SnapchatPixelOptions {
|
|
|
149
149
|
* });
|
|
150
150
|
* ```
|
|
151
151
|
*/
|
|
152
|
-
export declare
|
|
152
|
+
export declare const snapchatPixel: ({ pixelId, initOptions, trackPageView, scriptUrl, }: SnapchatPixelOptions) => Script;
|
|
153
153
|
/**
|
|
154
154
|
* Tracks a Snapchat Pixel event.
|
|
155
155
|
*
|
|
@@ -167,5 +167,5 @@ export declare function snapchatPixel({ pixelId, initOptions, trackPageView, scr
|
|
|
167
167
|
* });
|
|
168
168
|
* ```
|
|
169
169
|
*/
|
|
170
|
-
export declare const snapchatPixelEvent: (eventName: SnapchatPixelEventName | (string &
|
|
170
|
+
export declare const snapchatPixelEvent: (eventName: SnapchatPixelEventName | (string & Record<never, never>), properties?: SnapchatPixelEventProperties) => void;
|
|
171
171
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Script } from 'c15t';
|
|
1
|
+
import type { Script } from '@c15t/core';
|
|
2
2
|
interface TikTokPixelFunction {
|
|
3
3
|
grantConsent: () => void;
|
|
4
4
|
revokeConsent: () => void;
|
|
@@ -31,51 +31,51 @@ declare global {
|
|
|
31
31
|
export declare const tiktokPixelManifest: {
|
|
32
32
|
readonly kind: "c15t.vendor-manifest";
|
|
33
33
|
readonly schemaVersion: 1;
|
|
34
|
-
readonly
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
readonly afterLoad: [{
|
|
35
|
+
readonly global: 'ttq';
|
|
36
|
+
readonly method: 'grantConsent';
|
|
37
|
+
readonly type: 'callGlobal';
|
|
38
|
+
}];
|
|
37
39
|
readonly bootstrap: [{
|
|
38
|
-
readonly type: 'setGlobal';
|
|
39
40
|
readonly name: 'TiktokAnalyticsObject';
|
|
41
|
+
readonly type: 'setGlobal';
|
|
40
42
|
readonly value: 'ttq';
|
|
41
43
|
}, {
|
|
42
|
-
readonly
|
|
44
|
+
readonly ifUndefined: true;
|
|
43
45
|
readonly name: 'ttq';
|
|
46
|
+
readonly type: 'setGlobal';
|
|
44
47
|
readonly value: readonly [];
|
|
45
|
-
readonly ifUndefined: true;
|
|
46
48
|
}, {
|
|
47
|
-
readonly type: 'defineQueueMethods';
|
|
48
|
-
readonly target: 'ttq';
|
|
49
49
|
readonly methods: ["page", "track", "identify", "instances", "debug", "on", "off", "once", "ready", "alias", "group", "enableCookie", "disableCookie", "holdConsent", "revokeConsent", "grantConsent"];
|
|
50
|
+
readonly target: 'ttq';
|
|
51
|
+
readonly type: 'defineQueueMethods';
|
|
50
52
|
}];
|
|
53
|
+
readonly category: 'marketing';
|
|
51
54
|
readonly install: [{
|
|
52
|
-
readonly type: 'callGlobal';
|
|
53
55
|
readonly global: 'ttq';
|
|
54
56
|
readonly method: 'grantConsent';
|
|
55
|
-
}, {
|
|
56
57
|
readonly type: 'callGlobal';
|
|
58
|
+
}, {
|
|
57
59
|
readonly global: 'ttq';
|
|
58
60
|
readonly method: 'page';
|
|
61
|
+
readonly type: 'callGlobal';
|
|
59
62
|
}, {
|
|
60
|
-
readonly type: 'loadScript';
|
|
61
|
-
readonly src: '{{scriptSrc}}?sdkid={{pixelId}}&lib=ttq';
|
|
62
63
|
readonly async: true;
|
|
64
|
+
readonly src: '{{scriptSrc}}?sdkid={{pixelId}}&lib=ttq';
|
|
65
|
+
readonly type: 'loadScript';
|
|
63
66
|
}];
|
|
64
|
-
readonly
|
|
65
|
-
readonly type: 'callGlobal';
|
|
67
|
+
readonly onConsentDenied: [{
|
|
66
68
|
readonly global: 'ttq';
|
|
67
|
-
readonly method: '
|
|
69
|
+
readonly method: 'revokeConsent';
|
|
70
|
+
readonly type: 'callGlobal';
|
|
68
71
|
}];
|
|
69
72
|
readonly onConsentGranted: [{
|
|
70
|
-
readonly type: 'callGlobal';
|
|
71
73
|
readonly global: 'ttq';
|
|
72
74
|
readonly method: 'grantConsent';
|
|
73
|
-
}];
|
|
74
|
-
readonly onConsentDenied: [{
|
|
75
75
|
readonly type: 'callGlobal';
|
|
76
|
-
readonly global: 'ttq';
|
|
77
|
-
readonly method: 'revokeConsent';
|
|
78
76
|
}];
|
|
77
|
+
readonly persistAfterConsentRevoked: true;
|
|
78
|
+
readonly vendor: 'tiktok-pixel';
|
|
79
79
|
};
|
|
80
80
|
export interface TikTokPixelOptions {
|
|
81
81
|
/**
|
|
@@ -102,5 +102,5 @@ export interface TikTokPixelOptions {
|
|
|
102
102
|
*
|
|
103
103
|
* @see {@link https://ads.tiktok.com/help/article/tiktok-pixel} TikTok Pixel documentation
|
|
104
104
|
*/
|
|
105
|
-
export declare
|
|
105
|
+
export declare const tiktokPixel: ({ pixelId, scriptSrc, }: TikTokPixelOptions) => Script;
|
|
106
106
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Script } from 'c15t';
|
|
1
|
+
import type { Script } from '@c15t/core';
|
|
2
2
|
export interface XPixelContent {
|
|
3
3
|
/**
|
|
4
4
|
* Type of the content
|
|
@@ -107,29 +107,29 @@ declare global {
|
|
|
107
107
|
export declare const xPixelManifest: {
|
|
108
108
|
readonly kind: "c15t.vendor-manifest";
|
|
109
109
|
readonly schemaVersion: 1;
|
|
110
|
-
readonly vendor: 'x-pixel';
|
|
111
|
-
readonly category: 'marketing';
|
|
112
110
|
readonly bootstrap: [{
|
|
113
|
-
readonly type: 'defineStubFunction';
|
|
114
|
-
readonly name: 'twq';
|
|
115
|
-
readonly queue: {
|
|
116
|
-
readonly property: 'queue';
|
|
117
|
-
};
|
|
118
111
|
readonly dispatchProperty: 'exe';
|
|
112
|
+
readonly ifUndefined: true;
|
|
113
|
+
readonly name: 'twq';
|
|
119
114
|
readonly properties: {
|
|
120
115
|
readonly version: '1.1';
|
|
121
116
|
};
|
|
122
|
-
readonly
|
|
117
|
+
readonly queue: {
|
|
118
|
+
readonly property: 'queue';
|
|
119
|
+
};
|
|
120
|
+
readonly type: 'defineStubFunction';
|
|
123
121
|
}];
|
|
122
|
+
readonly category: 'marketing';
|
|
124
123
|
readonly install: [{
|
|
125
|
-
readonly type: 'callGlobal';
|
|
126
|
-
readonly global: 'twq';
|
|
127
124
|
readonly args: ["config", "{{pixelId}}"];
|
|
125
|
+
readonly global: 'twq';
|
|
126
|
+
readonly type: 'callGlobal';
|
|
128
127
|
}, {
|
|
129
|
-
readonly type: 'loadScript';
|
|
130
|
-
readonly src: '{{scriptSrc}}';
|
|
131
128
|
readonly async: true;
|
|
129
|
+
readonly src: '{{scriptSrc}}';
|
|
130
|
+
readonly type: 'loadScript';
|
|
132
131
|
}];
|
|
132
|
+
readonly vendor: 'x-pixel';
|
|
133
133
|
};
|
|
134
134
|
export interface XPixelOptions {
|
|
135
135
|
/**
|
|
@@ -157,13 +157,13 @@ export interface XPixelOptions {
|
|
|
157
157
|
*
|
|
158
158
|
* @see {@link https://business.x.com/en/help/campaign-measurement-and-analytics/conversion-tracking-for-websites} X conversion tracking documentation
|
|
159
159
|
*/
|
|
160
|
-
export declare
|
|
160
|
+
export declare const xPixel: ({ pixelId, scriptSrc, }: XPixelOptions) => Script;
|
|
161
161
|
/**
|
|
162
162
|
* @param eventId - The event ID to track
|
|
163
163
|
* @example 'tw-xxxx-xxxx'
|
|
164
164
|
* @param metadata - Optional metadata to track
|
|
165
165
|
*
|
|
166
|
-
* @
|
|
166
|
+
* @example
|
|
167
167
|
* ```ts
|
|
168
168
|
* xPixelEvent('tw-xxxx-xxxx', {
|
|
169
169
|
* value: 200.00,
|
|
@@ -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
|
adobeDataLayer?: unknown[];
|
|
@@ -72,4 +72,4 @@ export interface AdobeAnalyticsOptions {
|
|
|
72
72
|
* });
|
|
73
73
|
* ```
|
|
74
74
|
*/
|
|
75
|
-
export declare
|
|
75
|
+
export declare const adobeAnalytics: (options: AdobeAnalyticsOptions) => 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
|
AhrefsAnalytics?: {
|
|
@@ -19,16 +19,16 @@ declare global {
|
|
|
19
19
|
export declare const ahrefsAnalyticsManifest: {
|
|
20
20
|
readonly kind: "c15t.vendor-manifest";
|
|
21
21
|
readonly schemaVersion: 1;
|
|
22
|
-
readonly vendor: 'ahrefs-analytics';
|
|
23
22
|
readonly category: 'measurement';
|
|
24
23
|
readonly install: [{
|
|
25
|
-
readonly type: 'loadScript';
|
|
26
|
-
readonly src: '{{scriptUrl}}';
|
|
27
24
|
readonly async: true;
|
|
28
25
|
readonly attributes: {
|
|
29
26
|
readonly 'data-key': '{{key}}';
|
|
30
27
|
};
|
|
28
|
+
readonly src: '{{scriptUrl}}';
|
|
29
|
+
readonly type: 'loadScript';
|
|
31
30
|
}];
|
|
31
|
+
readonly vendor: 'ahrefs-analytics';
|
|
32
32
|
};
|
|
33
33
|
export interface AhrefsAnalyticsOptions {
|
|
34
34
|
/**
|
|
@@ -59,4 +59,4 @@ export interface AhrefsAnalyticsOptions {
|
|
|
59
59
|
* ahrefsAnalytics({ key: 'YOUR_PROJECT_KEY' });
|
|
60
60
|
* ```
|
|
61
61
|
*/
|
|
62
|
-
export declare
|
|
62
|
+
export declare const ahrefsAnalytics: (options: AhrefsAnalyticsOptions) => Script;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Script } from 'c15t';
|
|
1
|
+
import type { Script } from '@c15t/core';
|
|
2
2
|
/**
|
|
3
3
|
* Browser SDK 2 version used by the default Amplitude CDN loader URL.
|
|
4
4
|
*
|
|
@@ -127,31 +127,30 @@ declare global {
|
|
|
127
127
|
export declare const amplitudeManifest: {
|
|
128
128
|
readonly kind: "c15t.vendor-manifest";
|
|
129
129
|
readonly schemaVersion: 1;
|
|
130
|
-
readonly vendor: 'amplitude';
|
|
131
130
|
readonly category: 'measurement';
|
|
132
131
|
readonly install: [{
|
|
133
|
-
readonly
|
|
132
|
+
readonly ifUndefined: true;
|
|
134
133
|
readonly name: 'amplitude';
|
|
134
|
+
readonly type: 'setGlobal';
|
|
135
135
|
readonly value: {
|
|
136
|
-
readonly _q: readonly [];
|
|
137
136
|
readonly _iq: {};
|
|
137
|
+
readonly _q: readonly [];
|
|
138
138
|
readonly invoked: true;
|
|
139
139
|
};
|
|
140
|
-
readonly ifUndefined: true;
|
|
141
140
|
}, {
|
|
142
|
-
readonly
|
|
143
|
-
readonly target: 'amplitude';
|
|
141
|
+
readonly methods: ["set", "setOnce", "add", "append", "prepend", "preInsert", "postInsert", "remove", "unset", "clearAll", "getUserProperties"];
|
|
144
142
|
readonly name: 'Identify';
|
|
145
143
|
readonly queueProperty: '_q';
|
|
146
|
-
readonly methods: ["set", "setOnce", "add", "append", "prepend", "preInsert", "postInsert", "remove", "unset", "clearAll", "getUserProperties"];
|
|
147
|
-
}, {
|
|
148
|
-
readonly type: 'defineQueueMethods';
|
|
149
144
|
readonly target: 'amplitude';
|
|
145
|
+
readonly type: 'defineQueueClass';
|
|
146
|
+
}, {
|
|
147
|
+
readonly methods: ["init", "track", "identify", "flush"];
|
|
150
148
|
readonly queue: {
|
|
151
149
|
readonly property: '_q';
|
|
152
150
|
};
|
|
153
151
|
readonly queueFormat: 'wrappedMethodCall';
|
|
154
|
-
readonly
|
|
152
|
+
readonly target: 'amplitude';
|
|
153
|
+
readonly type: 'defineQueueMethods';
|
|
155
154
|
}, {
|
|
156
155
|
readonly type: 'defineQueueMethods';
|
|
157
156
|
readonly target: 'amplitude';
|
|
@@ -161,33 +160,34 @@ export declare const amplitudeManifest: {
|
|
|
161
160
|
readonly queueFormat: 'voidMethodCall';
|
|
162
161
|
readonly methods: ["setUserId", "setOptOut"];
|
|
163
162
|
}, {
|
|
164
|
-
readonly
|
|
163
|
+
readonly args: ["{{apiKey}}", "{{initOptions}}"];
|
|
165
164
|
readonly global: 'amplitude';
|
|
166
165
|
readonly method: 'init';
|
|
167
|
-
readonly
|
|
166
|
+
readonly type: 'callGlobal';
|
|
168
167
|
}, {
|
|
169
|
-
readonly type: 'loadScript';
|
|
170
|
-
readonly src: '{{scriptUrl}}';
|
|
171
168
|
readonly async: true;
|
|
169
|
+
readonly src: '{{scriptUrl}}';
|
|
170
|
+
readonly type: 'loadScript';
|
|
172
171
|
}];
|
|
173
|
-
readonly
|
|
174
|
-
readonly
|
|
172
|
+
readonly onConsentDenied: [{
|
|
173
|
+
readonly args: [true];
|
|
175
174
|
readonly global: 'amplitude';
|
|
176
175
|
readonly method: 'setOptOut';
|
|
177
|
-
readonly
|
|
176
|
+
readonly type: 'callGlobal';
|
|
178
177
|
}];
|
|
179
178
|
readonly onConsentGranted: [{
|
|
180
|
-
readonly
|
|
179
|
+
readonly args: [false];
|
|
181
180
|
readonly global: 'amplitude';
|
|
182
181
|
readonly method: 'setOptOut';
|
|
183
|
-
readonly args: [false];
|
|
184
|
-
}];
|
|
185
|
-
readonly onConsentDenied: [{
|
|
186
182
|
readonly type: 'callGlobal';
|
|
183
|
+
}];
|
|
184
|
+
readonly onLoadDenied: [{
|
|
185
|
+
readonly args: [true];
|
|
187
186
|
readonly global: 'amplitude';
|
|
188
187
|
readonly method: 'setOptOut';
|
|
189
|
-
readonly
|
|
188
|
+
readonly type: 'callGlobal';
|
|
190
189
|
}];
|
|
190
|
+
readonly vendor: 'amplitude';
|
|
191
191
|
};
|
|
192
192
|
export interface AmplitudeOptions {
|
|
193
193
|
/** Amplitude project API key. */
|
|
@@ -231,4 +231,4 @@ export interface AmplitudeOptions {
|
|
|
231
231
|
* });
|
|
232
232
|
* ```
|
|
233
233
|
*/
|
|
234
|
-
export declare
|
|
234
|
+
export declare const amplitude: ({ apiKey, initOptions, scriptUrl, }: AmplitudeOptions) => Script;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Script } from 'c15t';
|
|
1
|
+
import type { Script } from '@c15t/core';
|
|
2
2
|
/**
|
|
3
3
|
* Clearbit vendor manifest.
|
|
4
4
|
*
|
|
@@ -11,15 +11,15 @@ import type { Script } from 'c15t';
|
|
|
11
11
|
export declare const clearbitManifest: {
|
|
12
12
|
readonly kind: "c15t.vendor-manifest";
|
|
13
13
|
readonly schemaVersion: 1;
|
|
14
|
-
readonly vendor: 'clearbit';
|
|
15
14
|
readonly category: 'marketing';
|
|
16
15
|
readonly install: [{
|
|
17
|
-
readonly type: 'loadScript';
|
|
18
|
-
readonly src: '{{scriptUrl}}';
|
|
19
16
|
readonly attributes: {
|
|
20
17
|
readonly referrerpolicy: 'strict-origin-when-cross-origin';
|
|
21
18
|
};
|
|
19
|
+
readonly src: '{{scriptUrl}}';
|
|
20
|
+
readonly type: 'loadScript';
|
|
22
21
|
}];
|
|
22
|
+
readonly vendor: 'clearbit';
|
|
23
23
|
};
|
|
24
24
|
export interface ClearbitOptions {
|
|
25
25
|
/**
|
|
@@ -57,4 +57,4 @@ export interface ClearbitOptions {
|
|
|
57
57
|
* });
|
|
58
58
|
* ```
|
|
59
59
|
*/
|
|
60
|
-
export declare
|
|
60
|
+
export declare const clearbit: (options: ClearbitOptions) => 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
|
__cfBeacon?: {
|
|
@@ -17,16 +17,16 @@ declare global {
|
|
|
17
17
|
export declare const cloudflareWebAnalyticsManifest: {
|
|
18
18
|
readonly kind: "c15t.vendor-manifest";
|
|
19
19
|
readonly schemaVersion: 1;
|
|
20
|
-
readonly vendor: 'cloudflare-web-analytics';
|
|
21
20
|
readonly category: 'measurement';
|
|
22
21
|
readonly install: [{
|
|
23
|
-
readonly type: 'loadScript';
|
|
24
|
-
readonly src: '{{scriptUrl}}';
|
|
25
|
-
readonly defer: true;
|
|
26
22
|
readonly attributes: {
|
|
27
23
|
readonly 'data-cf-beacon': '{{beaconConfig}}';
|
|
28
24
|
};
|
|
25
|
+
readonly defer: true;
|
|
26
|
+
readonly src: '{{scriptUrl}}';
|
|
27
|
+
readonly type: 'loadScript';
|
|
29
28
|
}];
|
|
29
|
+
readonly vendor: 'cloudflare-web-analytics';
|
|
30
30
|
};
|
|
31
31
|
export interface CloudflareWebAnalyticsOptions {
|
|
32
32
|
/**
|
|
@@ -64,4 +64,4 @@ export interface CloudflareWebAnalyticsOptions {
|
|
|
64
64
|
* });
|
|
65
65
|
* ```
|
|
66
66
|
*/
|
|
67
|
-
export declare
|
|
67
|
+
export declare const cloudflareWebAnalytics: (options: CloudflareWebAnalyticsOptions) => 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
|
databuddy?: {
|
|
@@ -29,61 +29,61 @@ declare global {
|
|
|
29
29
|
export declare const databuddyManifest: {
|
|
30
30
|
readonly kind: "c15t.vendor-manifest";
|
|
31
31
|
readonly schemaVersion: 1;
|
|
32
|
-
readonly vendor: 'databuddy';
|
|
33
|
-
readonly category: 'measurement';
|
|
34
32
|
readonly alwaysLoad: true;
|
|
33
|
+
readonly category: 'measurement';
|
|
35
34
|
readonly install: [{
|
|
36
|
-
readonly type: 'loadScript';
|
|
37
|
-
readonly src: '{{scriptUrl}}';
|
|
38
35
|
readonly async: true;
|
|
39
36
|
readonly attributes: {
|
|
40
37
|
readonly crossorigin: 'anonymous';
|
|
41
|
-
readonly 'data-client-id': '{{clientId}}';
|
|
42
38
|
readonly 'data-api-url': '{{apiUrl}}';
|
|
39
|
+
readonly 'data-client-id': '{{clientId}}';
|
|
43
40
|
};
|
|
41
|
+
readonly src: '{{scriptUrl}}';
|
|
42
|
+
readonly type: 'loadScript';
|
|
44
43
|
}];
|
|
45
|
-
readonly
|
|
44
|
+
readonly onBeforeLoadDenied: [{
|
|
45
|
+
readonly ifUndefined: true;
|
|
46
|
+
readonly name: 'databuddyConfig';
|
|
46
47
|
readonly type: 'setGlobal';
|
|
48
|
+
readonly value: '{{configWhenDenied}}';
|
|
49
|
+
}];
|
|
50
|
+
readonly onBeforeLoadGranted: [{
|
|
51
|
+
readonly ifUndefined: true;
|
|
47
52
|
readonly name: 'databuddyConfig';
|
|
53
|
+
readonly type: 'setGlobal';
|
|
48
54
|
readonly value: '{{configWhenGranted}}';
|
|
49
|
-
readonly ifUndefined: true;
|
|
50
55
|
}];
|
|
51
|
-
readonly
|
|
52
|
-
readonly
|
|
56
|
+
readonly onConsentDenied: [{
|
|
57
|
+
readonly ifUndefined: false;
|
|
53
58
|
readonly name: 'databuddyConfig';
|
|
59
|
+
readonly type: 'setGlobal';
|
|
54
60
|
readonly value: '{{configWhenDenied}}';
|
|
55
|
-
|
|
56
|
-
}];
|
|
57
|
-
readonly onLoadGranted: [{
|
|
58
|
-
readonly type: 'setGlobalPath';
|
|
61
|
+
}, {
|
|
59
62
|
readonly path: ["databuddy", "options", "disabled"];
|
|
60
|
-
readonly value: false;
|
|
61
|
-
}];
|
|
62
|
-
readonly onLoadDenied: [{
|
|
63
63
|
readonly type: 'setGlobalPath';
|
|
64
|
-
readonly path: ["databuddy", "options", "disabled"];
|
|
65
64
|
readonly value: true;
|
|
66
65
|
}];
|
|
67
66
|
readonly onConsentGranted: [{
|
|
68
|
-
readonly
|
|
67
|
+
readonly ifUndefined: false;
|
|
69
68
|
readonly name: 'databuddyConfig';
|
|
69
|
+
readonly type: 'setGlobal';
|
|
70
70
|
readonly value: '{{configWhenGranted}}';
|
|
71
|
-
readonly ifUndefined: false;
|
|
72
71
|
}, {
|
|
73
|
-
readonly type: 'setGlobalPath';
|
|
74
72
|
readonly path: ["databuddy", "options", "disabled"];
|
|
73
|
+
readonly type: 'setGlobalPath';
|
|
75
74
|
readonly value: false;
|
|
76
75
|
}];
|
|
77
|
-
readonly
|
|
78
|
-
readonly type: 'setGlobal';
|
|
79
|
-
readonly name: 'databuddyConfig';
|
|
80
|
-
readonly value: '{{configWhenDenied}}';
|
|
81
|
-
readonly ifUndefined: false;
|
|
82
|
-
}, {
|
|
83
|
-
readonly type: 'setGlobalPath';
|
|
76
|
+
readonly onLoadDenied: [{
|
|
84
77
|
readonly path: ["databuddy", "options", "disabled"];
|
|
78
|
+
readonly type: 'setGlobalPath';
|
|
85
79
|
readonly value: true;
|
|
86
80
|
}];
|
|
81
|
+
readonly onLoadGranted: [{
|
|
82
|
+
readonly path: ["databuddy", "options", "disabled"];
|
|
83
|
+
readonly type: 'setGlobalPath';
|
|
84
|
+
readonly value: false;
|
|
85
|
+
}];
|
|
86
|
+
readonly vendor: 'databuddy';
|
|
87
87
|
};
|
|
88
88
|
export interface DatabuddyConsentOptions {
|
|
89
89
|
/**
|
|
@@ -117,10 +117,13 @@ export interface DatabuddyConsentOptions {
|
|
|
117
117
|
*
|
|
118
118
|
* @example
|
|
119
119
|
* ```ts
|
|
120
|
-
* import {
|
|
120
|
+
* import { createConsentKernel } from 'c15t';
|
|
121
|
+
* import { createScriptLoader } from 'c15t/modules/script-loader';
|
|
121
122
|
* import { databuddy } from '@c15t/scripts/databuddy';
|
|
122
123
|
*
|
|
123
|
-
*
|
|
124
|
+
* const kernel = createConsentKernel();
|
|
125
|
+
* const loader = createScriptLoader({
|
|
126
|
+
* kernel,
|
|
124
127
|
* scripts: [
|
|
125
128
|
* databuddy({
|
|
126
129
|
* clientId: 'db_1234567890abcdef',
|
|
@@ -141,4 +144,4 @@ export interface DatabuddyConsentOptions {
|
|
|
141
144
|
* });
|
|
142
145
|
* ```
|
|
143
146
|
*/
|
|
144
|
-
export declare
|
|
147
|
+
export declare const databuddy: (options: DatabuddyConsentOptions) => 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
|
fathom?: {
|
|
@@ -25,20 +25,20 @@ declare global {
|
|
|
25
25
|
export declare const fathomAnalyticsManifest: {
|
|
26
26
|
readonly kind: "c15t.vendor-manifest";
|
|
27
27
|
readonly schemaVersion: 1;
|
|
28
|
-
readonly vendor: 'fathom-analytics';
|
|
29
28
|
readonly category: 'measurement';
|
|
30
29
|
readonly install: [{
|
|
31
|
-
readonly type: 'loadScript';
|
|
32
|
-
readonly src: '{{scriptUrl}}';
|
|
33
|
-
readonly defer: true;
|
|
34
30
|
readonly attributes: {
|
|
35
|
-
readonly 'data-site': '{{site}}';
|
|
36
|
-
readonly 'data-spa': '{{spa}}';
|
|
37
31
|
readonly 'data-auto': '{{autoAttribute}}';
|
|
38
32
|
readonly 'data-canonical': '{{canonicalAttribute}}';
|
|
39
33
|
readonly 'data-honor-dnt': '{{honorDntAttribute}}';
|
|
34
|
+
readonly 'data-site': '{{site}}';
|
|
35
|
+
readonly 'data-spa': '{{spa}}';
|
|
40
36
|
};
|
|
37
|
+
readonly defer: true;
|
|
38
|
+
readonly src: '{{scriptUrl}}';
|
|
39
|
+
readonly type: 'loadScript';
|
|
41
40
|
}];
|
|
41
|
+
readonly vendor: 'fathom-analytics';
|
|
42
42
|
};
|
|
43
43
|
export interface FathomAnalyticsOptions {
|
|
44
44
|
/**
|
|
@@ -87,4 +87,4 @@ export interface FathomAnalyticsOptions {
|
|
|
87
87
|
* });
|
|
88
88
|
* ```
|
|
89
89
|
*/
|
|
90
|
-
export declare
|
|
90
|
+
export declare const fathomAnalytics: (options: FathomAnalyticsOptions) => Script;
|