@c15t/react 3.1.0 → 3.2.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 +35 -5
- package/README.md +2 -2
- package/dist/component-hooks/use-consent-gate.js +2 -0
- package/dist/component-hooks/use-consent-labels.js +2 -0
- package/dist/component-hooks/use-consent-text-direction.js +2 -0
- package/dist/component-hooks/use-vendors-listed-under.js +2 -0
- package/dist/components/consent-gate/atoms.js +1 -1
- package/dist/components/consent-gate/consent-gate.js +1 -1
- package/dist/components/iab-prompt/atoms/root.js +1 -1
- package/dist/components/panel-trigger/atoms/toolbar.js +1 -1
- package/dist/components/preferences/atoms/button.js +1 -1
- package/dist/components/preferences/atoms/vendor-list.js +1 -1
- package/dist/components/prompt/atoms/root.js +1 -1
- package/dist/components/prompt/components.js +1 -1
- package/dist/components/prompt/policy-actions.js +1 -1
- package/dist/components/prompt/prompt.js +1 -1
- package/dist/components/prompt/surface-context.js +1 -1
- package/dist/components/prompt/use-banner-copy.js +1 -1
- package/dist/components/shared/streamed-surface.js +1 -1
- package/dist/headless.js +1 -1
- package/dist/index-parts/offline.js +1 -1
- package/dist/modes.js +1 -1
- package/dist/styles.tw3.css +2 -2
- package/dist/transports/offline.js +1 -1
- package/dist/version.js +1 -1
- package/dist-types/component-hooks/use-consent-gate.d.ts +102 -0
- package/dist-types/component-hooks/use-consent-labels.d.ts +32 -0
- package/dist-types/component-hooks/use-consent-text-direction.d.ts +22 -0
- package/dist-types/component-hooks/use-vendors-listed-under.d.ts +30 -0
- package/dist-types/components/prompt/atoms/root.d.ts +3 -3
- package/dist-types/components/prompt/prompt.d.ts +4 -3
- package/dist-types/components/prompt/surface-context.d.ts +1 -14
- package/dist-types/components/prompt/use-banner-copy.d.ts +8 -3
- package/dist-types/components/shared/streamed-surface.d.ts +47 -10
- package/dist-types/headless.d.ts +10 -1
- package/dist-types/hooks/use-iab-policy-guard.d.ts +17 -1
- package/dist-types/hooks/use-scroll-lock.d.ts +16 -2
- package/dist-types/index-parts/offline.d.ts +1 -1
- package/dist-types/modes.d.ts +1 -1
- package/dist-types/module-hooks/script-loader.d.ts +9 -0
- package/dist-types/provider.d.ts +3 -3
- package/dist-types/transports/offline.d.ts +2 -2
- package/dist-types/version.d.ts +1 -1
- package/docs/README.md +35 -5
- package/docs/concepts/choose-your-setup.md +9 -9
- package/docs/concepts/consent-state.md +81 -9
- package/docs/concepts/data-fetching.md +30 -23
- package/docs/concepts/modes.md +87 -35
- package/docs/customization/recipes.md +4 -4
- package/docs/customization/stylesheets.md +42 -3
- package/docs/customization/tailwind.md +17 -34
- package/docs/customization/translations.md +18 -12
- package/docs/frameworks/react/clear-on-revocation.md +3 -2
- package/docs/frameworks/react/components/consent-banner.md +3 -3
- package/docs/frameworks/react/components/consent-provider.md +29 -29
- package/docs/frameworks/react/gpp.md +1 -1
- package/docs/frameworks/react/headless.md +146 -19
- package/docs/frameworks/react/hooks.md +2 -1
- package/docs/frameworks/react/iab.md +8 -1
- package/docs/frameworks/react/quickstart.md +2 -2
- package/docs/frameworks/react/rendering.md +1 -1
- package/docs/frameworks/react/translations.md +9 -9
- package/docs/frameworks/react/troubleshooting.md +1 -1
- package/docs/frameworks/react/upgrade-v3.md +39 -32
- package/docs/frameworks/react/vendor-consent.md +5 -0
- package/docs/guides/banner-experiments.md +3 -3
- package/docs/guides/troubleshooting.md +3 -2
- package/docs/integrations/activecampaign.md +297 -0
- package/docs/integrations/ada.md +396 -0
- package/docs/integrations/adobe-analytics.md +2 -2
- package/docs/integrations/adobe-target.md +460 -0
- package/docs/integrations/adroll.md +336 -0
- package/docs/integrations/ahrefs-analytics.md +2 -2
- package/docs/integrations/amazon-ads.md +424 -0
- package/docs/integrations/amplitude.md +2 -2
- package/docs/integrations/appcues.md +368 -0
- package/docs/integrations/attentive.md +313 -0
- package/docs/integrations/building-integrations.md +29 -16
- package/docs/integrations/clay.md +305 -0
- package/docs/integrations/clearbit.md +3 -3
- package/docs/integrations/cloudflare-web-analytics.md +2 -2
- package/docs/integrations/cloudflare-zaraz.md +2 -2
- package/docs/integrations/crisp.md +2 -2
- package/docs/integrations/customer-io.md +369 -0
- package/docs/integrations/databuddy.md +127 -52
- package/docs/integrations/default-com.md +497 -0
- package/docs/integrations/dynamic-yield.md +373 -0
- package/docs/integrations/fathom-analytics.md +2 -2
- package/docs/integrations/front-chat.md +2 -2
- package/docs/integrations/fullstory.md +298 -0
- package/docs/integrations/gainsight-px.md +418 -0
- package/docs/integrations/google-maps.md +2 -2
- package/docs/integrations/google-tag-manager.md +59 -2
- package/docs/integrations/google-tag.md +2 -2
- package/docs/integrations/gorgias.md +365 -0
- package/docs/integrations/heap.md +2 -2
- package/docs/integrations/hightouch.md +2 -2
- package/docs/integrations/hotjar.md +40 -26
- package/docs/integrations/hubspot.md +529 -0
- package/docs/integrations/insider.md +550 -0
- package/docs/integrations/intercom.md +2 -2
- package/docs/integrations/klaviyo.md +2 -2
- package/docs/integrations/linkedin-insights.md +2 -2
- package/docs/integrations/liveintent.md +327 -0
- package/docs/integrations/logrocket.md +2 -2
- package/docs/integrations/lucky-orange.md +336 -0
- package/docs/integrations/marketo.md +309 -0
- package/docs/integrations/matomo-analytics.md +2 -2
- package/docs/integrations/meta-pixel.md +2 -2
- package/docs/integrations/microsoft-clarity.md +2 -2
- package/docs/integrations/microsoft-uet.md +2 -2
- package/docs/integrations/mixpanel-analytics.md +2 -2
- package/docs/integrations/one-dollar-stats.md +2 -2
- package/docs/integrations/openai-pixel.md +2 -2
- package/docs/integrations/optimizely.md +411 -0
- package/docs/integrations/oracle-eloqua.md +301 -0
- package/docs/integrations/overview.md +128 -81
- package/docs/integrations/pendo.md +339 -0
- package/docs/integrations/pinterest-tag.md +2 -2
- package/docs/integrations/pirsch.md +2 -2
- package/docs/integrations/plausible-analytics.md +2 -2
- package/docs/integrations/posthog.md +2 -2
- package/docs/integrations/promptwatch.md +2 -2
- package/docs/integrations/rb2b.md +363 -0
- package/docs/integrations/reddit-pixel.md +2 -2
- package/docs/integrations/rudderstack.md +2 -2
- package/docs/integrations/rybbit-analytics.md +2 -2
- package/docs/integrations/salesforce-pardot.md +342 -0
- package/docs/integrations/segment.md +2 -2
- package/docs/integrations/sentry.md +2 -2
- package/docs/integrations/shopify.md +323 -0
- package/docs/integrations/snapchat-pixel.md +2 -2
- package/docs/integrations/statable-analytics.md +345 -0
- package/docs/integrations/the-trade-desk.md +328 -0
- package/docs/integrations/tiktok-pixel.md +2 -2
- package/docs/integrations/umami-analytics.md +2 -2
- package/docs/integrations/vector.md +333 -0
- package/docs/integrations/vercel-analytics.md +2 -2
- package/docs/integrations/vercel-speed-insights.md +7 -2
- package/docs/integrations/wisepops.md +416 -0
- package/docs/integrations/x-pixel.md +2 -2
- package/docs/integrations/youtube.md +2 -2
- package/docs/integrations/zendesk.md +359 -0
- package/package.json +10 -32
- package/dist/components/prompt/resolve-banner-primary-actions.js +0 -1
- package/dist-types/components/prompt/resolve-banner-primary-actions.d.ts +0 -14
package/dist-types/provider.d.ts
CHANGED
|
@@ -66,20 +66,20 @@ export interface ConsentProviderOptions extends ConsentControlOptions, Pick<Reac
|
|
|
66
66
|
/**
|
|
67
67
|
* Transport factory the provider builds its kernel with. Required.
|
|
68
68
|
*
|
|
69
|
-
* Pass `hosted()` to talk to a c15t backend, `
|
|
69
|
+
* Pass `hosted()` to talk to a c15t backend, `local()` to resolve
|
|
70
70
|
* policies locally with no network, or `custom()` to supply your own
|
|
71
71
|
* kernel transport. This is an initial-only
|
|
72
72
|
* option: remount the provider to change it.
|
|
73
73
|
*
|
|
74
74
|
* @example
|
|
75
75
|
* ```tsx
|
|
76
|
-
* import { ConsentProvider, hosted,
|
|
76
|
+
* import { ConsentProvider, hosted, local } from '@c15t/react';
|
|
77
77
|
*
|
|
78
78
|
* <ConsentProvider options={{ mode: hosted({ backendURL: '/api/c15t' }) }}>
|
|
79
79
|
* {children}
|
|
80
80
|
* </ConsentProvider>
|
|
81
81
|
*
|
|
82
|
-
* <ConsentProvider options={{ mode:
|
|
82
|
+
* <ConsentProvider options={{ mode: local() }}>{children}</ConsentProvider>
|
|
83
83
|
* ```
|
|
84
84
|
*/
|
|
85
85
|
mode: ProviderTransportFactory;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Local mode for the React provider: core's `local()`, which resolves
|
|
3
3
|
* policy rules locally and switches copy when `overrides.language` or
|
|
4
4
|
* `useSetLanguage()` names a language the bundle or `i18n.messages` has.
|
|
5
5
|
* The language a server prefetch detected from `Accept-Language` keeps the
|
|
6
6
|
* startup copy.
|
|
7
7
|
*/
|
|
8
|
-
export { offline } from '@c15t/core';
|
|
8
|
+
export { local, offline } from '@c15t/core';
|
|
9
9
|
export type { OfflineModeOptions } from '@c15t/core';
|
package/dist-types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "3.
|
|
1
|
+
export declare const version = "3.2.0";
|
package/docs/README.md
CHANGED
|
@@ -39,7 +39,7 @@ These docs describe c15t v3. Find your app's row in Choose your setup, then foll
|
|
|
39
39
|
- [Customize](./frameworks/react/customize.md): Change the colors, fonts, layout, button styles and copy of the c15t banner and dialog in a React app with theme tokens, provider options and slots, and load the stylesheet yourself when you need to.
|
|
40
40
|
- [Embeds](./frameworks/react/embeds.md): Keep YouTube videos, maps and other iframes out of a React page until their consent category is allowed, with ConsentGate or the iframe blocker in ConsentProvider.
|
|
41
41
|
- [IAB GPP](./frameworks/react/gpp.md): Add the IAB Global Privacy Platform API (__gpp) to a React app with ConsentGPP from @c15t/react/gpp, so ad tech can read US state opt-outs and the TCF EU consent string.
|
|
42
|
-
- [Headless](./frameworks/react/headless.md): Build a custom consent banner in React with the c15t/react/headless hooks inside your ConsentProvider.
|
|
42
|
+
- [Headless](./frameworks/react/headless.md): Build a custom consent banner or embed gate in React with the c15t/react/headless hooks inside your ConsentProvider.
|
|
43
43
|
- [Hooks](./frameworks/react/hooks.md): Gate features and save consent choices in React components with the focused hooks exported from c15t/react.
|
|
44
44
|
- [IAB TCF](./frameworks/react/iab.md): Mount the IAB TCF banner and dialog inside a React ConsentProvider and configure the CMP ID, policy and vendor data.
|
|
45
45
|
- [Network blocker](./frameworks/react/network-blocker.md): Hold fetch and XMLHttpRequest calls in a React app until their consent category is allowed, with networkBlocker rules in the ConsentProvider options.
|
|
@@ -56,9 +56,9 @@ These docs describe c15t v3. Find your app's row in Choose your setup, then foll
|
|
|
56
56
|
- [Choose your setup](./concepts/choose-your-setup.md): Pick the c15t setup for your framework, rendering mode and hosting, and decide who runs the consent backend.
|
|
57
57
|
- [Consent categories](./concepts/consent-categories.md): Assign scripts, embeds and features to c15t consent categories, and understand which categories the preference dialog shows.
|
|
58
58
|
- [Consent state reference](./concepts/consent-state.md): How c15t saves choices, gates IAB vendors, hydrates server records and keeps browser tabs and storage in step.
|
|
59
|
-
- [Data fetching](./concepts/data-fetching.md): Choose the recommended build-time policy snapshot or runtime manifest fetching, backend /init, browser resolution or
|
|
59
|
+
- [Data fetching](./concepts/data-fetching.md): Choose the recommended build-time policy snapshot or runtime manifest fetching, backend /init, browser resolution or local rules, and understand where consent choices are saved.
|
|
60
60
|
- [How consent works](./concepts/how-consent-works.md): What c15t decides on each page load, the difference between a permission and a recorded choice, and what happens when a visitor saves.
|
|
61
|
-
- [Consent modes](./concepts/modes.md): Reference for manifest(), hosted() and
|
|
61
|
+
- [Consent modes](./concepts/modes.md): Reference for manifest(), hosted() and local() in every c15t framework package, where each one resolves the visitor's policy, what it adds to first-load JavaScript, the build-time manifest fetch and its failure policy, and the backend URL variable each framework reads.
|
|
62
62
|
- [Policies](./concepts/policies.md): How policy models, prompts and scope decide what c15t asks visitors, where to change the rules, and why a banner may not appear.
|
|
63
63
|
|
|
64
64
|
## Guides
|
|
@@ -82,27 +82,46 @@ These docs describe c15t v3. Find your app's row in Choose your setup, then foll
|
|
|
82
82
|
|
|
83
83
|
## Integrations
|
|
84
84
|
|
|
85
|
+
- [ActiveCampaign](./integrations/activecampaign.md): Load ActiveCampaign after marketing consent, configure its tracking settings, and verify loading and withdrawal with c15t.
|
|
86
|
+
- [Ada](./integrations/ada.md): Load Ada Messaging after functionality consent with the c15t ada helper, configure regional Agents, and stop the widget when consent is revoked.
|
|
85
87
|
- [Adobe Analytics](./integrations/adobe-analytics.md): Load an Adobe Data Collection Tags property only after measurement consent with the c15t adobeAnalytics helper, and check its extensions in DevTools.
|
|
88
|
+
- [Adobe Target](./integrations/adobe-target.md): Gate a self-hosted Adobe Target at.js download or Adobe Experience Platform Web SDK on experience consent, send consent updates and check revocation limits.
|
|
89
|
+
- [AdRoll](./integrations/adroll.md): Load AdRoll with c15t after marketing consent and verify its loader, storage and revocation behavior.
|
|
86
90
|
- [Ahrefs Analytics](./integrations/ahrefs-analytics.md): Load Ahrefs Web Analytics only after measurement consent with the c15t ahrefsAnalytics helper, and check it in DevTools.
|
|
91
|
+
- [Amazon Ads](./integrations/amazon-ads.md): Load Amazon Ads with c15t after marketing consent and verify its loader, storage and revocation behavior.
|
|
87
92
|
- [Amplitude](./integrations/amplitude.md): Load the Amplitude Browser SDK 2 only after measurement consent with the c15t amplitude helper, which opts the SDK out on revocation and back in on a new grant.
|
|
93
|
+
- [Appcues](./integrations/appcues.md): Load Appcues onboarding flows after experience consent, configure US or EU accounts, and reset the visitor on revocation.
|
|
94
|
+
- [Attentive](./integrations/attentive.md): Load the Attentive tag only after marketing consent with the c15t attentiveTag helper, and check its requests and storage in DevTools.
|
|
88
95
|
- [Custom integrations](./integrations/building-integrations.md): Gate a vendor that has no @c15t/integrations helper, or sync consent with an SDK your app already loads, using a c15t script configuration.
|
|
96
|
+
- [Clay](./integrations/clay.md): Load Clay web intent only after marketing consent and understand its storage and revocation limits.
|
|
89
97
|
- [Clearbit](./integrations/clearbit.md): Load the Clearbit enrichment tag only after marketing consent with the c15t clearbit helper, and check it in DevTools.
|
|
90
98
|
- [Cloudflare Web Analytics](./integrations/cloudflare-web-analytics.md): Load the Cloudflare Web Analytics beacon only after measurement consent with the c15t cloudflareWebAnalytics helper, and check it in DevTools.
|
|
91
99
|
- [Cloudflare Zaraz](./integrations/cloudflare-zaraz.md): Sync c15t permissions to Cloudflare Zaraz purposes with the c15t cloudflareZaraz bridge, which runs on every page without loading a script, and check the tools it controls.
|
|
92
100
|
- [Crisp](./integrations/crisp.md): Load the Crisp chat widget only after functionality consent with the c15t crisp helper, pass its runtime settings and check it in DevTools.
|
|
93
|
-
- [
|
|
101
|
+
- [Customer.io](./integrations/customer-io.md): Load Customer.io Data Pipelines only after marketing consent with the c15t customerIo helper, set up a proxy, and check withdrawal.
|
|
102
|
+
- [Databuddy](./integrations/databuddy.md): Load Databuddy only after measurement consent with the c15t databuddy helper, turn off tracking features you do not use, record sessions with the replay option, and check revocation in DevTools.
|
|
103
|
+
- [Default](./integrations/default-com.md): Load the Default Pixel after measurement consent or the standalone Forms SDK after functionality consent, configure loading and understand withdrawal limits.
|
|
104
|
+
- [Dynamic Yield](./integrations/dynamic-yield.md): Load Dynamic Yield personalization scripts after experience consent, set the page context and synchronize Active Cookie Consent with c15t.
|
|
94
105
|
- [Fathom Analytics](./integrations/fathom-analytics.md): Load Fathom Analytics only after measurement consent with the c15t fathomAnalytics helper, set its SPA mode, and check it in DevTools.
|
|
95
106
|
- [Front Chat](./integrations/front-chat.md): Load the Front Chat widget only after functionality consent with the c15t frontChat helper, forward CSP nonces, clear the session on revocation and check it in DevTools.
|
|
107
|
+
- [FullStory](./integrations/fullstory.md): Load FullStory after measurement consent, configure its tracking settings, and verify loading and withdrawal with c15t.
|
|
108
|
+
- [Gainsight PX](./integrations/gainsight-px.md): Gate Gainsight PX product analytics and in-app engagements on consent, configure the aptrinsic snippet and disable tracking when consent is withdrawn.
|
|
96
109
|
- [Google Maps](./integrations/google-maps.md): Gate a Google Maps iframe embed with c15t v3 so the map loads only after the visitor allows its consent category, in Next.js, TanStack Start, React, Nuxt, Vue, Astro, Svelte, SvelteKit, HTML or JavaScript.
|
|
97
110
|
- [Google Tag](./integrations/google-tag.md): Load gtag.js for Google Analytics or Google Ads before or after consent with c15t Consent Mode v2 signals, and verify the consent commands in DevTools.
|
|
98
111
|
- [Google Tag Manager](./integrations/google-tag-manager.md): Load a Google Tag Manager container before or after consent with c15t Consent Mode v2 signals, configure consent checks inside the container, and verify both in DevTools.
|
|
112
|
+
- [Gorgias Chat](./integrations/gorgias.md): Load Gorgias Chat after functionality consent, disable its Segment analytics when measurement is denied, and verify loading and revocation with c15t.
|
|
99
113
|
- [Heap](./integrations/heap.md): Load the Heap config script and heap.js only after measurement consent with the c15t heap helper, and check it in DevTools.
|
|
100
114
|
- [Hightouch](./integrations/hightouch.md): Load the Hightouch Events browser SDK only after measurement consent with the c15t hightouch helper, and check page events in DevTools.
|
|
101
115
|
- [Hotjar](./integrations/hotjar.md): Load Hotjar only after measurement consent with the c15t hotjar helper, and check its loader and recordings in DevTools.
|
|
116
|
+
- [HubSpot](./integrations/hubspot.md): Gate HubSpot's tracking code on marketing consent, forward c15t categories and enable chat only after functionality consent.
|
|
117
|
+
- [Insider One](./integrations/insider.md): Load Insider One after consent with current user attributes, currency and page context through the c15t insiderTag helper.
|
|
102
118
|
- [Intercom](./integrations/intercom.md): Load the Intercom messenger only after functionality consent with the c15t intercom helper, set its region and check it in DevTools.
|
|
103
119
|
- [Klaviyo](./integrations/klaviyo.md): Load Klaviyo signup forms and onsite tracking only after marketing and measurement consent with the c15t klaviyo helper, gate your own events, and check it in DevTools.
|
|
104
120
|
- [LinkedIn Insight Tag](./integrations/linkedin-insights.md): Load the LinkedIn Insight Tag only after marketing consent with the c15t linkedinInsights helper, guard lintrk conversion calls, and check it in DevTools.
|
|
121
|
+
- [LiveIntent](./integrations/liveintent.md): Load LiveIntent with c15t after marketing consent and verify its loader, storage and revocation behavior.
|
|
105
122
|
- [LogRocket](./integrations/logrocket.md): Load LogRocket session replay only after measurement consent with the c15t logRocket helper, including proxied setups, and check it in DevTools.
|
|
123
|
+
- [Lucky Orange](./integrations/lucky-orange.md): Load Lucky Orange after measurement consent, configure its tracking settings, and verify loading and withdrawal with c15t.
|
|
124
|
+
- [Marketo Munchkin](./integrations/marketo.md): Load Adobe Marketo Munchkin after marketing consent, configure its account and cookie options, and verify tracking and revocation with c15t.
|
|
106
125
|
- [Matomo Analytics](./integrations/matomo-analytics.md): Load Matomo after measurement consent with the c15t matomoAnalytics helper, or use Matomo's own consent mode, and check each mode in DevTools.
|
|
107
126
|
- [Meta Pixel](./integrations/meta-pixel.md): Load the Meta Pixel only after marketing consent with the c15t metaPixel helper, guard fbq event calls, and check it in DevTools.
|
|
108
127
|
- [Microsoft Clarity](./integrations/microsoft-clarity.md): Load Microsoft Clarity only after measurement consent with the c15t clarity helper, send Consent V2 storage signals and check them in DevTools.
|
|
@@ -110,21 +129,32 @@ These docs describe c15t v3. Find your app's row in Choose your setup, then foll
|
|
|
110
129
|
- [Mixpanel](./integrations/mixpanel-analytics.md): Load the Mixpanel SDK on every page with the c15t mixpanelAnalytics helper, which switches Mixpanel tracking on and off with measurement consent, and check it in DevTools.
|
|
111
130
|
- [OneDollarStats](./integrations/one-dollar-stats.md): Load the OneDollarStats tracker only after measurement consent with the c15t oneDollarStats helper, forward its data-attribute settings, and check it in DevTools.
|
|
112
131
|
- [OpenAI Pixel](./integrations/openai-pixel.md): Load the ChatGPT Ads Measurement Pixel only after marketing consent with the c15t openaiPixel helper, guard oaiq conversion calls, and check it in DevTools.
|
|
113
|
-
- [
|
|
132
|
+
- [Optimizely](./integrations/optimizely.md): Load Optimizely Web Experimentation and Personalization after experience consent with c15t, choose a consent category and understand revocation limits.
|
|
133
|
+
- [Oracle Eloqua](./integrations/oracle-eloqua.md): Load Oracle Eloqua after mapped category and vendor consent, configure its tracking settings, and verify loading and withdrawal with c15t.
|
|
134
|
+
- [Integrations](./integrations/overview.md): Find c15t integrations for analytics, replay, monitoring, experimentation, personalization, ads, data, chat and embeds.
|
|
135
|
+
- [Pendo](./integrations/pendo.md): Load Pendo after measurement consent, configure its tracking settings, and verify loading and withdrawal with c15t.
|
|
114
136
|
- [Pinterest Tag](./integrations/pinterest-tag.md): Load the Pinterest Tag only after marketing consent with the c15t pinterestTag helper, guard pintrk event calls, and check it in DevTools.
|
|
115
137
|
- [Pirsch](./integrations/pirsch.md): Load Pirsch Analytics only after measurement consent with the c15t pirsch helper, keep custom event bindings working, and check it in DevTools.
|
|
116
138
|
- [Plausible Analytics](./integrations/plausible-analytics.md): Load the Plausible Analytics tracker only after measurement consent with the c15t plausibleAnalytics helper, and check it in DevTools.
|
|
117
139
|
- [PostHog](./integrations/posthog.md): Load PostHog before or after measurement consent with the c15t posthog helper, choose its cookieless behavior, turn off PostHog modules you do not use, and sync consent with an SDK you already initialize.
|
|
118
140
|
- [Promptwatch](./integrations/promptwatch.md): Load the Promptwatch attribution client only after measurement consent with the c15t promptwatch helper, and check it in DevTools.
|
|
141
|
+
- [RB2B](./integrations/rb2b.md): Load RB2B only after marketing consent with the c15t rb2b helper, and check its loader URL, page views and revocation.
|
|
119
142
|
- [Reddit Pixel](./integrations/reddit-pixel.md): Load the Reddit Pixel only after marketing consent with the c15t redditPixel helper, guard rdt conversion calls, and check it in DevTools.
|
|
120
143
|
- [RudderStack](./integrations/rudderstack.md): Load the RudderStack JavaScript SDK after measurement consent with the c15t rudderstack helper, or map c15t categories to destination consent IDs, and check each mode.
|
|
121
144
|
- [Rybbit Analytics](./integrations/rybbit-analytics.md): Load Rybbit Analytics only after measurement consent with the c15t rybbitAnalytics helper, map its tracking options to data attributes, and check it in DevTools.
|
|
145
|
+
- [Salesforce Account Engagement](./integrations/salesforce-pardot.md): Gate Salesforce Account Engagement tracking on marketing consent, configure its consent API or classic Pardot snippet, and verify revocation with c15t.
|
|
122
146
|
- [Segment](./integrations/segment.md): Load Segment Analytics.js only after measurement consent with the c15t segment helper, guard your own track and identify calls, and check it in DevTools.
|
|
123
147
|
- [Sentry](./integrations/sentry.md): Configure Sentry's CDN or your own SDK with consent for error monitoring, Session Replay and user data.
|
|
148
|
+
- [Shopify](./integrations/shopify.md): Send c15t consent to Shopify's Customer Privacy API from a Hydrogen storefront, so Shopify analytics wait for the visitor's choice and follow each later change.
|
|
124
149
|
- [Snapchat Pixel](./integrations/snapchat-pixel.md): Load the Snapchat Pixel only after marketing consent with the c15t snapchatPixel helper, guard snaptr event calls, and check it in DevTools.
|
|
150
|
+
- [Statable](./integrations/statable-analytics.md): Load Statable analytics after measurement consent with the c15t statableAnalytics helper, configure its ingestion endpoint, and verify requests and browser storage.
|
|
151
|
+
- [The Trade Desk](./integrations/the-trade-desk.md): Load The Trade Desk with c15t after marketing consent and verify its loader, storage and revocation behavior.
|
|
125
152
|
- [TikTok Pixel](./integrations/tiktok-pixel.md): Load the TikTok Pixel only after marketing consent with the c15t tiktokPixel helper, guard ttq event calls, and check it in DevTools.
|
|
126
153
|
- [Umami Analytics](./integrations/umami-analytics.md): Load the Umami Analytics tracker only after measurement consent with the c15t umamiAnalytics helper, point it at a self-hosted instance, and check it in DevTools.
|
|
154
|
+
- [Vector](./integrations/vector.md): Load the Vector pixel only after marketing consent with the c15t vector helper, and check its queue, storage and revocation.
|
|
127
155
|
- [Vercel Analytics](./integrations/vercel-analytics.md): Load the Vercel Web Analytics script only after measurement consent with the c15t vercelAnalytics helper, choose the debug script, and check it in DevTools.
|
|
128
156
|
- [Vercel Speed Insights](./integrations/vercel-speed-insights.md): Load the Vercel Speed Insights collector only after measurement consent with the c15t vercelSpeedInsights helper, drop Web Vitals reports on revocation, and check it in DevTools.
|
|
157
|
+
- [Wisepops](./integrations/wisepops.md): Load Wisepops popups, bars, embeds and notification feeds after marketing consent with c15t. Configure its site ID, cookie options and reload behavior.
|
|
129
158
|
- [X Pixel](./integrations/x-pixel.md): Load the X Pixel only after marketing consent with the c15t xPixel helper, guard twq conversion events, and check it in DevTools.
|
|
130
159
|
- [YouTube](./integrations/youtube.md): Gate YouTube embeds with c15t v3 in Next.js, TanStack Start, React, Nuxt, Vue, Astro, Svelte, SvelteKit or JavaScript.
|
|
160
|
+
- [Zendesk Messaging](./integrations/zendesk.md): Load the Zendesk Messaging Web Widget after functionality consent, map measurement consent to its cookie ranges and clear widget storage on revocation.
|
|
@@ -45,11 +45,11 @@ and subscribe to it from your components.
|
|
|
45
45
|
The backend supplies policies and stores consent records. Every setup above
|
|
46
46
|
works with each option; only the URL changes.
|
|
47
47
|
|
|
48
|
-
| Option | Use it when
|
|
49
|
-
| -------------------------------------------------------------------- |
|
|
50
|
-
| [Inth](https://inth.com) | You want hosted policies and consent records. The guides use this.
|
|
51
|
-
| [Self-hosted c15t backend](https://c15t.com/docs/self-host/overview) | You need to run the service and its database yourself.
|
|
52
|
-
|
|
|
48
|
+
| Option | Use it when |
|
|
49
|
+
| -------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
50
|
+
| [Inth](https://inth.com) | You want hosted policies and consent records. The guides use this. |
|
|
51
|
+
| [Self-hosted c15t backend](https://c15t.com/docs/self-host/overview) | You need to run the service and its database yourself. |
|
|
52
|
+
| [Local mode](./modes.md#local) | Local development and tests. Policies live in your code and choices stay in the browser. c15t keeps no server-side record of consent. Not recommended for production environments. |
|
|
53
53
|
|
|
54
54
|
To use Inth, create a project, set its policy rules, add your site's origin to
|
|
55
55
|
its trusted origins, and copy the backend URL. The guides use the placeholder
|
|
@@ -60,10 +60,10 @@ including any path prefix.
|
|
|
60
60
|
|
|
61
61
|
Where consent resolves decides what the visitor's first HTML contains.
|
|
62
62
|
|
|
63
|
-
| Rendering | What the visitor gets
|
|
64
|
-
| -------------------------------------------- |
|
|
65
|
-
| The server resolves consent for each request | The server reads the visitor's cookie and location headers, so the browser starts with the answer.
|
|
66
|
-
| The browser resolves consent | The HTML is the same for everyone. After the page loads, the browser requests the policy, then shows the banner or runs gated scripts.
|
|
63
|
+
| Rendering | What the visitor gets |
|
|
64
|
+
| -------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
65
|
+
| The server resolves consent for each request | The server reads the visitor's cookie and location headers, so the browser starts with the answer. The banner can be part of the HTML. In Next.js, TanStack Start, Nuxt and SvelteKit, scripts the visitor's consent already allows start before hydration. |
|
|
66
|
+
| The browser resolves consent | The HTML is the same for everyone. After the page loads, the browser requests the policy, then shows the banner or runs gated scripts. |
|
|
67
67
|
|
|
68
68
|
A static or prerendered page cannot contain one visitor's consent, because the
|
|
69
69
|
same HTML goes to everyone. Static sites still use Inth; the browser talks to it
|
|
@@ -63,6 +63,23 @@ If your own scripts depend on such a category, do one of these:
|
|
|
63
63
|
Check `effectivePermissions` after Accept All on a fresh visit to see which
|
|
64
64
|
categories your vendor list leaves denied.
|
|
65
65
|
|
|
66
|
+
## A subject ID from the first page load
|
|
67
|
+
|
|
68
|
+
Every visitor gets a subject ID (`sub_…`) before they decide anything, so
|
|
69
|
+
you can link activity to the visitor from the first page load and still
|
|
70
|
+
find it when they opt out later. It is in `snapshot.subject.subjectId` from
|
|
71
|
+
the first snapshot.
|
|
72
|
+
|
|
73
|
+
* A framework server sets the ID in the `c15t-sid` cookie on the first
|
|
74
|
+
response, where the adapter's server hook runs. Otherwise the browser
|
|
75
|
+
creates it when c15t starts and stores it in `c15t-sid` at once.
|
|
76
|
+
* The ID stays the same across reloads. The first save records the same ID
|
|
77
|
+
with the choice.
|
|
78
|
+
* `c15t-sid` is not a choice. A visitor with only an ID still sees the
|
|
79
|
+
banner.
|
|
80
|
+
* Clearing choices and revoking consent keep the ID. Only setting the subject
|
|
81
|
+
to `null` starts over with a new one.
|
|
82
|
+
|
|
66
83
|
## When a choice is saved
|
|
67
84
|
|
|
68
85
|
A save records the choice in the browser first and sends it to the backend
|
|
@@ -204,10 +221,12 @@ Stored records are merged into the ones in memory:
|
|
|
204
221
|
wins in both tabs.
|
|
205
222
|
* Tabs keep one subject. A stored subject is considered only when the record
|
|
206
223
|
that carries it changed, never on focus alone. It replaces a subject the tab
|
|
207
|
-
generated on its first save or copied from storage, so a tab
|
|
208
|
-
before another tab stored a subject joins it.
|
|
209
|
-
|
|
210
|
-
|
|
224
|
+
generated at startup or on its first save, or copied from storage, so a tab
|
|
225
|
+
that opened before another tab stored a subject joins it. When it replaces
|
|
226
|
+
an ID the tab generated at startup and never used, the kernel emits
|
|
227
|
+
`subject:resolved` with `previousSubjectId`. A subject id the server
|
|
228
|
+
resolved (at init, from a prefetch or in a save response) is replaced only
|
|
229
|
+
by a strictly newer stored choice, and an identity set with `identify()` is
|
|
211
230
|
never replaced.
|
|
212
231
|
* Under an IAB policy, the TC string follows the reconciled choice. See
|
|
213
232
|
[How the TC string is reconciled](#how-the-tc-string-is-reconciled).
|
|
@@ -281,11 +300,13 @@ wherever it turns up. A decision stamped in the very millisecond of the clear
|
|
|
281
300
|
counts only if it comes from a tab that had already seen that clear, so a tab's
|
|
282
301
|
own choice right after its own clear stands while another tab's decision in the
|
|
283
302
|
same millisecond does not. A stored record left with no decisions after the
|
|
284
|
-
clear is void too, subject included.
|
|
303
|
+
clear is void too, subject included. The subject ID itself survives the clear:
|
|
304
|
+
it lives in its own key, `c15t-sid`, which clearing never removes, so a
|
|
305
|
+
withdrawal stays linked to the same visitor.
|
|
285
306
|
|
|
286
307
|
* A tab that reconciles only after another tab cleared and saved again drops
|
|
287
|
-
its pre-clear decisions instead of merging them back.
|
|
288
|
-
the clear is dropped too.
|
|
308
|
+
its pre-clear decisions instead of merging them back. The external identity
|
|
309
|
+
linked to its subject before the clear is dropped too; the subject ID stays.
|
|
289
310
|
* A tab that missed the clear writes only decisions it made after it. Its queued
|
|
290
311
|
write of an earlier decision is discarded, so it cannot bring back a cleared
|
|
291
312
|
record.
|
|
@@ -348,13 +369,38 @@ When a server render seeded the page from the consent cookie
|
|
|
348
369
|
localStorage is still applied on top of it when the page mounts, since it can
|
|
349
370
|
only restrict, if it is newer than the seeded decision or from the same
|
|
350
371
|
millisecond as a seeded grant. A stored grant is not.
|
|
372
|
+
`persistence: { skipHydration: false }` reads storage back over the seed
|
|
373
|
+
instead, so an older stored decision replaces it. A server render then starts
|
|
374
|
+
no scripts from the HTML, since it can't tell what that read will return.
|
|
351
375
|
|
|
352
376
|
The notice dismissal and vendor denials are stored twice as well. A vendor
|
|
353
377
|
list in localStorage at least as new as the cookie's adds its denials but never
|
|
354
378
|
lifts one the cookie holds; a copy confirmed before the last clear is ignored, so its
|
|
355
379
|
denials never come back. The newer notice dismissal applies; it still only hides a
|
|
356
|
-
notice with the fingerprint it names.
|
|
357
|
-
|
|
380
|
+
notice with the fingerprint it names.
|
|
381
|
+
|
|
382
|
+
Every notice acknowledgement also stores the visitor's subject ID with it,
|
|
383
|
+
including a choice that acknowledges a notice. For a visitor whose only action
|
|
384
|
+
was acknowledging a prompt that offers only necessary categories, this record
|
|
385
|
+
is what keeps the ID. The acknowledgement still grants no optional category. The `<key>-notice` cookie keeps its v1 format, so older
|
|
386
|
+
runtimes still read it. A separate `<key>-notice-subject` cookie binds the
|
|
387
|
+
subject ID to that acknowledgement: readers use it only while its timestamp and
|
|
388
|
+
fingerprint match the notice, so removing or replacing the notice makes a stale
|
|
389
|
+
identity cookie ineffective. When the subject ID changes, through a save
|
|
390
|
+
response or `set.subjectId()`, c15t rewrites the acknowledgement with the new
|
|
391
|
+
ID, so a reload does not bring the old one back. For the same acknowledgement,
|
|
392
|
+
the cookie identity wins unless a failed cookie write left a newer local
|
|
393
|
+
identity or a local identity removal. That exception lasts only while both
|
|
394
|
+
notice cookies match the values observed after the failed write; a later server
|
|
395
|
+
or sibling-subdomain cookie update takes precedence. Category-based data cleanup
|
|
396
|
+
protects these records and `<key>-sid` even when a configured wildcard matches
|
|
397
|
+
their names.
|
|
398
|
+
|
|
399
|
+
Clearing the stored records removes the acknowledgement and its
|
|
400
|
+
`<key>-notice-subject` cookie. The subject ID stays in `<key>-sid`, as after any
|
|
401
|
+
other clear. External identity fields supplied through `identify()` go with the
|
|
402
|
+
record that carried them. Call `set.subjectId(null)` to give the visitor a new
|
|
403
|
+
ID. The consent record follows the rules below.
|
|
358
404
|
|
|
359
405
|
The consent record is stored twice: as a cookie, which a server render reads,
|
|
360
406
|
and in localStorage. The cookie is authoritative. A well-formed cookie wins
|
|
@@ -385,6 +431,32 @@ render still reads the old consent cookie until the next successful cookie
|
|
|
385
431
|
write. The same applies to a consent cookie set with a different `domain` than
|
|
386
432
|
the current `storageConfig` uses, which the clear cannot remove.
|
|
387
433
|
|
|
434
|
+
The subject ID follows the same split. When its cookie writes succeed, the
|
|
435
|
+
server render and the browser use the same ID. When the browser refuses the
|
|
436
|
+
rewrite of a record cookie after the subject ID changed (the consent cookie,
|
|
437
|
+
`c15t-vendors` or `c15t-notice-subject`), that cookie keeps the old ID while
|
|
438
|
+
localStorage holds the new one. A server render then reports the old ID, and
|
|
439
|
+
the browser starts with the new ID from its storage. This happens even when the
|
|
440
|
+
request's `c15t-sid` cookie already holds the new ID. It lasts until a later
|
|
441
|
+
write of that record reaches the cookie, which may never happen while the
|
|
442
|
+
browser keeps refusing it. The server never replaces a `c15t-sid` cookie the
|
|
443
|
+
request already has with the old ID. When this browser's storage holds the
|
|
444
|
+
newer ID, the browser does not store the old one again either.
|
|
445
|
+
|
|
446
|
+
The vendor record has a separate limit. A local vendor copy at least as new as
|
|
447
|
+
the cookie's keeps its subject ID, and a rekey to a new subject ID keeps the
|
|
448
|
+
original decision time. So with `crossSubdomain`, a visitor whose only record is
|
|
449
|
+
a vendor decision (no consent record) can hold a local copy and a shared cookie
|
|
450
|
+
copy with the same time but different subject IDs, for example after another
|
|
451
|
+
subdomain rekeyed it at any later moment. This origin then starts with the ID
|
|
452
|
+
from its local copy, on server-rendered loads as well as loads that hydrate. It
|
|
453
|
+
does not write that ID over the shared `c15t-sid` cookie when that cookie and
|
|
454
|
+
the record cookies agree on another ID. A later vendor save from this origin
|
|
455
|
+
does store its ID in the shared vendor cookie, where the other subdomains read
|
|
456
|
+
it. Once that cookie carries it, this origin can also write it to the shared
|
|
457
|
+
`c15t-sid` cookie on a later page load. No optional category is granted and no
|
|
458
|
+
denial is lifted.
|
|
459
|
+
|
|
388
460
|
### Ordering with pending writes
|
|
389
461
|
|
|
390
462
|
A tab writes its own choices in a later task, not during the click. Before it
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Data fetching
|
|
3
3
|
description: Choose the recommended build-time policy snapshot or runtime
|
|
4
|
-
manifest fetching, backend /init, browser resolution or
|
|
4
|
+
manifest fetching, backend /init, browser resolution or local rules, and
|
|
5
5
|
understand where consent choices are saved.
|
|
6
6
|
group: concepts
|
|
7
7
|
---
|
|
@@ -10,18 +10,18 @@ group: concepts
|
|
|
10
10
|
|
|
11
11
|
Where policy resolves and where choices are saved are separate from who runs
|
|
12
12
|
the backend. Inth and a [self-hosted backend](https://c15t.com/docs/self-host/quickstart) speak
|
|
13
|
-
the same protocol, so every path below works with either. Only `
|
|
13
|
+
the same protocol, so every path below works with either. Only `local()`
|
|
14
14
|
removes backend requests. For a recommendation by framework, start with
|
|
15
15
|
[choose your setup](./choose-your-setup.md).
|
|
16
16
|
|
|
17
|
-
| Fetching path | Where policy resolves | Where choices are submitted
|
|
18
|
-
| --------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
|
|
19
|
-
| Build-time manifest, recommended for server-rendered apps | Your server resolves a bundled policy snapshot with each visitor's inputs | Inth or your c15t backend
|
|
20
|
-
| Cached manifest on your server | Your application resolves public policy data with each request's location and signals | Inth or your c15t backend
|
|
21
|
-
| Regular backend `/init` | The consent backend | The same backend
|
|
22
|
-
| Manifest in the browser | The browser, using a supplied location, or `/init` when the policy needs one it doesn't have | Inth or your c15t backend
|
|
23
|
-
|
|
|
24
|
-
| Custom transport | Your implementation | Your implementation
|
|
17
|
+
| Fetching path | Where policy resolves | Where choices are submitted | Choose it when |
|
|
18
|
+
| --------------------------------------------------------- | -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
19
|
+
| Build-time manifest, recommended for server-rendered apps | Your server resolves a bundled policy snapshot with each visitor's inputs | Inth or your c15t backend | Your framework renders on the server, supports a build integration, and policy changes can ship with a rebuild |
|
|
20
|
+
| Cached manifest on your server | Your application resolves public policy data with each request's location and signals | Inth or your c15t backend | Policy changes must reach the app without rebuilding, or builds cannot access the backend |
|
|
21
|
+
| Regular backend `/init` | The consent backend | The same backend | You have no application server, as in a React, Vue or Svelte single-page app, want the fewest moving parts, or need backend-owned request resolution |
|
|
22
|
+
| Manifest in the browser | The browser, using a supplied location, or `/init` when the policy needs one it doesn't have | Inth or your c15t backend | The policy has no location rules or the page knows the visitor's location, and you accept about 3 KB more bundle and a rebuild for policy edits |
|
|
23
|
+
| Local | The browser or local runtime, using bundled rules | No backend submission. c15t keeps no server-side record of consent. | Local development and tests. Not recommended for production environments. |
|
|
24
|
+
| Custom transport | Your implementation | Your implementation | An existing service cannot use the c15t backend protocol |
|
|
25
25
|
|
|
26
26
|
## What is a consent manifest?
|
|
27
27
|
|
|
@@ -226,36 +226,43 @@ needing the upstream URL. A static export cannot serve a Next.js route or
|
|
|
226
226
|
rewrite at runtime; use the absolute Inth URL or a proxy provided by the static
|
|
227
227
|
host instead.
|
|
228
228
|
|
|
229
|
-
## When should I use
|
|
229
|
+
## When should I use local mode?
|
|
230
230
|
|
|
231
231
|
Not recommended for production environments. Use Inth or a self-hosted backend
|
|
232
232
|
for production policy and consent records.
|
|
233
233
|
|
|
234
|
-
`offline()` resolves bundled policy rules
|
|
235
|
-
saves locally. The runtime's
|
|
236
|
-
|
|
237
|
-
|
|
234
|
+
`local()`, called `offline()` before c15t 3.2, resolves bundled policy rules
|
|
235
|
+
without an init request and acknowledges saves locally. The runtime's
|
|
236
|
+
persistence module stores the choice in browser storage. c15t keeps no
|
|
237
|
+
server-side record of consent, so there is no audit history, no cross-device
|
|
238
|
+
record and no IP geolocation. [What a consent record proves](./modes.md#what-a-consent-record-proves)
|
|
239
|
+
explains what that leaves out.
|
|
238
240
|
|
|
239
|
-
Use your framework's `
|
|
241
|
+
Use your framework's `local()` so its translations and provider context are
|
|
240
242
|
included. In a React app it replaces the mode passed to `ConsentProvider`:
|
|
241
243
|
|
|
242
244
|
```ts title="src/consent-mode.ts"
|
|
243
|
-
import {
|
|
245
|
+
import { local } from 'c15t/react';
|
|
244
246
|
|
|
245
|
-
export const mode =
|
|
247
|
+
export const mode = local();
|
|
246
248
|
```
|
|
247
249
|
|
|
250
|
+
In development builds, local mode warns once per page that c15t keeps no
|
|
251
|
+
server-side record of consent. Pass `local({ acknowledgeNoRecords: true })` to
|
|
252
|
+
hide the warning once you have decided a browser-only record is enough; see
|
|
253
|
+
[the development warning](./modes.md#the-development-warning).
|
|
254
|
+
|
|
248
255
|
In Next.js, TanStack Start, Nuxt, Astro and SvelteKit, pass the data
|
|
249
|
-
`
|
|
256
|
+
`local()` from the framework package where the config takes `mode`; see
|
|
250
257
|
[consent modes](./modes.md#import-the-factories-from-your-framework-package).
|
|
251
258
|
|
|
252
|
-
With no `policyRules`, the
|
|
253
|
-
|
|
254
|
-
real resolution inputs;
|
|
259
|
+
With no `policyRules`, the local transport uses the recommended rule pack.
|
|
260
|
+
Supplying `policyRules` replaces that pack. Unknown country and region are
|
|
261
|
+
real resolution inputs; local mode does not discover a visitor's location.
|
|
255
262
|
Use [policy rules](./policies.md) to understand
|
|
256
263
|
matching and defaults, and test the missing-location case.
|
|
257
264
|
|
|
258
|
-
|
|
265
|
+
Local mode is an explicit architecture choice, not an automatic fallback for
|
|
259
266
|
a failed Inth request. If hosted initialization fails before a policy resolves,
|
|
260
267
|
optional permissions remain denied and the stock prompt stays hidden. Observe
|
|
261
268
|
initialization failures instead of silently changing policy sources.
|