@c15t/scripts 3.0.0-alpha.1 → 3.0.0-alpha.3
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 +129 -59
- package/README.md +8 -29
- package/SKILL.md +33 -0
- package/dist/adobe-analytics.js +2 -0
- package/dist/ahrefs-analytics.js +2 -0
- package/dist/amplitude.js +2 -0
- package/dist/clearbit.js +2 -0
- package/dist/cloudflare-web-analytics.js +2 -0
- package/dist/cloudflare-zaraz.js +2 -0
- package/dist/crisp.js +2 -0
- package/dist/databuddy.js +2 -0
- package/dist/e2e-test-utils.js +2 -137
- package/dist/engine/compile.js +2 -89
- package/dist/engine/runtime.js +2 -448
- package/dist/events.js +2 -0
- package/dist/fathom-analytics.js +2 -0
- package/dist/front-chat.js +2 -0
- package/dist/google-tag-manager.js +2 -0
- package/dist/google-tag.js +2 -0
- package/dist/heap.js +2 -0
- package/dist/hightouch.js +2 -0
- package/dist/hotjar.js +2 -0
- package/dist/intercom.js +2 -0
- package/dist/klaviyo.js +2 -0
- package/dist/linkedin-insights.js +2 -0
- package/dist/logrocket.js +2 -0
- package/dist/matomo-analytics.js +2 -0
- package/dist/meta-pixel.js +2 -0
- package/dist/microsoft-clarity.js +2 -0
- package/dist/microsoft-uet.js +2 -0
- package/dist/mixpanel-analytics.js +2 -0
- package/dist/one-dollar-stats.js +2 -0
- package/dist/openai-pixel.js +2 -0
- package/dist/pinterest-tag.js +2 -0
- package/dist/pirsch.js +2 -0
- package/dist/plausible-analytics.js +2 -0
- package/dist/posthog.js +2 -0
- package/dist/promptwatch.js +2 -0
- package/dist/reddit-pixel.js +2 -0
- package/dist/registry.js +2 -392
- package/dist/resolve.js +2 -33
- package/dist/rudderstack.js +2 -0
- package/dist/rybbit-analytics.js +2 -0
- package/dist/segment.js +2 -0
- package/dist/snapchat-pixel.js +2 -0
- package/dist/tiktok-pixel.js +2 -0
- package/dist/types.js +2 -16
- package/dist/umami-analytics.js +2 -0
- package/dist/vendors/_shared/attributes.js +2 -14
- package/dist/vendors/_shared/google-consent.js +2 -27
- package/dist/vendors/_shared/install-builders.js +2 -21
- package/dist/vendors/_shared/required-id.js +2 -0
- package/dist/vendors/_shared/script-url.js +2 -28
- package/dist/vendors/ads-and-pixels/linkedin-insights.js +2 -48
- package/dist/vendors/ads-and-pixels/meta-pixel.js +2 -153
- package/dist/vendors/ads-and-pixels/microsoft-uet.js +2 -110
- package/dist/vendors/ads-and-pixels/openai-pixel.js +2 -88
- package/dist/vendors/ads-and-pixels/pinterest-tag.js +2 -0
- package/dist/vendors/ads-and-pixels/reddit-pixel.js +2 -107
- package/dist/vendors/ads-and-pixels/snapchat-pixel.js +2 -87
- package/dist/vendors/ads-and-pixels/tiktok-pixel.js +2 -89
- package/dist/vendors/ads-and-pixels/x-pixel.js +2 -48
- package/dist/vendors/analytics/adobe-analytics.js +2 -49
- package/dist/vendors/analytics/ahrefs-analytics.js +2 -27
- package/dist/vendors/analytics/amplitude.js +2 -134
- package/dist/vendors/analytics/clearbit.js +2 -28
- package/dist/vendors/analytics/cloudflare-web-analytics.js +2 -32
- package/dist/vendors/analytics/databuddy.js +2 -103
- package/dist/vendors/analytics/fathom-analytics.js +2 -35
- package/dist/vendors/analytics/google-tag.js +2 -66
- package/dist/vendors/analytics/heap.js +2 -134
- package/dist/vendors/analytics/hightouch.js +2 -109
- package/dist/vendors/analytics/hotjar.js +2 -44
- package/dist/vendors/analytics/logrocket.js +2 -58
- package/dist/vendors/analytics/matomo-analytics.js +2 -191
- package/dist/vendors/analytics/microsoft-clarity.js +2 -100
- package/dist/vendors/analytics/mixpanel-analytics.js +2 -93
- package/dist/vendors/analytics/one-dollar-stats.js +2 -0
- package/dist/vendors/analytics/pirsch.js +2 -67
- package/dist/vendors/analytics/plausible-analytics.js +2 -81
- package/dist/vendors/analytics/posthog.js +2 -200
- package/dist/vendors/analytics/promptwatch.js +2 -29
- package/dist/vendors/analytics/rudderstack.js +2 -183
- package/dist/vendors/analytics/rybbit-analytics.js +2 -63
- package/dist/vendors/analytics/segment.js +2 -56
- package/dist/vendors/analytics/umami-analytics.js +2 -39
- package/dist/vendors/analytics/vercel-analytics.js +2 -53
- package/dist/vendors/email-and-sms/klaviyo.js +2 -0
- package/dist/vendors/functional/crisp.js +2 -100
- package/dist/vendors/functional/front-chat.js +2 -0
- package/dist/vendors/functional/intercom.js +2 -45
- package/dist/vendors/tag-managers/cloudflare-zaraz.js +2 -98
- package/dist/vendors/tag-managers/google-tag-manager.js +2 -59
- package/dist/vercel-analytics.js +2 -0
- package/dist/x-pixel.js +2 -0
- package/dist-types/adobe-analytics.d.ts +2 -0
- package/dist-types/ahrefs-analytics.d.ts +2 -0
- package/dist-types/amplitude.d.ts +2 -0
- package/dist-types/clearbit.d.ts +2 -0
- package/dist-types/cloudflare-web-analytics.d.ts +2 -0
- package/dist-types/cloudflare-zaraz.d.ts +2 -0
- package/dist-types/crisp.d.ts +2 -0
- package/dist-types/databuddy.d.ts +2 -0
- package/dist-types/e2e-test-utils.d.ts +2 -0
- package/dist-types/engine/compile.d.ts +2 -3
- package/dist-types/engine/runtime.d.ts +2 -3
- package/dist-types/events.d.ts +2 -0
- package/dist-types/fathom-analytics.d.ts +2 -0
- package/dist-types/front-chat.d.ts +2 -0
- package/dist-types/google-tag-manager.d.ts +2 -0
- package/dist-types/google-tag.d.ts +2 -0
- package/dist-types/heap.d.ts +2 -0
- package/dist-types/hightouch.d.ts +2 -0
- package/dist-types/hotjar.d.ts +2 -0
- package/dist-types/intercom.d.ts +2 -0
- package/dist-types/klaviyo.d.ts +2 -0
- package/dist-types/linkedin-insights.d.ts +2 -0
- package/dist-types/logrocket.d.ts +2 -0
- package/dist-types/matomo-analytics.d.ts +2 -0
- package/dist-types/meta-pixel.d.ts +2 -0
- package/dist-types/microsoft-clarity.d.ts +2 -0
- package/dist-types/microsoft-uet.d.ts +2 -0
- package/dist-types/mixpanel-analytics.d.ts +2 -0
- package/dist-types/one-dollar-stats.d.ts +2 -0
- package/dist-types/openai-pixel.d.ts +2 -0
- package/dist-types/pinterest-tag.d.ts +2 -0
- package/dist-types/pirsch.d.ts +2 -0
- package/dist-types/plausible-analytics.d.ts +2 -0
- package/dist-types/posthog.d.ts +2 -0
- package/dist-types/promptwatch.d.ts +2 -0
- package/dist-types/reddit-pixel.d.ts +2 -0
- package/dist-types/registry.d.ts +2 -458
- package/dist-types/resolve.d.ts +2 -9
- package/dist-types/rudderstack.d.ts +2 -0
- package/dist-types/rybbit-analytics.d.ts +2 -0
- package/dist-types/segment.d.ts +2 -0
- package/dist-types/snapchat-pixel.d.ts +2 -0
- package/dist-types/tiktok-pixel.d.ts +2 -0
- package/dist-types/types.d.ts +2 -314
- package/dist-types/umami-analytics.d.ts +2 -0
- package/dist-types/vendors/_shared/attributes.d.ts +2 -35
- package/dist-types/vendors/_shared/google-consent.d.ts +2 -47
- package/dist-types/vendors/_shared/install-builders.d.ts +2 -30
- package/dist-types/vendors/_shared/required-id.d.ts +2 -0
- package/dist-types/vendors/_shared/script-url.d.ts +2 -75
- package/dist-types/vendors/ads-and-pixels/linkedin-insights.d.ts +2 -92
- package/dist-types/vendors/ads-and-pixels/meta-pixel.d.ts +2 -289
- package/dist-types/vendors/ads-and-pixels/microsoft-uet.d.ts +2 -105
- package/dist-types/vendors/ads-and-pixels/openai-pixel.d.ts +2 -211
- package/dist-types/vendors/ads-and-pixels/pinterest-tag.d.ts +2 -0
- package/dist-types/vendors/ads-and-pixels/reddit-pixel.d.ts +2 -210
- package/dist-types/vendors/ads-and-pixels/snapchat-pixel.d.ts +2 -171
- package/dist-types/vendors/ads-and-pixels/tiktok-pixel.d.ts +2 -106
- package/dist-types/vendors/ads-and-pixels/x-pixel.d.ts +2 -183
- package/dist-types/vendors/analytics/adobe-analytics.d.ts +2 -75
- package/dist-types/vendors/analytics/ahrefs-analytics.d.ts +2 -62
- package/dist-types/vendors/analytics/amplitude.d.ts +2 -234
- package/dist-types/vendors/analytics/clearbit.d.ts +2 -60
- package/dist-types/vendors/analytics/cloudflare-web-analytics.d.ts +2 -67
- package/dist-types/vendors/analytics/databuddy.d.ts +2 -147
- package/dist-types/vendors/analytics/fathom-analytics.d.ts +2 -90
- package/dist-types/vendors/analytics/google-tag.d.ts +2 -93
- package/dist-types/vendors/analytics/heap.d.ts +2 -316
- package/dist-types/vendors/analytics/hightouch.d.ts +2 -285
- package/dist-types/vendors/analytics/hotjar.d.ts +2 -73
- package/dist-types/vendors/analytics/logrocket.d.ts +2 -101
- package/dist-types/vendors/analytics/matomo-analytics.d.ts +2 -41
- package/dist-types/vendors/analytics/microsoft-clarity.d.ts +2 -97
- package/dist-types/vendors/analytics/mixpanel-analytics.d.ts +2 -113
- package/dist-types/vendors/analytics/one-dollar-stats.d.ts +2 -0
- package/dist-types/vendors/analytics/pirsch.d.ts +2 -96
- package/dist-types/vendors/analytics/plausible-analytics.d.ts +2 -122
- package/dist-types/vendors/analytics/posthog.d.ts +2 -175
- package/dist-types/vendors/analytics/promptwatch.d.ts +2 -36
- package/dist-types/vendors/analytics/rudderstack.d.ts +2 -330
- package/dist-types/vendors/analytics/rybbit-analytics.d.ts +2 -82
- package/dist-types/vendors/analytics/segment.d.ts +2 -158
- package/dist-types/vendors/analytics/umami-analytics.d.ts +2 -93
- package/dist-types/vendors/analytics/vercel-analytics.d.ts +2 -66
- package/dist-types/vendors/email-and-sms/klaviyo.d.ts +2 -0
- package/dist-types/vendors/functional/crisp.d.ts +2 -78
- package/dist-types/vendors/functional/front-chat.d.ts +2 -0
- package/dist-types/vendors/functional/intercom.d.ts +2 -135
- package/dist-types/vendors/tag-managers/cloudflare-zaraz.d.ts +2 -39
- package/dist-types/vendors/tag-managers/google-tag-manager.d.ts +2 -94
- package/dist-types/vercel-analytics.d.ts +2 -0
- package/dist-types/x-pixel.d.ts +2 -0
- package/docs/README.md +129 -59
- package/docs/assets/v3/bottom-bar.png +0 -0
- package/docs/assets/v3/brand-card.png +0 -0
- package/docs/assets/v3/brand-preferences.png +0 -0
- package/docs/assets/v3/choice-wall.png +0 -0
- package/docs/assets/v3/headless-bar-html.png +0 -0
- package/docs/assets/v3/headless-bar-mobile.png +0 -0
- package/docs/assets/v3/headless-bar.png +0 -0
- package/docs/assets/v3/slim-bar.png +0 -0
- package/docs/concepts/choose-your-setup.md +87 -0
- package/docs/concepts/consent-categories.md +84 -0
- package/docs/concepts/consent-state.md +357 -0
- package/docs/{guides → concepts}/data-fetching.md +31 -27
- package/docs/concepts/how-consent-works.md +123 -0
- package/docs/concepts/policies.md +71 -0
- package/docs/customization/class-names.md +202 -0
- package/docs/customization/dark-mode.md +157 -0
- package/docs/customization/motion.md +119 -0
- package/docs/customization/overview.md +67 -33
- package/docs/customization/recipes.md +839 -47
- package/docs/customization/slots.md +216 -35
- package/docs/customization/stylesheets.md +147 -0
- package/docs/customization/tailwind.md +842 -0
- package/docs/customization/tokens.md +166 -36
- package/docs/customization/translations.md +61 -3
- package/docs/frameworks/astro/embeds.md +160 -0
- package/docs/frameworks/astro/network-blocker.md +86 -0
- package/docs/frameworks/astro/scripts.md +146 -0
- package/docs/frameworks/html/embeds.md +142 -0
- package/docs/frameworks/html/network-blocker.md +105 -0
- package/docs/frameworks/html/scripts.md +164 -0
- package/docs/frameworks/javascript/scripts.md +119 -0
- package/docs/frameworks/next/embeds.md +90 -0
- package/docs/frameworks/next/network-blocker.md +153 -0
- package/docs/frameworks/next/scripts.md +196 -0
- package/docs/frameworks/nuxt/embeds.md +81 -0
- package/docs/frameworks/nuxt/network-blocker.md +97 -0
- package/docs/frameworks/nuxt/scripts.md +89 -0
- package/docs/frameworks/react/embeds.md +89 -0
- package/docs/frameworks/react/network-blocker.md +140 -0
- package/docs/frameworks/react/scripts.md +115 -0
- package/docs/frameworks/svelte/embeds.md +96 -0
- package/docs/frameworks/svelte/network-blocker.md +141 -0
- package/docs/frameworks/svelte/scripts.md +137 -0
- package/docs/frameworks/sveltekit/embeds.md +103 -0
- package/docs/frameworks/sveltekit/network-blocker.md +149 -0
- package/docs/frameworks/sveltekit/scripts.md +141 -0
- package/docs/frameworks/tanstack-start/embeds.md +96 -0
- package/docs/frameworks/tanstack-start/network-blocker.md +145 -0
- package/docs/frameworks/tanstack-start/scripts.md +103 -0
- package/docs/frameworks/vue/embeds.md +84 -0
- package/docs/frameworks/vue/network-blocker.md +99 -0
- package/docs/frameworks/vue/scripts.md +93 -0
- package/docs/guides/banner-experiments.md +654 -0
- package/docs/guides/troubleshooting.md +120 -47
- package/docs/guides/verify-consent.md +81 -49
- package/docs/integrations/adobe-analytics.md +168 -160
- package/docs/integrations/ahrefs-analytics.md +153 -155
- package/docs/integrations/amplitude.md +163 -157
- package/docs/integrations/building-integrations.md +136 -37
- package/docs/integrations/clearbit.md +155 -155
- package/docs/integrations/cloudflare-web-analytics.md +157 -157
- package/docs/integrations/cloudflare-zaraz.md +210 -262
- package/docs/integrations/crisp.md +165 -159
- package/docs/integrations/databuddy.md +158 -174
- package/docs/integrations/fathom-analytics.md +159 -157
- package/docs/integrations/front-chat.md +322 -0
- package/docs/integrations/google-maps.md +119 -84
- package/docs/integrations/google-tag-manager.md +179 -164
- package/docs/integrations/google-tag.md +164 -161
- package/docs/integrations/heap.md +164 -156
- package/docs/integrations/hightouch.md +162 -158
- package/docs/integrations/hotjar.md +160 -156
- package/docs/integrations/intercom.md +184 -154
- package/docs/integrations/klaviyo.md +486 -0
- package/docs/integrations/linkedin-insights.md +175 -151
- package/docs/integrations/logrocket.md +161 -157
- package/docs/integrations/matomo-analytics.md +189 -179
- package/docs/integrations/meta-pixel.md +189 -151
- package/docs/integrations/microsoft-clarity.md +164 -156
- package/docs/integrations/microsoft-uet.md +149 -155
- package/docs/integrations/mixpanel-analytics.md +156 -161
- package/docs/integrations/one-dollar-stats.md +306 -0
- package/docs/integrations/openai-pixel.md +205 -302
- package/docs/integrations/overview.md +143 -83
- package/docs/integrations/pinterest-tag.md +329 -0
- package/docs/integrations/pirsch.md +170 -160
- package/docs/integrations/plausible-analytics.md +173 -159
- package/docs/integrations/posthog.md +227 -242
- package/docs/integrations/promptwatch.md +155 -155
- package/docs/integrations/reddit-pixel.md +186 -158
- package/docs/integrations/rudderstack.md +202 -187
- package/docs/integrations/rybbit-analytics.md +172 -161
- package/docs/integrations/segment.md +183 -155
- package/docs/integrations/snapchat-pixel.md +187 -157
- package/docs/integrations/tiktok-pixel.md +172 -151
- package/docs/integrations/umami-analytics.md +164 -159
- package/docs/integrations/vercel-analytics.md +167 -158
- package/docs/integrations/x-pixel.md +177 -151
- package/docs/integrations/youtube.md +122 -87
- package/docs/upgrade-v3.md +490 -354
- package/package.json +12 -236
- package/dist-types/__tests__/helpers.d.ts +0 -141
- package/docs/assets/v3/brand-bar.png +0 -0
- package/docs/assets/v3/mobile-card.png +0 -0
- package/docs/assets/v3/preferences.png +0 -0
- package/docs/frameworks/javascript/script-loader.md +0 -94
- package/docs/frameworks/next/script-loader.md +0 -210
- package/docs/frameworks/react/script-loader.md +0 -63
- package/docs/guides/consent-state.md +0 -60
- package/docs/guides/deployment-modes.md +0 -75
- package/docs/integrations/clear-on-revocation.md +0 -167
- package/docs/integrations/granular-consent.md +0 -208
package/package.json
CHANGED
|
@@ -1,40 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@c15t/scripts",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
4
|
-
"description": "
|
|
5
|
-
"
|
|
6
|
-
"adobe-analytics",
|
|
7
|
-
"amplitude",
|
|
8
|
-
"analytics-consent",
|
|
9
|
-
"c15t",
|
|
10
|
-
"ccpa",
|
|
11
|
-
"clearbit",
|
|
12
|
-
"cmp",
|
|
13
|
-
"consent",
|
|
14
|
-
"consent-mode",
|
|
15
|
-
"consent-mode-v2",
|
|
16
|
-
"ga4",
|
|
17
|
-
"gdpr",
|
|
18
|
-
"google-ads",
|
|
19
|
-
"google-tag",
|
|
20
|
-
"google-tag-manager",
|
|
21
|
-
"gtm",
|
|
22
|
-
"heap",
|
|
23
|
-
"hightouch",
|
|
24
|
-
"lgpd",
|
|
25
|
-
"linkedin-insights",
|
|
26
|
-
"logrocket",
|
|
27
|
-
"meta-pixel",
|
|
28
|
-
"microsoft-uet",
|
|
29
|
-
"pirsch",
|
|
30
|
-
"posthog",
|
|
31
|
-
"privacy",
|
|
32
|
-
"rudderstack",
|
|
33
|
-
"script-loader",
|
|
34
|
-
"tiktok-pixel",
|
|
35
|
-
"x-pixel"
|
|
36
|
-
],
|
|
37
|
-
"homepage": "https://c15t.com/docs/frameworks/javascript/script-loader",
|
|
3
|
+
"version": "3.0.0-alpha.3",
|
|
4
|
+
"description": "Deprecated v3 compatibility package for @c15t/integrations. Migrate before v4.",
|
|
5
|
+
"homepage": "https://c15t.com/docs/upgrade-v3#rename-the-integrations-dependency",
|
|
38
6
|
"bugs": {
|
|
39
7
|
"url": "https://github.com/c15t/c15t/issues"
|
|
40
8
|
},
|
|
@@ -48,196 +16,12 @@
|
|
|
48
16
|
"dist",
|
|
49
17
|
"dist-types",
|
|
50
18
|
"AGENTS.md",
|
|
19
|
+
"SKILL.md",
|
|
51
20
|
"docs"
|
|
52
21
|
],
|
|
53
22
|
"type": "module",
|
|
54
23
|
"sideEffects": false,
|
|
55
24
|
"exports": {
|
|
56
|
-
"./adobe-analytics": {
|
|
57
|
-
"types": "./dist-types/vendors/analytics/adobe-analytics.d.ts",
|
|
58
|
-
"import": "./dist/vendors/analytics/adobe-analytics.js",
|
|
59
|
-
"default": "./dist/vendors/analytics/adobe-analytics.js"
|
|
60
|
-
},
|
|
61
|
-
"./ahrefs-analytics": {
|
|
62
|
-
"types": "./dist-types/vendors/analytics/ahrefs-analytics.d.ts",
|
|
63
|
-
"import": "./dist/vendors/analytics/ahrefs-analytics.js",
|
|
64
|
-
"default": "./dist/vendors/analytics/ahrefs-analytics.js"
|
|
65
|
-
},
|
|
66
|
-
"./amplitude": {
|
|
67
|
-
"types": "./dist-types/vendors/analytics/amplitude.d.ts",
|
|
68
|
-
"import": "./dist/vendors/analytics/amplitude.js",
|
|
69
|
-
"default": "./dist/vendors/analytics/amplitude.js"
|
|
70
|
-
},
|
|
71
|
-
"./cloudflare-web-analytics": {
|
|
72
|
-
"types": "./dist-types/vendors/analytics/cloudflare-web-analytics.d.ts",
|
|
73
|
-
"import": "./dist/vendors/analytics/cloudflare-web-analytics.js",
|
|
74
|
-
"default": "./dist/vendors/analytics/cloudflare-web-analytics.js"
|
|
75
|
-
},
|
|
76
|
-
"./clearbit": {
|
|
77
|
-
"types": "./dist-types/vendors/analytics/clearbit.d.ts",
|
|
78
|
-
"import": "./dist/vendors/analytics/clearbit.js",
|
|
79
|
-
"default": "./dist/vendors/analytics/clearbit.js"
|
|
80
|
-
},
|
|
81
|
-
"./microsoft-clarity": {
|
|
82
|
-
"types": "./dist-types/vendors/analytics/microsoft-clarity.d.ts",
|
|
83
|
-
"import": "./dist/vendors/analytics/microsoft-clarity.js",
|
|
84
|
-
"default": "./dist/vendors/analytics/microsoft-clarity.js"
|
|
85
|
-
},
|
|
86
|
-
"./databuddy": {
|
|
87
|
-
"types": "./dist-types/vendors/analytics/databuddy.d.ts",
|
|
88
|
-
"import": "./dist/vendors/analytics/databuddy.js",
|
|
89
|
-
"default": "./dist/vendors/analytics/databuddy.js"
|
|
90
|
-
},
|
|
91
|
-
"./fathom-analytics": {
|
|
92
|
-
"types": "./dist-types/vendors/analytics/fathom-analytics.d.ts",
|
|
93
|
-
"import": "./dist/vendors/analytics/fathom-analytics.js",
|
|
94
|
-
"default": "./dist/vendors/analytics/fathom-analytics.js"
|
|
95
|
-
},
|
|
96
|
-
"./heap": {
|
|
97
|
-
"types": "./dist-types/vendors/analytics/heap.d.ts",
|
|
98
|
-
"import": "./dist/vendors/analytics/heap.js",
|
|
99
|
-
"default": "./dist/vendors/analytics/heap.js"
|
|
100
|
-
},
|
|
101
|
-
"./hotjar": {
|
|
102
|
-
"types": "./dist-types/vendors/analytics/hotjar.d.ts",
|
|
103
|
-
"import": "./dist/vendors/analytics/hotjar.js",
|
|
104
|
-
"default": "./dist/vendors/analytics/hotjar.js"
|
|
105
|
-
},
|
|
106
|
-
"./hightouch": {
|
|
107
|
-
"types": "./dist-types/vendors/analytics/hightouch.d.ts",
|
|
108
|
-
"import": "./dist/vendors/analytics/hightouch.js",
|
|
109
|
-
"default": "./dist/vendors/analytics/hightouch.js"
|
|
110
|
-
},
|
|
111
|
-
"./rudderstack": {
|
|
112
|
-
"types": "./dist-types/vendors/analytics/rudderstack.d.ts",
|
|
113
|
-
"import": "./dist/vendors/analytics/rudderstack.js",
|
|
114
|
-
"default": "./dist/vendors/analytics/rudderstack.js"
|
|
115
|
-
},
|
|
116
|
-
"./logrocket": {
|
|
117
|
-
"types": "./dist-types/vendors/analytics/logrocket.d.ts",
|
|
118
|
-
"import": "./dist/vendors/analytics/logrocket.js",
|
|
119
|
-
"default": "./dist/vendors/analytics/logrocket.js"
|
|
120
|
-
},
|
|
121
|
-
"./google-tag": {
|
|
122
|
-
"types": "./dist-types/vendors/analytics/google-tag.d.ts",
|
|
123
|
-
"import": "./dist/vendors/analytics/google-tag.js",
|
|
124
|
-
"default": "./dist/vendors/analytics/google-tag.js"
|
|
125
|
-
},
|
|
126
|
-
"./matomo-analytics": {
|
|
127
|
-
"types": "./dist-types/vendors/analytics/matomo-analytics.d.ts",
|
|
128
|
-
"import": "./dist/vendors/analytics/matomo-analytics.js",
|
|
129
|
-
"default": "./dist/vendors/analytics/matomo-analytics.js"
|
|
130
|
-
},
|
|
131
|
-
"./mixpanel-analytics": {
|
|
132
|
-
"types": "./dist-types/vendors/analytics/mixpanel-analytics.d.ts",
|
|
133
|
-
"import": "./dist/vendors/analytics/mixpanel-analytics.js",
|
|
134
|
-
"default": "./dist/vendors/analytics/mixpanel-analytics.js"
|
|
135
|
-
},
|
|
136
|
-
"./pirsch": {
|
|
137
|
-
"types": "./dist-types/vendors/analytics/pirsch.d.ts",
|
|
138
|
-
"import": "./dist/vendors/analytics/pirsch.js",
|
|
139
|
-
"default": "./dist/vendors/analytics/pirsch.js"
|
|
140
|
-
},
|
|
141
|
-
"./plausible-analytics": {
|
|
142
|
-
"types": "./dist-types/vendors/analytics/plausible-analytics.d.ts",
|
|
143
|
-
"import": "./dist/vendors/analytics/plausible-analytics.js",
|
|
144
|
-
"default": "./dist/vendors/analytics/plausible-analytics.js"
|
|
145
|
-
},
|
|
146
|
-
"./posthog": {
|
|
147
|
-
"types": "./dist-types/vendors/analytics/posthog.d.ts",
|
|
148
|
-
"import": "./dist/vendors/analytics/posthog.js",
|
|
149
|
-
"default": "./dist/vendors/analytics/posthog.js"
|
|
150
|
-
},
|
|
151
|
-
"./promptwatch": {
|
|
152
|
-
"types": "./dist-types/vendors/analytics/promptwatch.d.ts",
|
|
153
|
-
"import": "./dist/vendors/analytics/promptwatch.js",
|
|
154
|
-
"default": "./dist/vendors/analytics/promptwatch.js"
|
|
155
|
-
},
|
|
156
|
-
"./segment": {
|
|
157
|
-
"types": "./dist-types/vendors/analytics/segment.d.ts",
|
|
158
|
-
"import": "./dist/vendors/analytics/segment.js",
|
|
159
|
-
"default": "./dist/vendors/analytics/segment.js"
|
|
160
|
-
},
|
|
161
|
-
"./rybbit-analytics": {
|
|
162
|
-
"types": "./dist-types/vendors/analytics/rybbit-analytics.d.ts",
|
|
163
|
-
"import": "./dist/vendors/analytics/rybbit-analytics.js",
|
|
164
|
-
"default": "./dist/vendors/analytics/rybbit-analytics.js"
|
|
165
|
-
},
|
|
166
|
-
"./umami-analytics": {
|
|
167
|
-
"types": "./dist-types/vendors/analytics/umami-analytics.d.ts",
|
|
168
|
-
"import": "./dist/vendors/analytics/umami-analytics.js",
|
|
169
|
-
"default": "./dist/vendors/analytics/umami-analytics.js"
|
|
170
|
-
},
|
|
171
|
-
"./vercel-analytics": {
|
|
172
|
-
"types": "./dist-types/vendors/analytics/vercel-analytics.d.ts",
|
|
173
|
-
"import": "./dist/vendors/analytics/vercel-analytics.js",
|
|
174
|
-
"default": "./dist/vendors/analytics/vercel-analytics.js"
|
|
175
|
-
},
|
|
176
|
-
"./crisp": {
|
|
177
|
-
"types": "./dist-types/vendors/functional/crisp.d.ts",
|
|
178
|
-
"import": "./dist/vendors/functional/crisp.js",
|
|
179
|
-
"default": "./dist/vendors/functional/crisp.js"
|
|
180
|
-
},
|
|
181
|
-
"./intercom": {
|
|
182
|
-
"types": "./dist-types/vendors/functional/intercom.d.ts",
|
|
183
|
-
"import": "./dist/vendors/functional/intercom.js",
|
|
184
|
-
"default": "./dist/vendors/functional/intercom.js"
|
|
185
|
-
},
|
|
186
|
-
"./cloudflare-zaraz": {
|
|
187
|
-
"types": "./dist-types/vendors/tag-managers/cloudflare-zaraz.d.ts",
|
|
188
|
-
"import": "./dist/vendors/tag-managers/cloudflare-zaraz.js",
|
|
189
|
-
"default": "./dist/vendors/tag-managers/cloudflare-zaraz.js"
|
|
190
|
-
},
|
|
191
|
-
"./google-tag-manager": {
|
|
192
|
-
"types": "./dist-types/vendors/tag-managers/google-tag-manager.d.ts",
|
|
193
|
-
"import": "./dist/vendors/tag-managers/google-tag-manager.js",
|
|
194
|
-
"default": "./dist/vendors/tag-managers/google-tag-manager.js"
|
|
195
|
-
},
|
|
196
|
-
"./linkedin-insights": {
|
|
197
|
-
"types": "./dist-types/vendors/ads-and-pixels/linkedin-insights.d.ts",
|
|
198
|
-
"import": "./dist/vendors/ads-and-pixels/linkedin-insights.js",
|
|
199
|
-
"default": "./dist/vendors/ads-and-pixels/linkedin-insights.js"
|
|
200
|
-
},
|
|
201
|
-
"./meta-pixel": {
|
|
202
|
-
"types": "./dist-types/vendors/ads-and-pixels/meta-pixel.d.ts",
|
|
203
|
-
"import": "./dist/vendors/ads-and-pixels/meta-pixel.js",
|
|
204
|
-
"default": "./dist/vendors/ads-and-pixels/meta-pixel.js"
|
|
205
|
-
},
|
|
206
|
-
"./openai-pixel": {
|
|
207
|
-
"types": "./dist-types/vendors/ads-and-pixels/openai-pixel.d.ts",
|
|
208
|
-
"import": "./dist/vendors/ads-and-pixels/openai-pixel.js",
|
|
209
|
-
"default": "./dist/vendors/ads-and-pixels/openai-pixel.js"
|
|
210
|
-
},
|
|
211
|
-
"./reddit-pixel": {
|
|
212
|
-
"types": "./dist-types/vendors/ads-and-pixels/reddit-pixel.d.ts",
|
|
213
|
-
"import": "./dist/vendors/ads-and-pixels/reddit-pixel.js",
|
|
214
|
-
"default": "./dist/vendors/ads-and-pixels/reddit-pixel.js"
|
|
215
|
-
},
|
|
216
|
-
"./microsoft-uet": {
|
|
217
|
-
"types": "./dist-types/vendors/ads-and-pixels/microsoft-uet.d.ts",
|
|
218
|
-
"import": "./dist/vendors/ads-and-pixels/microsoft-uet.js",
|
|
219
|
-
"default": "./dist/vendors/ads-and-pixels/microsoft-uet.js"
|
|
220
|
-
},
|
|
221
|
-
"./snapchat-pixel": {
|
|
222
|
-
"types": "./dist-types/vendors/ads-and-pixels/snapchat-pixel.d.ts",
|
|
223
|
-
"import": "./dist/vendors/ads-and-pixels/snapchat-pixel.js",
|
|
224
|
-
"default": "./dist/vendors/ads-and-pixels/snapchat-pixel.js"
|
|
225
|
-
},
|
|
226
|
-
"./tiktok-pixel": {
|
|
227
|
-
"types": "./dist-types/vendors/ads-and-pixels/tiktok-pixel.d.ts",
|
|
228
|
-
"import": "./dist/vendors/ads-and-pixels/tiktok-pixel.js",
|
|
229
|
-
"default": "./dist/vendors/ads-and-pixels/tiktok-pixel.js"
|
|
230
|
-
},
|
|
231
|
-
"./x-pixel": {
|
|
232
|
-
"types": "./dist-types/vendors/ads-and-pixels/x-pixel.d.ts",
|
|
233
|
-
"import": "./dist/vendors/ads-and-pixels/x-pixel.js",
|
|
234
|
-
"default": "./dist/vendors/ads-and-pixels/x-pixel.js"
|
|
235
|
-
},
|
|
236
|
-
"./registry": {
|
|
237
|
-
"types": "./dist-types/registry.d.ts",
|
|
238
|
-
"import": "./dist/registry.js",
|
|
239
|
-
"default": "./dist/registry.js"
|
|
240
|
-
},
|
|
241
25
|
"./*": {
|
|
242
26
|
"types": "./dist-types/*.d.ts",
|
|
243
27
|
"import": "./dist/*.js",
|
|
@@ -248,27 +32,19 @@
|
|
|
248
32
|
"access": "public"
|
|
249
33
|
},
|
|
250
34
|
"scripts": {
|
|
251
|
-
"build": "
|
|
35
|
+
"build": "bun build-compat.ts",
|
|
252
36
|
"build:docs": "bun ../../scripts/generate-package-docs.ts @c15t/scripts",
|
|
253
|
-
"check-types": "tsc --noEmit
|
|
254
|
-
"dev": "sh -c 'rslib build --no-dts --no-clean && rslib build --watch --no-dts --no-clean'",
|
|
37
|
+
"check-types": "tsc --noEmit",
|
|
255
38
|
"fmt": "bun oxfmt .",
|
|
256
|
-
"lint": "bun oxlint
|
|
39
|
+
"lint": "bun oxlint build-compat.ts __tests__",
|
|
257
40
|
"prepack": "bun run build:docs",
|
|
258
|
-
"test": "vitest run"
|
|
259
|
-
|
|
260
|
-
|
|
41
|
+
"test": "vitest run"
|
|
42
|
+
},
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"@c15t/integrations": "3.0.0-alpha.3"
|
|
261
45
|
},
|
|
262
46
|
"devDependencies": {
|
|
263
|
-
"@c15t/core": "3.0.0-alpha.2",
|
|
264
47
|
"@c15t/typescript-config": "0.0.1",
|
|
265
|
-
"@c15t/vitest-config": "1.0.0",
|
|
266
|
-
"playwright": "1.58.2",
|
|
267
48
|
"typescript": "7.0.2"
|
|
268
|
-
}
|
|
269
|
-
"browserslist": [
|
|
270
|
-
">0.2%",
|
|
271
|
-
"not dead",
|
|
272
|
-
"not op_mini all"
|
|
273
|
-
]
|
|
49
|
+
}
|
|
274
50
|
}
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
import type { ConsentState, Script, ScriptCallbackInfo } from '@c15t/core';
|
|
2
|
-
import type { BuiltInScriptIntegrationKey } from '../registry.js';
|
|
3
|
-
/**
|
|
4
|
-
* Typed view of `globalThis` used by script helper tests.
|
|
5
|
-
*
|
|
6
|
-
* Additional string-keyed properties model browser and vendor globals created
|
|
7
|
-
* during setup and individual test cases.
|
|
8
|
-
*/
|
|
9
|
-
export type TestGlobal = typeof globalThis & Record<string, unknown>;
|
|
10
|
-
/**
|
|
11
|
-
* Snapshot of the script fields asserted by helper tests.
|
|
12
|
-
*/
|
|
13
|
-
export interface HelperScriptSnapshot {
|
|
14
|
-
/** Unique script identifier generated by the helper under test. */
|
|
15
|
-
id: string;
|
|
16
|
-
/** Consent category associated with the script integration. */
|
|
17
|
-
category: unknown;
|
|
18
|
-
/** Whether the script should load even before optional consent is granted. */
|
|
19
|
-
alwaysLoad?: boolean;
|
|
20
|
-
/** Whether the script stays loaded after consent for its category is revoked. */
|
|
21
|
-
persistAfterConsentRevoked?: boolean;
|
|
22
|
-
/** Remote script URL emitted by the helper, when applicable. */
|
|
23
|
-
src?: string;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Expected integration metadata and script attributes for a helper assertion.
|
|
27
|
-
*/
|
|
28
|
-
export interface ExpectedScriptSnapshot {
|
|
29
|
-
/** Expected `alwaysLoad` flag from the generated helper script. */
|
|
30
|
-
alwaysLoad: boolean | undefined;
|
|
31
|
-
/** Expected consent-revocation persistence flag from the generated script. */
|
|
32
|
-
persistAfterConsentRevoked: boolean | undefined;
|
|
33
|
-
/** Expected remote script URL from the generated helper script. */
|
|
34
|
-
src: string | undefined;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Consent state with only required storage enabled.
|
|
38
|
-
*
|
|
39
|
-
* `necessary` keeps essential storage on, `functionality` covers site
|
|
40
|
-
* preferences, `measurement` controls analytics, `marketing` controls
|
|
41
|
-
* advertising-related storage, and `experience` controls personalization.
|
|
42
|
-
*/
|
|
43
|
-
export declare const deniedConsentState: ConsentState;
|
|
44
|
-
/**
|
|
45
|
-
* Consent state with required and measurement storage enabled.
|
|
46
|
-
*
|
|
47
|
-
* `necessary` keeps essential storage on, `functionality` covers site
|
|
48
|
-
* preferences, `measurement` controls analytics, `marketing` controls
|
|
49
|
-
* advertising-related storage, and `experience` controls personalization.
|
|
50
|
-
*/
|
|
51
|
-
export declare const grantedMeasurementConsentState: ConsentState;
|
|
52
|
-
/**
|
|
53
|
-
* Required callback fields for creating a script lifecycle payload in tests.
|
|
54
|
-
*/
|
|
55
|
-
export type CallbackInfoOverrides = Partial<ScriptCallbackInfo> & Pick<ScriptCallbackInfo, 'id'>;
|
|
56
|
-
/**
|
|
57
|
-
* Creates a fully typed callback payload for script lifecycle tests.
|
|
58
|
-
*
|
|
59
|
-
* Defaults model a denied-consent callback for the same DOM element ID as the
|
|
60
|
-
* script ID, while allowing individual tests to override the relevant fields.
|
|
61
|
-
*/
|
|
62
|
-
export declare const createCallbackInfo: (overrides: CallbackInfoOverrides) => ScriptCallbackInfo;
|
|
63
|
-
export type LifecycleCallbackOverrides = Partial<Omit<ScriptCallbackInfo, 'id'>>;
|
|
64
|
-
export declare const runOnBeforeLoad: (script: Pick<Script, 'id' | 'onBeforeLoad'>, overrides?: LifecycleCallbackOverrides) => void;
|
|
65
|
-
/**
|
|
66
|
-
* Returns a mutable test-friendly reference to the global object.
|
|
67
|
-
*
|
|
68
|
-
* @returns The current global object cast to `TestGlobal`.
|
|
69
|
-
*
|
|
70
|
-
* @example
|
|
71
|
-
* ```ts
|
|
72
|
-
* const globalRef = getTestGlobal();
|
|
73
|
-
* globalRef.dataLayer = [];
|
|
74
|
-
* ```
|
|
75
|
-
*/
|
|
76
|
-
export declare const getTestGlobal: () => TestGlobal;
|
|
77
|
-
/**
|
|
78
|
-
* Registers browser-like setup and teardown hooks for script helper tests.
|
|
79
|
-
*
|
|
80
|
-
* Before each test, this installs mocked `window` and `document` globals.
|
|
81
|
-
* After each test, it unstubs globals and removes vendor-specific globals left
|
|
82
|
-
* behind by script execution.
|
|
83
|
-
*
|
|
84
|
-
* @returns Nothing.
|
|
85
|
-
*
|
|
86
|
-
* @example
|
|
87
|
-
* ```ts
|
|
88
|
-
* describe('googleTagManager', () => {
|
|
89
|
-
* setupScriptHelperTest();
|
|
90
|
-
* });
|
|
91
|
-
* ```
|
|
92
|
-
*/
|
|
93
|
-
export declare const setupScriptHelperTest: () => void;
|
|
94
|
-
/**
|
|
95
|
-
* Asserts that a helper-generated script matches registry metadata and
|
|
96
|
-
* expected script fields.
|
|
97
|
-
*
|
|
98
|
-
* @param key - Built-in integration key used to find the registry entry.
|
|
99
|
-
* @param script - Snapshot of the helper-generated script under test.
|
|
100
|
-
* @param expected - Expected script metadata and output for the assertion.
|
|
101
|
-
* @returns Nothing.
|
|
102
|
-
*
|
|
103
|
-
* @remarks
|
|
104
|
-
* If `key` does not match any built-in integration, the assertion fails before
|
|
105
|
-
* the non-null access is used.
|
|
106
|
-
*
|
|
107
|
-
* @example
|
|
108
|
-
* ```ts
|
|
109
|
-
* expectScriptMatchesIntegration(
|
|
110
|
-
* 'googleTagManager',
|
|
111
|
-
* googleTagManager({ id: 'GTM-123' }),
|
|
112
|
-
* {
|
|
113
|
-
* alwaysLoad: true,
|
|
114
|
-
* persistAfterConsentRevoked: undefined,
|
|
115
|
-
* src: 'https://www.googletagmanager.com/gtm.js?id=GTM-123',
|
|
116
|
-
* }
|
|
117
|
-
* );
|
|
118
|
-
* ```
|
|
119
|
-
*/
|
|
120
|
-
export declare const expectScriptMatchesIntegration: (key: BuiltInScriptIntegrationKey, script: HelperScriptSnapshot, expected: ExpectedScriptSnapshot) => void;
|
|
121
|
-
/**
|
|
122
|
-
* Converts an array-like value into a plain array.
|
|
123
|
-
*
|
|
124
|
-
* @param value - Array-like input such as `arguments`, a `NodeList`, or a
|
|
125
|
-
* vendor queue entry.
|
|
126
|
-
* @returns A new array containing the indexed values from `value`.
|
|
127
|
-
*
|
|
128
|
-
* @remarks
|
|
129
|
-
* Passing `null` or `undefined` throws because `slice` requires an object-like
|
|
130
|
-
* value.
|
|
131
|
-
*
|
|
132
|
-
* @example
|
|
133
|
-
* ```ts
|
|
134
|
-
* function collectArgs(...args: unknown[]) {
|
|
135
|
-
* return toArgumentsArray(args);
|
|
136
|
-
* }
|
|
137
|
-
* ```
|
|
138
|
-
*/
|
|
139
|
-
export declare const toArgumentsArray: (value: unknown) => unknown[];
|
|
140
|
-
export declare const expectGoogleConsentDefault: (entry: unknown) => void;
|
|
141
|
-
export declare const expectStubCommandQueue: (stub: unknown, queueKey: string, commands: unknown[][]) => void;
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: JavaScript script loading
|
|
3
|
-
description: Attach a script loader to the consent kernel and dispose it with
|
|
4
|
-
the application.
|
|
5
|
-
group: frameworks
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
## Attach the loader before initialization
|
|
9
|
-
|
|
10
|
-
Install `@c15t/scripts` alongside `c15t`. This browser example adds a
|
|
11
|
-
marketing integration to a hosted kernel:
|
|
12
|
-
|
|
13
|
-
```ts
|
|
14
|
-
import { createConsentKernel, createHostedTransport } from 'c15t';
|
|
15
|
-
import { createPersistence } from 'c15t/modules/persistence';
|
|
16
|
-
import { createScriptLoader } from 'c15t/modules/script-loader';
|
|
17
|
-
import { metaPixel } from '@c15t/scripts/meta-pixel';
|
|
18
|
-
|
|
19
|
-
const kernel = createConsentKernel({
|
|
20
|
-
transport: createHostedTransport({ backendURL: 'https://your-project.inth.app' }),
|
|
21
|
-
});
|
|
22
|
-
const persistence = createPersistence({ kernel });
|
|
23
|
-
const loader = createScriptLoader({ kernel, scripts: [metaPixel({ pixelId: '123456789012345' })] });
|
|
24
|
-
await kernel.commands.init();
|
|
25
|
-
|
|
26
|
-
function dispose() {
|
|
27
|
-
loader.dispose();
|
|
28
|
-
persistence.dispose();
|
|
29
|
-
kernel.dispose();
|
|
30
|
-
}
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
Replace the URL and pixel ID. Call `dispose()` when your application tears down.
|
|
34
|
-
The headless kernel does not render a banner; connect a policy-aware UI before
|
|
35
|
-
shipping this integration. A framework provider already manages these modules,
|
|
36
|
-
so do not attach a second loader to a provider-owned kernel.
|
|
37
|
-
|
|
38
|
-
## Keep one owner per vendor
|
|
39
|
-
|
|
40
|
-
Use stable script IDs and remove the vendor's original snippet. Ordinary scripts
|
|
41
|
-
wait for effective permission. Helpers with `alwaysLoad` instead load and signal
|
|
42
|
-
permission through the vendor API. Read the individual integration guide before
|
|
43
|
-
assuming all helpers have the same network behavior.
|
|
44
|
-
|
|
45
|
-
The loader exposes `updateScripts`, `getLoadedScriptIds` and `dispose`.
|
|
46
|
-
Unloading an element cannot reverse requests or code that already ran. Test
|
|
47
|
-
revocation and vendor cleanup with [verification](../../guides/verify-consent.md).
|
|
48
|
-
|
|
49
|
-
## Dispose integration resources
|
|
50
|
-
|
|
51
|
-
Ordinary scripts keep their mounted resource when `updateScripts` receives a
|
|
52
|
-
fresh object with the same ID and unchanged element configuration. New callback
|
|
53
|
-
functions alone do not reload the vendor or send a temporary denial. Changing
|
|
54
|
-
the source, inline code or element attributes starts a new loading lifecycle.
|
|
55
|
-
Consent conditions are reevaluated on every configuration update. Pending
|
|
56
|
-
load and error events use the latest registered callbacks and consent state.
|
|
57
|
-
Setting `persistAfterConsentRevoked` to `false` removes an owned retained element
|
|
58
|
-
when the script no longer has consent.
|
|
59
|
-
|
|
60
|
-
Custom script configurations can use `onDispose(info)` to release event
|
|
61
|
-
listeners or other resources. Adding this hook opts the configuration into an
|
|
62
|
-
object-owned lifecycle: replacing the object disposes its resources and starts
|
|
63
|
-
again, even with the same ID. Keep these objects stable across framework
|
|
64
|
-
rerenders. The loader also calls the hook when the configuration is removed or
|
|
65
|
-
the loader is disposed, including configurations that never loaded.
|
|
66
|
-
`info.element` contains the last loaded or retained element when available,
|
|
67
|
-
even when configuration removal has already detached it.
|
|
68
|
-
|
|
69
|
-
Duplicate references receive one cleanup per registration. Re-registering a
|
|
70
|
-
removed object starts a new lifecycle. Updates requested from lifecycle
|
|
71
|
-
callbacks run after the current pass; if several are requested, the latest
|
|
72
|
-
configuration wins. Disposal stops further reconciliation. A callback feedback
|
|
73
|
-
loop exceeding 100 consecutive passes disposes the loader and reports an
|
|
74
|
-
`error` debug event. Avoid callbacks that keep changing consent or replacing
|
|
75
|
-
their own configuration.
|
|
76
|
-
|
|
77
|
-
`onBeforeLoad` prepares a loading attempt. If a callback changes consent or
|
|
78
|
-
replaces configurations, the loader cancels that attempt before loading and
|
|
79
|
-
reevaluates the latest state. A still-eligible script can retry preparation
|
|
80
|
-
with a new element and updated consent. Make `onBeforeLoad` safe to repeat;
|
|
81
|
-
use `onLoad` for initialization that requires a completed load. This also
|
|
82
|
-
applies to callback-only scripts, whose `onLoad` is skipped when preparation
|
|
83
|
-
invalidates the current pass.
|
|
84
|
-
|
|
85
|
-
Consent revocation alone does not call `onDispose`. Use `onConsentChange` for
|
|
86
|
-
vendor opt-out commands. Cleanup errors are reported through the loader's debug
|
|
87
|
-
events and do not prevent other configurations from being cleaned up.
|
|
88
|
-
|
|
89
|
-
## Clear stored tracking data
|
|
90
|
-
|
|
91
|
-
Script gating does not remove cookies or Web Storage entries that a script
|
|
92
|
-
already wrote. Configure [clear on revocation](../../integrations/clear-on-revocation.md)
|
|
93
|
-
on your runtime, or attach its module to your existing kernel, to remove
|
|
94
|
-
declared data when its category is denied.
|