@c15t/scripts 2.2.0 → 3.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (197) hide show
  1. package/AGENTS.md +74 -48
  2. package/README.md +3 -3
  3. package/dist/e2e-test-utils.js +60 -24
  4. package/dist/engine/compile.js +45 -45
  5. package/dist/engine/runtime.js +119 -119
  6. package/dist/registry.js +186 -176
  7. package/dist/resolve.js +12 -12
  8. package/dist/vendors/_shared/attributes.js +5 -5
  9. package/dist/vendors/_shared/google-consent.js +10 -10
  10. package/dist/vendors/_shared/install-builders.js +9 -9
  11. package/dist/vendors/_shared/script-url.js +12 -12
  12. package/dist/vendors/ads-and-pixels/linkedin-insights.js +16 -16
  13. package/dist/vendors/ads-and-pixels/meta-pixel.js +82 -82
  14. package/dist/vendors/ads-and-pixels/microsoft-uet.js +57 -57
  15. package/dist/vendors/ads-and-pixels/openai-pixel.js +88 -0
  16. package/dist/vendors/ads-and-pixels/reddit-pixel.js +39 -39
  17. package/dist/vendors/ads-and-pixels/snapchat-pixel.js +25 -25
  18. package/dist/vendors/ads-and-pixels/tiktok-pixel.js +31 -31
  19. package/dist/vendors/ads-and-pixels/x-pixel.js +17 -17
  20. package/dist/vendors/analytics/adobe-analytics.js +17 -17
  21. package/dist/vendors/analytics/ahrefs-analytics.js +8 -8
  22. package/dist/vendors/analytics/amplitude.js +39 -39
  23. package/dist/vendors/analytics/clearbit.js +11 -11
  24. package/dist/vendors/analytics/cloudflare-web-analytics.js +13 -13
  25. package/dist/vendors/analytics/databuddy.js +45 -45
  26. package/dist/vendors/analytics/fathom-analytics.js +15 -15
  27. package/dist/vendors/analytics/google-tag.js +23 -23
  28. package/dist/vendors/analytics/heap.js +37 -37
  29. package/dist/vendors/analytics/hightouch.js +30 -30
  30. package/dist/vendors/analytics/hotjar.js +14 -14
  31. package/dist/vendors/analytics/logrocket.js +24 -24
  32. package/dist/vendors/analytics/matomo-analytics.js +51 -51
  33. package/dist/vendors/analytics/microsoft-clarity.js +31 -31
  34. package/dist/vendors/analytics/mixpanel-analytics.js +31 -31
  35. package/dist/vendors/analytics/pirsch.js +27 -27
  36. package/dist/vendors/analytics/plausible-analytics.js +24 -24
  37. package/dist/vendors/analytics/posthog.js +84 -79
  38. package/dist/vendors/analytics/promptwatch.js +8 -8
  39. package/dist/vendors/analytics/rudderstack.js +50 -50
  40. package/dist/vendors/analytics/rybbit-analytics.js +30 -30
  41. package/dist/vendors/analytics/segment.js +16 -16
  42. package/dist/vendors/analytics/umami-analytics.js +16 -16
  43. package/dist/vendors/analytics/vercel-analytics.js +22 -22
  44. package/dist/vendors/functional/crisp.js +49 -51
  45. package/dist/vendors/functional/intercom.js +18 -18
  46. package/dist/vendors/tag-managers/google-tag-manager.js +20 -20
  47. package/dist-types/__tests__/helpers.d.ts +10 -10
  48. package/dist-types/engine/compile.d.ts +2 -2
  49. package/dist-types/engine/runtime.d.ts +3 -3
  50. package/dist-types/registry.d.ts +182 -173
  51. package/dist-types/resolve.d.ts +2 -2
  52. package/dist-types/types.d.ts +2 -2
  53. package/dist-types/vendors/_shared/attributes.d.ts +2 -2
  54. package/dist-types/vendors/_shared/google-consent.d.ts +2 -2
  55. package/dist-types/vendors/_shared/install-builders.d.ts +1 -1
  56. package/dist-types/vendors/_shared/script-url.d.ts +6 -6
  57. package/dist-types/vendors/ads-and-pixels/linkedin-insights.d.ts +14 -14
  58. package/dist-types/vendors/ads-and-pixels/meta-pixel.d.ts +27 -27
  59. package/dist-types/vendors/ads-and-pixels/microsoft-uet.d.ts +40 -40
  60. package/dist-types/vendors/ads-and-pixels/openai-pixel.d.ts +211 -0
  61. package/dist-types/vendors/ads-and-pixels/reddit-pixel.d.ts +28 -29
  62. package/dist-types/vendors/ads-and-pixels/snapchat-pixel.d.ts +23 -23
  63. package/dist-types/vendors/ads-and-pixels/tiktok-pixel.d.ts +22 -22
  64. package/dist-types/vendors/ads-and-pixels/x-pixel.d.ts +15 -15
  65. package/dist-types/vendors/analytics/adobe-analytics.d.ts +3 -3
  66. package/dist-types/vendors/analytics/ahrefs-analytics.d.ts +5 -5
  67. package/dist-types/vendors/analytics/amplitude.d.ts +24 -24
  68. package/dist-types/vendors/analytics/clearbit.d.ts +5 -5
  69. package/dist-types/vendors/analytics/cloudflare-web-analytics.d.ts +6 -6
  70. package/dist-types/vendors/analytics/databuddy.d.ts +34 -31
  71. package/dist-types/vendors/analytics/fathom-analytics.d.ts +8 -8
  72. package/dist-types/vendors/analytics/google-tag.d.ts +17 -17
  73. package/dist-types/vendors/analytics/heap.d.ts +17 -17
  74. package/dist-types/vendors/analytics/hightouch.d.ts +15 -15
  75. package/dist-types/vendors/analytics/hotjar.d.ts +9 -9
  76. package/dist-types/vendors/analytics/logrocket.d.ts +11 -11
  77. package/dist-types/vendors/analytics/matomo-analytics.d.ts +3 -3
  78. package/dist-types/vendors/analytics/microsoft-clarity.d.ts +12 -13
  79. package/dist-types/vendors/analytics/mixpanel-analytics.d.ts +20 -20
  80. package/dist-types/vendors/analytics/pirsch.d.ts +10 -10
  81. package/dist-types/vendors/analytics/plausible-analytics.d.ts +13 -13
  82. package/dist-types/vendors/analytics/posthog.d.ts +35 -32
  83. package/dist-types/vendors/analytics/promptwatch.d.ts +5 -5
  84. package/dist-types/vendors/analytics/rudderstack.d.ts +16 -16
  85. package/dist-types/vendors/analytics/rybbit-analytics.d.ts +15 -15
  86. package/dist-types/vendors/analytics/segment.d.ts +11 -11
  87. package/dist-types/vendors/analytics/umami-analytics.d.ts +9 -9
  88. package/dist-types/vendors/analytics/vercel-analytics.d.ts +13 -13
  89. package/dist-types/vendors/functional/crisp.d.ts +9 -9
  90. package/dist-types/vendors/functional/intercom.d.ts +12 -12
  91. package/dist-types/vendors/tag-managers/google-tag-manager.d.ts +16 -16
  92. package/docs/README.md +74 -48
  93. package/docs/assets/v3/brand-bar.png +0 -0
  94. package/docs/assets/v3/brand-card.png +0 -0
  95. package/docs/assets/v3/choice-wall.png +0 -0
  96. package/docs/assets/v3/mobile-card.png +0 -0
  97. package/docs/assets/v3/preferences.png +0 -0
  98. package/docs/customization/overview.md +45 -0
  99. package/docs/customization/recipes.md +79 -0
  100. package/docs/customization/slots.md +55 -0
  101. package/docs/customization/tokens.md +76 -0
  102. package/docs/customization/translations.md +49 -0
  103. package/docs/frameworks/javascript/script-loader.md +30 -339
  104. package/docs/frameworks/next/script-loader.md +134 -467
  105. package/docs/frameworks/react/script-loader.md +35 -535
  106. package/docs/guides/consent-state.md +60 -0
  107. package/docs/guides/data-fetching.md +163 -0
  108. package/docs/guides/deployment-modes.md +63 -0
  109. package/docs/guides/troubleshooting.md +68 -0
  110. package/docs/guides/verify-consent.md +62 -0
  111. package/docs/integrations/adobe-analytics.md +239 -105
  112. package/docs/integrations/ahrefs-analytics.md +238 -104
  113. package/docs/integrations/amplitude.md +219 -157
  114. package/docs/integrations/building-integrations.md +32 -224
  115. package/docs/integrations/clearbit.md +247 -86
  116. package/docs/integrations/cloudflare-web-analytics.md +250 -84
  117. package/docs/integrations/crisp.md +251 -97
  118. package/docs/integrations/databuddy.md +259 -153
  119. package/docs/integrations/fathom-analytics.md +239 -96
  120. package/docs/integrations/google-maps.md +328 -207
  121. package/docs/integrations/google-tag-manager.md +248 -96
  122. package/docs/integrations/google-tag.md +261 -90
  123. package/docs/integrations/heap.md +222 -149
  124. package/docs/integrations/hightouch.md +225 -131
  125. package/docs/integrations/hotjar.md +239 -90
  126. package/docs/integrations/intercom.md +239 -98
  127. package/docs/integrations/linkedin-insights.md +243 -113
  128. package/docs/integrations/logrocket.md +241 -123
  129. package/docs/integrations/matomo-analytics.md +256 -111
  130. package/docs/integrations/meta-pixel.md +197 -324
  131. package/docs/integrations/microsoft-clarity.md +233 -114
  132. package/docs/integrations/microsoft-uet.md +245 -110
  133. package/docs/integrations/mixpanel-analytics.md +252 -87
  134. package/docs/integrations/openai-pixel.md +441 -0
  135. package/docs/integrations/overview.md +95 -133
  136. package/docs/integrations/pirsch.md +249 -96
  137. package/docs/integrations/plausible-analytics.md +241 -100
  138. package/docs/integrations/posthog.md +353 -214
  139. package/docs/integrations/promptwatch.md +251 -81
  140. package/docs/integrations/reddit-pixel.md +226 -173
  141. package/docs/integrations/rudderstack.md +244 -187
  142. package/docs/integrations/rybbit-analytics.md +244 -91
  143. package/docs/integrations/segment.md +238 -92
  144. package/docs/integrations/snapchat-pixel.md +240 -110
  145. package/docs/integrations/tiktok-pixel.md +249 -81
  146. package/docs/integrations/umami-analytics.md +242 -95
  147. package/docs/integrations/vercel-analytics.md +242 -90
  148. package/docs/integrations/x-pixel.md +238 -104
  149. package/docs/integrations/youtube.md +354 -142
  150. package/docs/upgrade-v3.md +334 -0
  151. package/package.json +85 -78
  152. package/readme.json +2 -2
  153. package/dist/e2e-test-utils.cjs +0 -166
  154. package/dist/engine/compile.cjs +0 -130
  155. package/dist/engine/runtime.cjs +0 -475
  156. package/dist/registry.cjs +0 -423
  157. package/dist/resolve.cjs +0 -71
  158. package/dist/types.cjs +0 -69
  159. package/dist/vendors/_shared/attributes.cjs +0 -55
  160. package/dist/vendors/_shared/google-consent.cjs +0 -69
  161. package/dist/vendors/_shared/install-builders.cjs +0 -59
  162. package/dist/vendors/_shared/script-url.cjs +0 -78
  163. package/dist/vendors/ads-and-pixels/linkedin-insights.cjs +0 -89
  164. package/dist/vendors/ads-and-pixels/meta-pixel.cjs +0 -206
  165. package/dist/vendors/ads-and-pixels/microsoft-uet.cjs +0 -151
  166. package/dist/vendors/ads-and-pixels/reddit-pixel.cjs +0 -151
  167. package/dist/vendors/ads-and-pixels/snapchat-pixel.cjs +0 -131
  168. package/dist/vendors/ads-and-pixels/tiktok-pixel.cjs +0 -130
  169. package/dist/vendors/ads-and-pixels/x-pixel.cjs +0 -92
  170. package/dist/vendors/analytics/adobe-analytics.cjs +0 -90
  171. package/dist/vendors/analytics/ahrefs-analytics.cjs +0 -68
  172. package/dist/vendors/analytics/amplitude.cjs +0 -193
  173. package/dist/vendors/analytics/clearbit.cjs +0 -69
  174. package/dist/vendors/analytics/cloudflare-web-analytics.cjs +0 -73
  175. package/dist/vendors/analytics/databuddy.cjs +0 -144
  176. package/dist/vendors/analytics/fathom-analytics.cjs +0 -76
  177. package/dist/vendors/analytics/google-tag.cjs +0 -107
  178. package/dist/vendors/analytics/heap.cjs +0 -181
  179. package/dist/vendors/analytics/hightouch.cjs +0 -153
  180. package/dist/vendors/analytics/hotjar.cjs +0 -85
  181. package/dist/vendors/analytics/logrocket.cjs +0 -99
  182. package/dist/vendors/analytics/matomo-analytics.cjs +0 -232
  183. package/dist/vendors/analytics/microsoft-clarity.cjs +0 -138
  184. package/dist/vendors/analytics/mixpanel-analytics.cjs +0 -134
  185. package/dist/vendors/analytics/pirsch.cjs +0 -108
  186. package/dist/vendors/analytics/plausible-analytics.cjs +0 -122
  187. package/dist/vendors/analytics/posthog.cjs +0 -236
  188. package/dist/vendors/analytics/promptwatch.cjs +0 -70
  189. package/dist/vendors/analytics/rudderstack.cjs +0 -227
  190. package/dist/vendors/analytics/rybbit-analytics.cjs +0 -104
  191. package/dist/vendors/analytics/segment.cjs +0 -97
  192. package/dist/vendors/analytics/umami-analytics.cjs +0 -80
  193. package/dist/vendors/analytics/vercel-analytics.cjs +0 -94
  194. package/dist/vendors/functional/crisp.cjs +0 -143
  195. package/dist/vendors/functional/intercom.cjs +0 -89
  196. package/dist/vendors/tag-managers/google-tag-manager.cjs +0 -100
  197. package/docs/shared/react/guides/script-loader.md +0 -311
@@ -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
  posthog: {
@@ -33,83 +33,86 @@ export type PosthogLoadMode = 'always' | 'after-consent' | 'disabled';
33
33
  export declare const posthogManifest: {
34
34
  readonly kind: "c15t.vendor-manifest";
35
35
  readonly schemaVersion: 1;
36
- readonly vendor: 'posthog';
37
- readonly category: 'measurement';
38
36
  readonly alwaysLoad: true;
39
37
  readonly bootstrap: [{
40
- readonly type: 'setGlobal';
38
+ readonly ifUndefined: true;
41
39
  readonly name: 'posthog';
40
+ readonly type: 'setGlobal';
42
41
  readonly value: readonly [];
43
- readonly ifUndefined: true;
44
42
  }, {
45
- readonly type: 'setGlobalPath';
43
+ readonly ifGlobalIsQueue: true;
46
44
  readonly path: ["posthog", "_i"];
45
+ readonly type: 'setGlobalPath';
47
46
  readonly value: readonly [readonly ["{{id}}", "{{initOptions}}", "posthog"]];
48
- readonly ifGlobalIsQueue: true;
49
47
  }, {
50
- readonly type: 'setGlobalPath';
48
+ readonly ifGlobalIsQueue: true;
51
49
  readonly path: ["posthog", "people"];
50
+ readonly type: 'setGlobalPath';
52
51
  readonly value: readonly [];
53
- readonly ifGlobalIsQueue: true;
54
52
  }, {
55
- readonly type: 'defineQueueMethods';
56
- readonly target: 'posthog';
57
53
  readonly methods: ["capture", "opt_in_capturing", "opt_out_capturing"];
58
- }, {
59
- readonly type: 'defineGlobalMethods';
60
54
  readonly target: 'posthog';
55
+ readonly type: 'defineQueueMethods';
56
+ }, {
61
57
  readonly ifGlobalIsQueue: true;
62
58
  readonly methods: [{
63
- readonly name: 'init';
64
59
  readonly behavior: 'noop';
60
+ readonly name: 'init';
65
61
  }, {
66
- readonly name: 'get_explicit_consent_status';
67
62
  readonly behavior: 'return';
63
+ readonly name: 'get_explicit_consent_status';
68
64
  readonly value: 'pending';
69
65
  }];
66
+ readonly target: 'posthog';
67
+ readonly type: 'defineGlobalMethods';
70
68
  }];
69
+ readonly category: 'measurement';
71
70
  readonly install: [{
72
- readonly type: 'loadScript';
73
- readonly src: '{{scriptUrl}}';
74
71
  readonly async: true;
75
72
  readonly attributes: {
76
73
  readonly crossorigin: 'anonymous';
77
74
  readonly 'data-api-host': '{{apiHost}}';
78
75
  readonly 'data-ui-host': '{{uiHost}}';
79
76
  };
77
+ readonly src: '{{scriptUrl}}';
78
+ readonly type: 'loadScript';
80
79
  }];
81
- readonly onBeforeLoadGranted: [{
80
+ readonly onBeforeLoadDenied: [{
81
+ readonly queue: 'posthog';
82
82
  readonly type: 'pushToQueue';
83
+ readonly value: readonly ["opt_out_capturing"];
84
+ }];
85
+ readonly onBeforeLoadGranted: [{
83
86
  readonly queue: 'posthog';
87
+ readonly type: 'pushToQueue';
84
88
  readonly value: readonly ["opt_in_capturing", {
85
89
  readonly captureEventName: null;
86
90
  }];
87
91
  }];
88
- readonly onBeforeLoadDenied: [{
89
- readonly type: 'pushToQueue';
90
- readonly queue: 'posthog';
91
- readonly value: readonly ["opt_out_capturing"];
92
- }];
93
- readonly onLoadGranted: [{
92
+ readonly onConsentDenied: [{
93
+ readonly global: 'posthog';
94
+ readonly method: 'opt_out_capturing';
94
95
  readonly type: 'callGlobal';
96
+ }];
97
+ readonly onConsentGranted: [{
95
98
  readonly global: 'posthog';
96
99
  readonly method: 'opt_in_capturing';
100
+ readonly type: 'callGlobal';
97
101
  }];
98
102
  readonly onLoadDenied: [{
99
- readonly type: 'callGlobal';
100
103
  readonly global: 'posthog';
101
104
  readonly method: 'opt_out_capturing';
102
- }];
103
- readonly onConsentGranted: [{
104
105
  readonly type: 'callGlobal';
106
+ }];
107
+ readonly onLoadGranted: [{
108
+ readonly args: [{
109
+ readonly captureEventName: null;
110
+ }];
105
111
  readonly global: 'posthog';
106
112
  readonly method: 'opt_in_capturing';
107
- }];
108
- readonly onConsentDenied: [{
109
113
  readonly type: 'callGlobal';
110
- readonly global: 'posthog';
111
- readonly method: 'opt_out_capturing';
112
114
  }];
115
+ readonly vendor: 'posthog';
113
116
  };
114
117
  export interface PosthogConsentOptions {
115
118
  /**
@@ -169,4 +172,4 @@ export interface PosthogConsentOptions {
169
172
  * @param options - Optional configuration for the PostHog consent script
170
173
  * @returns The Posthog script
171
174
  */
172
- export declare function posthog(options: PosthogConsentOptions): Script;
175
+ export declare const posthog: (options: PosthogConsentOptions) => Script;
@@ -1,4 +1,4 @@
1
- import type { Script } from 'c15t';
1
+ import type { Script } from '@c15t/core';
2
2
  /**
3
3
  * Promptwatch vendor manifest.
4
4
  *
@@ -7,16 +7,16 @@ import type { Script } from 'c15t';
7
7
  export declare const promptwatchManifest: {
8
8
  readonly kind: "c15t.vendor-manifest";
9
9
  readonly schemaVersion: 1;
10
- readonly vendor: 'promptwatch';
11
10
  readonly category: 'measurement';
12
11
  readonly install: [{
13
- readonly type: 'loadScript';
14
- readonly src: '{{scriptUrl}}';
15
12
  readonly async: true;
16
13
  readonly attributes: {
17
14
  readonly 'data-project-id': '{{projectId}}';
18
15
  };
16
+ readonly src: '{{scriptUrl}}';
17
+ readonly type: 'loadScript';
19
18
  }];
19
+ readonly vendor: 'promptwatch';
20
20
  };
21
21
  export interface PromptwatchOptions {
22
22
  /** Your Promptwatch project id (UUID from the Promptwatch dashboard). */
@@ -33,4 +33,4 @@ export interface PromptwatchOptions {
33
33
  * @throws {Error} When `projectId` is empty or only whitespace.
34
34
  * @returns The Promptwatch script configuration.
35
35
  */
36
- export declare function promptwatch({ projectId, scriptUrl, }: PromptwatchOptions): Script;
36
+ export declare const promptwatch: ({ projectId, scriptUrl, }: PromptwatchOptions) => Script;
@@ -1,4 +1,4 @@
1
- import type { Script } from 'c15t';
1
+ import type { Script } from '@c15t/core';
2
2
  export declare const RUDDERSTACK_QUEUE_METHODS: readonly ['setDefaultInstanceKey', 'load', 'ready', 'page', 'track', 'identify', 'alias', 'group', 'reset', 'setAnonymousId', 'startSession', 'endSession', 'consent', 'addCustomIntegration'];
3
3
  type JsonPrimitive = string | number | boolean | null;
4
4
  type JsonValue = JsonPrimitive | JsonObject | JsonValue[];
@@ -173,48 +173,48 @@ declare global {
173
173
  export declare const rudderstackManifest: {
174
174
  readonly kind: "c15t.vendor-manifest";
175
175
  readonly schemaVersion: 1;
176
- readonly vendor: 'rudderstack';
177
- readonly category: 'measurement';
178
176
  readonly bootstrap: [{
179
- readonly type: 'setGlobal';
177
+ readonly ifUndefined: true;
180
178
  readonly name: 'rudderanalytics';
179
+ readonly type: 'setGlobal';
181
180
  readonly value: readonly [];
182
- readonly ifUndefined: true;
183
181
  }, {
184
- readonly type: 'setGlobal';
185
182
  readonly name: 'RudderSnippetVersion';
183
+ readonly type: 'setGlobal';
186
184
  readonly value: '3.0.32';
187
185
  }, {
188
- readonly type: 'setGlobal';
189
186
  readonly name: 'rudderAnalyticsBuildType';
187
+ readonly type: 'setGlobal';
190
188
  readonly value: 'modern';
191
189
  }, {
192
- readonly type: 'setGlobalPath';
193
190
  readonly path: ["rudderanalytics", "snippetExecuted"];
191
+ readonly type: 'setGlobalPath';
194
192
  readonly value: true;
195
193
  }, {
196
- readonly type: 'defineQueueMethods';
197
- readonly target: 'rudderanalytics';
198
194
  readonly methods: ["setDefaultInstanceKey", "load", "ready", "page", "track", "identify", "alias", "group", "reset", "setAnonymousId", "startSession", "endSession", "consent", "addCustomIntegration"];
195
+ readonly target: 'rudderanalytics';
196
+ readonly type: 'defineQueueMethods';
199
197
  }];
198
+ readonly category: 'measurement';
200
199
  readonly install: [{
201
- readonly type: 'callGlobal';
200
+ readonly args: ["{{writeKey}}", "{{dataPlaneUrl}}", "{{loadOptions}}"];
202
201
  readonly global: 'rudderanalytics';
203
202
  readonly method: 'load';
204
- readonly args: ["{{writeKey}}", "{{dataPlaneUrl}}", "{{loadOptions}}"];
205
- }, {
206
203
  readonly type: 'callGlobal';
204
+ }, {
207
205
  readonly global: 'rudderanalytics';
208
206
  readonly method: 'page';
207
+ readonly type: 'callGlobal';
209
208
  }, {
210
- readonly type: 'loadScript';
211
- readonly src: '{{scriptUrl}}';
212
209
  readonly async: true;
213
210
  readonly attributes: {
214
211
  readonly 'data-loader': 'RS_JS_SDK';
215
212
  readonly 'data-rsa-write-key': '{{writeKey}}';
216
213
  };
214
+ readonly src: '{{scriptUrl}}';
215
+ readonly type: 'loadScript';
217
216
  }];
217
+ readonly vendor: 'rudderstack';
218
218
  };
219
219
  /**
220
220
  * c15t consent categories accepted by the RudderStack consent mapping.
@@ -326,5 +326,5 @@ export interface RudderStackOptions {
326
326
  * });
327
327
  * ```
328
328
  */
329
- export declare function rudderstack({ writeKey, dataPlaneUrl, consentManagement, loadOptions, trackPageView, scriptUrl, }: RudderStackOptions): Script;
329
+ export declare const rudderstack: ({ writeKey, dataPlaneUrl, consentManagement, loadOptions, trackPageView, scriptUrl, }: RudderStackOptions) => Script;
330
330
  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
  rybbit?: {
@@ -18,27 +18,27 @@ declare global {
18
18
  export declare const rybbitAnalyticsManifest: {
19
19
  readonly kind: "c15t.vendor-manifest";
20
20
  readonly schemaVersion: 1;
21
- readonly vendor: 'rybbit-analytics';
22
21
  readonly category: 'measurement';
23
22
  readonly install: [{
24
- readonly type: 'loadScript';
25
- readonly src: '{{scriptUrl}}';
26
- readonly defer: true;
27
23
  readonly attributes: {
28
- readonly 'data-site-id': '{{siteId}}';
24
+ readonly 'data-api-key': '{{apiKey}}';
29
25
  readonly 'data-auto-track-pageview': '{{autoTrackPageview}}';
30
- readonly 'data-track-spa': '{{trackSpa}}';
31
- readonly 'data-track-query': '{{trackQuery}}';
32
- readonly 'data-track-outbound': '{{trackOutbound}}';
33
- readonly 'data-track-errors': '{{trackErrors}}';
26
+ readonly 'data-debounce': '{{debounce}}';
27
+ readonly 'data-mask-patterns': '{{maskPatterns}}';
34
28
  readonly 'data-session-replay': '{{sessionReplay}}';
35
- readonly 'data-web-vitals': '{{webVitals}}';
29
+ readonly 'data-site-id': '{{siteId}}';
36
30
  readonly 'data-skip-patterns': '{{skipPatterns}}';
37
- readonly 'data-mask-patterns': '{{maskPatterns}}';
38
- readonly 'data-debounce': '{{debounce}}';
39
- readonly 'data-api-key': '{{apiKey}}';
31
+ readonly 'data-track-errors': '{{trackErrors}}';
32
+ readonly 'data-track-outbound': '{{trackOutbound}}';
33
+ readonly 'data-track-query': '{{trackQuery}}';
34
+ readonly 'data-track-spa': '{{trackSpa}}';
35
+ readonly 'data-web-vitals': '{{webVitals}}';
40
36
  };
37
+ readonly defer: true;
38
+ readonly src: '{{scriptUrl}}';
39
+ readonly type: 'loadScript';
41
40
  }];
41
+ readonly vendor: 'rybbit-analytics';
42
42
  };
43
43
  export interface RybbitAnalyticsOptions {
44
44
  /** Your Rybbit site ID. */
@@ -79,4 +79,4 @@ export interface RybbitAnalyticsOptions {
79
79
  * `options.siteId` is undefined, null, or trims to an empty string. Provide a
80
80
  * valid non-empty site ID string to prevent this error.
81
81
  */
82
- export declare function rybbitAnalytics(options: RybbitAnalyticsOptions): Script;
82
+ export declare const rybbitAnalytics: (options: RybbitAnalyticsOptions) => Script;
@@ -1,4 +1,4 @@
1
- import type { Script } from 'c15t';
1
+ import type { Script } from '@c15t/core';
2
2
  /**
3
3
  * Public Segment Analytics.js API exposed on `window.analytics`.
4
4
  *
@@ -119,27 +119,27 @@ declare global {
119
119
  export declare const segmentManifest: {
120
120
  readonly kind: "c15t.vendor-manifest";
121
121
  readonly schemaVersion: 1;
122
- readonly vendor: 'segment';
123
- readonly category: 'measurement';
124
122
  readonly bootstrap: [{
125
- readonly type: 'setGlobal';
123
+ readonly ifUndefined: true;
126
124
  readonly name: 'analytics';
125
+ readonly type: 'setGlobal';
127
126
  readonly value: readonly [];
128
- readonly ifUndefined: true;
129
127
  }, {
130
- readonly type: 'defineQueueMethods';
131
- readonly target: 'analytics';
132
128
  readonly methods: ["track", "page", "identify", "group", "alias", "reset"];
129
+ readonly target: 'analytics';
130
+ readonly type: 'defineQueueMethods';
133
131
  }];
132
+ readonly category: 'measurement';
134
133
  readonly install: [{
135
- readonly type: 'callGlobal';
136
134
  readonly global: 'analytics';
137
135
  readonly method: 'page';
136
+ readonly type: 'callGlobal';
138
137
  }, {
139
- readonly type: 'loadScript';
140
- readonly src: '{{scriptUrl}}';
141
138
  readonly async: true;
139
+ readonly src: '{{scriptUrl}}';
140
+ readonly type: 'loadScript';
142
141
  }];
142
+ readonly vendor: 'segment';
143
143
  };
144
144
  export interface SegmentOptions {
145
145
  /** Your Segment write key. */
@@ -155,4 +155,4 @@ export interface SegmentOptions {
155
155
  * @param options - The options for the Segment script.
156
156
  * @returns The Segment script configuration.
157
157
  */
158
- export declare function segment({ writeKey, trackPageView, scriptUrl, }: SegmentOptions): Script;
158
+ export declare const segment: ({ writeKey, trackPageView, scriptUrl, }: SegmentOptions) => 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
  umami?: {
@@ -20,21 +20,21 @@ declare global {
20
20
  export declare const umamiAnalyticsManifest: {
21
21
  readonly kind: "c15t.vendor-manifest";
22
22
  readonly schemaVersion: 1;
23
- readonly vendor: 'umami-analytics';
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 'data-website-id': '{{websiteId}}';
31
- readonly 'data-host-url': '{{hostUrl}}';
32
26
  readonly 'data-auto-track': '{{autoTrackAttribute}}';
27
+ readonly 'data-before-send': '{{beforeSend}}';
33
28
  readonly 'data-domains': '{{domains}}';
29
+ readonly 'data-host-url': '{{hostUrl}}';
34
30
  readonly 'data-tag': '{{tag}}';
35
- readonly 'data-before-send': '{{beforeSend}}';
31
+ readonly 'data-website-id': '{{websiteId}}';
36
32
  };
33
+ readonly defer: true;
34
+ readonly src: '{{scriptUrl}}';
35
+ readonly type: 'loadScript';
37
36
  }];
37
+ readonly vendor: 'umami-analytics';
38
38
  };
39
39
  export interface UmamiAnalyticsOptions {
40
40
  /**
@@ -90,4 +90,4 @@ export interface UmamiAnalyticsOptions {
90
90
  * });
91
91
  * ```
92
92
  */
93
- export declare function umamiAnalytics(options: UmamiAnalyticsOptions): Script;
93
+ export declare const umamiAnalytics: (options: UmamiAnalyticsOptions) => Script;
@@ -1,4 +1,4 @@
1
- import type { Script } from 'c15t';
1
+ import type { Script } from '@c15t/core';
2
2
  export type VercelAnalyticsMode = 'auto' | 'development' | 'production';
3
3
  declare global {
4
4
  interface Window {
@@ -15,33 +15,33 @@ declare global {
15
15
  export declare const vercelAnalyticsManifest: {
16
16
  readonly kind: "c15t.vendor-manifest";
17
17
  readonly schemaVersion: 1;
18
- readonly vendor: 'vercel-analytics';
19
- readonly category: 'measurement';
20
18
  readonly bootstrap: [{
21
- readonly type: 'setGlobal';
19
+ readonly ifUndefined: true;
22
20
  readonly name: 'vaq';
21
+ readonly type: 'setGlobal';
23
22
  readonly value: readonly [];
24
- readonly ifUndefined: true;
25
23
  }, {
26
- readonly type: 'defineStubFunction';
24
+ readonly ifUndefined: true;
27
25
  readonly name: 'va';
28
26
  readonly queue: {
29
27
  readonly global: 'vaq';
30
28
  };
31
29
  readonly queueFormat: 'array';
32
- readonly ifUndefined: true;
30
+ readonly type: 'defineStubFunction';
33
31
  }];
32
+ readonly category: 'measurement';
34
33
  readonly install: [{
35
- readonly type: 'loadScript';
36
- readonly src: '{{scriptUrl}}';
37
- readonly defer: true;
38
34
  readonly attributes: {
39
- readonly 'data-sdkn': 'c15t';
40
- readonly 'data-dsn': '{{dsn}}';
41
35
  readonly 'data-disable-auto-track': '{{disableAutoTrackAttribute}}';
36
+ readonly 'data-dsn': '{{dsn}}';
42
37
  readonly 'data-endpoint': '{{endpoint}}';
38
+ readonly 'data-sdkn': 'c15t';
43
39
  };
40
+ readonly defer: true;
41
+ readonly src: '{{scriptUrl}}';
42
+ readonly type: 'loadScript';
44
43
  }];
44
+ readonly vendor: 'vercel-analytics';
45
45
  };
46
46
  export interface VercelAnalyticsOptions {
47
47
  /** Project DSN for self-hosted or non-Vercel deployments. */
@@ -63,4 +63,4 @@ export interface VercelAnalyticsOptions {
63
63
  * @param options - The options for the Vercel Analytics script.
64
64
  * @returns The Vercel Analytics script.
65
65
  */
66
- export declare function vercelAnalytics(options?: VercelAnalyticsOptions): Script;
66
+ export declare const vercelAnalytics: (options?: VercelAnalyticsOptions) => 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
  $crisp: unknown[][];
@@ -21,23 +21,23 @@ declare global {
21
21
  export declare const crispManifest: {
22
22
  readonly kind: "c15t.vendor-manifest";
23
23
  readonly schemaVersion: 1;
24
- readonly vendor: 'crisp';
25
24
  readonly category: 'functionality';
26
25
  readonly install: [{
27
- readonly type: 'setGlobal';
26
+ readonly ifUndefined: false;
28
27
  readonly name: '$crisp';
28
+ readonly type: 'setGlobal';
29
29
  readonly value: readonly [];
30
- readonly ifUndefined: false;
31
30
  }, {
32
- readonly type: 'setGlobal';
31
+ readonly ifUndefined: false;
33
32
  readonly name: 'CRISP_WEBSITE_ID';
33
+ readonly type: 'setGlobal';
34
34
  readonly value: '{{websiteId}}';
35
- readonly ifUndefined: false;
36
35
  }, {
37
- readonly type: 'loadScript';
38
- readonly src: '{{scriptSrc}}';
39
36
  readonly async: true;
37
+ readonly src: '{{scriptSrc}}';
38
+ readonly type: 'loadScript';
40
39
  }];
40
+ readonly vendor: 'crisp';
41
41
  };
42
42
  export interface CrispOptions {
43
43
  /** Your Crisp website ID. */
@@ -75,4 +75,4 @@ export interface CrispOptions {
75
75
  *
76
76
  * @see {@link https://help.crisp.chat/en/article/how-do-i-install-crisp-live-chat-on-my-website-10wcj3l/} Crisp installation documentation.
77
77
  */
78
- export declare function crisp(options: CrispOptions): Script;
78
+ export declare const crisp: (options: CrispOptions) => Script;
@@ -1,10 +1,10 @@
1
- import type { Script } from 'c15t';
1
+ import type { Script } from '@c15t/core';
2
2
  export declare const INTERCOM_API_BASES: {
3
- readonly us: 'https://api-iam.intercom.io';
4
- readonly eu: 'https://api-iam.eu.intercom.io';
5
3
  readonly au: 'https://api-iam.au.intercom.io';
4
+ readonly eu: 'https://api-iam.eu.intercom.io';
5
+ readonly us: 'https://api-iam.intercom.io';
6
6
  };
7
- export type IntercomApiBase = (typeof INTERCOM_API_BASES)[keyof typeof INTERCOM_API_BASES] | (string & {});
7
+ export type IntercomApiBase = (typeof INTERCOM_API_BASES)[keyof typeof INTERCOM_API_BASES] | (string & Record<never, never>);
8
8
  export type IntercomThemeMode = 'light' | 'dark' | 'system';
9
9
  export interface IntercomAvatar {
10
10
  type: 'avatar';
@@ -74,26 +74,26 @@ declare global {
74
74
  export declare const intercomManifest: {
75
75
  readonly kind: "c15t.vendor-manifest";
76
76
  readonly schemaVersion: 1;
77
- readonly vendor: 'intercom';
78
77
  readonly category: 'functionality';
79
78
  readonly install: [{
80
- readonly type: 'defineStubFunction';
79
+ readonly ifUndefined: true;
81
80
  readonly name: 'Intercom';
82
81
  readonly queue: {
83
82
  readonly property: 'q';
84
83
  };
85
84
  readonly queueFormat: 'array';
86
- readonly ifUndefined: true;
85
+ readonly type: 'defineStubFunction';
87
86
  }, {
88
- readonly type: 'setGlobal';
87
+ readonly ifUndefined: false;
89
88
  readonly name: 'intercomSettings';
89
+ readonly type: 'setGlobal';
90
90
  readonly value: '{{settings}}';
91
- readonly ifUndefined: false;
92
91
  }, {
93
- readonly type: 'loadScript';
94
- readonly src: '{{scriptSrc}}';
95
92
  readonly async: true;
93
+ readonly src: '{{scriptSrc}}';
94
+ readonly type: 'loadScript';
96
95
  }];
96
+ readonly vendor: 'intercom';
97
97
  };
98
98
  export interface IntercomOptions {
99
99
  /**
@@ -132,4 +132,4 @@ export interface IntercomOptions {
132
132
  *
133
133
  * @see {@link https://developers.intercom.com/installing-intercom/web/installation} Intercom installation documentation.
134
134
  */
135
- export declare function intercom({ appId, apiBase, settings, scriptSrc, }: IntercomOptions): Script;
135
+ export declare const intercom: ({ appId, apiBase, settings, scriptSrc, }: IntercomOptions) => 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
  dataLayer: unknown[];
@@ -16,42 +16,42 @@ declare global {
16
16
  export declare const googleTagManagerManifest: {
17
17
  readonly kind: "c15t.vendor-manifest";
18
18
  readonly schemaVersion: 1;
19
- readonly vendor: 'google-tag-manager';
20
- readonly category: 'necessary';
21
19
  readonly alwaysLoad: true;
22
20
  readonly bootstrap: [{
23
- readonly type: 'setGlobal';
21
+ readonly ifUndefined: true;
24
22
  readonly name: 'dataLayer';
23
+ readonly type: 'setGlobal';
25
24
  readonly value: readonly [];
26
- readonly ifUndefined: true;
27
25
  }, {
28
- readonly type: 'defineQueueFunction';
26
+ readonly ifUndefined: true;
29
27
  readonly name: 'gtag';
30
28
  readonly queue: 'dataLayer';
31
- readonly ifUndefined: true;
29
+ readonly type: 'defineQueueFunction';
32
30
  }];
31
+ readonly category: 'necessary';
32
+ readonly consentMapping: Record<string, string[]>;
33
+ readonly consentSignal: 'gtag';
33
34
  readonly install: [{
34
- readonly type: 'pushToQueue';
35
35
  readonly queue: 'dataLayer';
36
+ readonly type: 'pushToQueue';
36
37
  readonly value: {
38
+ readonly event: 'gtm.js';
37
39
  readonly 'gtm.start': {
38
40
  readonly kind: "c15t.runtime-value";
39
41
  readonly value: 'timestamp';
40
42
  };
41
- readonly event: 'gtm.js';
42
43
  };
43
44
  }, {
44
- readonly type: 'loadScript';
45
- readonly src: 'https://www.googletagmanager.com/gtm.js?id={{id}}';
46
45
  readonly async: true;
46
+ readonly src: 'https://www.googletagmanager.com/gtm.js?id={{id}}';
47
+ readonly type: 'loadScript';
47
48
  }];
48
49
  readonly onConsentChange: [{
49
- readonly type: 'callGlobal';
50
- readonly global: 'gtag';
51
50
  readonly args: ["event", "{{updateEventName}}"];
51
+ readonly global: 'gtag';
52
+ readonly type: 'callGlobal';
52
53
  }];
53
- readonly consentMapping: Record<string, string[]>;
54
- readonly consentSignal: 'gtag';
54
+ readonly vendor: 'google-tag-manager';
55
55
  };
56
56
  export interface GoogleTagManagerOptions {
57
57
  /**
@@ -91,4 +91,4 @@ export interface GoogleTagManagerOptions {
91
91
  * @param options - The options for the Google Tag Manager script.
92
92
  * @returns The Google Tag Manager script.
93
93
  */
94
- export declare function googleTagManager({ id, updateEventName, consentMapping, }: GoogleTagManagerOptions): Script;
94
+ export declare const googleTagManager: ({ id, updateEventName, consentMapping, }: GoogleTagManagerOptions) => Script;