@c15t/nextjs 2.2.1 → 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 (220) hide show
  1. package/AGENTS.md +102 -142
  2. package/README.md +4 -4
  3. package/dist/api.js +1 -0
  4. package/dist/config.js +1 -0
  5. package/dist/devtools.js +2 -0
  6. package/dist/headers.js +1 -0
  7. package/dist/iab/styles.css +1 -1
  8. package/dist/iab/styles.tw3.css +133 -19
  9. package/dist/index.js +1 -1
  10. package/dist/middleware.js +1 -0
  11. package/dist/node-bridge.js +1 -0
  12. package/dist/pages.js +1 -0
  13. package/dist/proxy.js +1 -0
  14. package/dist/root.js +2 -0
  15. package/dist/server.js +1 -0
  16. package/dist/static.js +1 -0
  17. package/dist/styles.css +1 -1
  18. package/dist/styles.tw3.css +173 -29
  19. package/dist/version.js +1 -1
  20. package/dist-types/api.d.ts +88 -0
  21. package/dist-types/config.d.ts +110 -0
  22. package/dist-types/devtools.d.ts +1 -0
  23. package/dist-types/headers.d.ts +4 -0
  24. package/dist-types/index.d.ts +28 -10
  25. package/dist-types/middleware.d.ts +15 -0
  26. package/dist-types/node-bridge.d.ts +57 -0
  27. package/dist-types/pages.d.ts +88 -0
  28. package/dist-types/proxy.d.ts +34 -0
  29. package/dist-types/root.d.ts +86 -0
  30. package/dist-types/server.d.ts +164 -0
  31. package/dist-types/static.d.ts +42 -0
  32. package/dist-types/types.d.ts +5 -36
  33. package/dist-types/version.d.ts +1 -1
  34. package/docs/README.md +102 -142
  35. package/docs/assets/v3/brand-bar.png +0 -0
  36. package/docs/assets/v3/brand-card.png +0 -0
  37. package/docs/assets/v3/choice-wall.png +0 -0
  38. package/docs/assets/v3/mobile-card.png +0 -0
  39. package/docs/assets/v3/preferences.png +0 -0
  40. package/docs/customization/overview.md +45 -0
  41. package/docs/customization/recipes.md +79 -0
  42. package/docs/customization/slots.md +55 -0
  43. package/docs/customization/tokens.md +76 -0
  44. package/docs/customization/translations.md +49 -0
  45. package/docs/frameworks/next/api-reference/data-fetching.md +416 -0
  46. package/docs/frameworks/next/app-router.md +403 -0
  47. package/docs/frameworks/next/client-side.md +118 -0
  48. package/docs/frameworks/next/components/consent-banner.md +251 -211
  49. package/docs/frameworks/next/components/consent-dialog-link.md +96 -35
  50. package/docs/frameworks/next/components/consent-dialog-trigger.md +74 -149
  51. package/docs/frameworks/next/components/consent-dialog.md +189 -134
  52. package/docs/frameworks/next/components/consent-manager-provider.md +60 -318
  53. package/docs/frameworks/next/components/consent-widget.md +172 -114
  54. package/docs/frameworks/next/components/dev-tools.md +199 -40
  55. package/docs/frameworks/next/components/frame.md +137 -42
  56. package/docs/frameworks/next/concepts/consent-categories.md +24 -89
  57. package/docs/frameworks/next/concepts/policy-presets.md +142 -0
  58. package/docs/frameworks/next/content-security-policy.md +189 -0
  59. package/docs/frameworks/next/data-fetching.md +74 -0
  60. package/docs/frameworks/next/geography-headers.md +251 -0
  61. package/docs/frameworks/next/headless.md +95 -185
  62. package/docs/frameworks/next/hooks/use-consent-manager/overview.md +42 -163
  63. package/docs/frameworks/next/iab/overview.md +37 -107
  64. package/docs/frameworks/next/optimization.md +158 -194
  65. package/docs/frameworks/next/pages-router.md +296 -0
  66. package/docs/frameworks/next/quickstart.md +31 -132
  67. package/docs/frameworks/next/script-loader.md +134 -467
  68. package/docs/frameworks/next/server-side.md +97 -130
  69. package/docs/frameworks/next/static-export.md +164 -0
  70. package/docs/frameworks/next/styling/overview.md +166 -250
  71. package/docs/frameworks/next/troubleshooting.md +134 -144
  72. package/docs/guides/consent-state.md +60 -0
  73. package/docs/guides/data-fetching.md +163 -0
  74. package/docs/guides/deployment-modes.md +63 -0
  75. package/docs/guides/troubleshooting.md +68 -0
  76. package/docs/guides/verify-consent.md +62 -0
  77. package/docs/integrations/adobe-analytics.md +239 -105
  78. package/docs/integrations/ahrefs-analytics.md +238 -104
  79. package/docs/integrations/amplitude.md +219 -157
  80. package/docs/integrations/building-integrations.md +32 -224
  81. package/docs/integrations/clearbit.md +247 -86
  82. package/docs/integrations/cloudflare-web-analytics.md +250 -84
  83. package/docs/integrations/crisp.md +251 -97
  84. package/docs/integrations/databuddy.md +259 -153
  85. package/docs/integrations/fathom-analytics.md +239 -96
  86. package/docs/integrations/google-maps.md +328 -207
  87. package/docs/integrations/google-tag-manager.md +248 -96
  88. package/docs/integrations/google-tag.md +261 -90
  89. package/docs/integrations/heap.md +222 -149
  90. package/docs/integrations/hightouch.md +225 -131
  91. package/docs/integrations/hotjar.md +239 -90
  92. package/docs/integrations/intercom.md +239 -98
  93. package/docs/integrations/linkedin-insights.md +243 -113
  94. package/docs/integrations/logrocket.md +241 -123
  95. package/docs/integrations/matomo-analytics.md +256 -111
  96. package/docs/integrations/meta-pixel.md +197 -324
  97. package/docs/integrations/microsoft-clarity.md +233 -114
  98. package/docs/integrations/microsoft-uet.md +245 -110
  99. package/docs/integrations/mixpanel-analytics.md +252 -87
  100. package/docs/integrations/openai-pixel.md +441 -0
  101. package/docs/integrations/overview.md +95 -133
  102. package/docs/integrations/pirsch.md +249 -96
  103. package/docs/integrations/plausible-analytics.md +241 -100
  104. package/docs/integrations/posthog.md +353 -214
  105. package/docs/integrations/promptwatch.md +251 -81
  106. package/docs/integrations/reddit-pixel.md +226 -173
  107. package/docs/integrations/rudderstack.md +244 -187
  108. package/docs/integrations/rybbit-analytics.md +244 -91
  109. package/docs/integrations/segment.md +238 -92
  110. package/docs/integrations/snapchat-pixel.md +240 -110
  111. package/docs/integrations/tiktok-pixel.md +249 -81
  112. package/docs/integrations/umami-analytics.md +242 -95
  113. package/docs/integrations/vercel-analytics.md +242 -90
  114. package/docs/integrations/x-pixel.md +238 -104
  115. package/docs/integrations/youtube.md +354 -142
  116. package/docs/upgrade-v3.md +334 -0
  117. package/iab/styles.css +1 -1
  118. package/iab/styles.tw3.css +1 -1
  119. package/package.json +106 -65
  120. package/readme.json +3 -3
  121. package/src/iab/styles.css +1 -1
  122. package/src/iab/styles.tw3.css +1 -1
  123. package/src/styles.css +1 -1
  124. package/src/styles.tw3.css +1 -1
  125. package/styles.css +1 -1
  126. package/styles.tw3.css +1 -1
  127. package/client/components/consent-dialog-link.js +0 -3
  128. package/client/components/integrations.js +0 -3
  129. package/dist/components/integrations/index.cjs +0 -1
  130. package/dist/components/integrations/index.js +0 -1
  131. package/dist/headless.cjs +0 -1
  132. package/dist/index.cjs +0 -1
  133. package/dist/libs/browser-initial-data.cjs +0 -1
  134. package/dist/libs/browser-initial-data.js +0 -1
  135. package/dist/libs/initial-data.cjs +0 -1
  136. package/dist/libs/initial-data.js +0 -1
  137. package/dist/types.cjs +0 -1
  138. package/dist/version.cjs +0 -1
  139. package/dist-types/components/integrations/index.d.ts +0 -1
  140. package/dist-types/libs/browser-initial-data.d.ts +0 -9
  141. package/dist-types/libs/initial-data.d.ts +0 -33
  142. package/docs/frameworks/next/building-headless-components.md +0 -379
  143. package/docs/frameworks/next/callbacks.md +0 -186
  144. package/docs/frameworks/next/concepts/client-modes.md +0 -177
  145. package/docs/frameworks/next/concepts/consent-models.md +0 -117
  146. package/docs/frameworks/next/concepts/cookie-management.md +0 -122
  147. package/docs/frameworks/next/concepts/glossary.md +0 -24
  148. package/docs/frameworks/next/concepts/initialization-flow.md +0 -149
  149. package/docs/frameworks/next/concepts/policy-packs.md +0 -230
  150. package/docs/frameworks/next/hooks/use-color-scheme.md +0 -41
  151. package/docs/frameworks/next/hooks/use-consent-manager/checking-consent.md +0 -96
  152. package/docs/frameworks/next/hooks/use-consent-manager/location-info.md +0 -97
  153. package/docs/frameworks/next/hooks/use-consent-manager/setting-consent.md +0 -94
  154. package/docs/frameworks/next/hooks/use-draggable.md +0 -59
  155. package/docs/frameworks/next/hooks/use-focus-trap.md +0 -42
  156. package/docs/frameworks/next/hooks/use-reduced-motion.md +0 -37
  157. package/docs/frameworks/next/hooks/use-ssr-status.md +0 -32
  158. package/docs/frameworks/next/hooks/use-text-direction.md +0 -50
  159. package/docs/frameworks/next/hooks/use-translations.md +0 -55
  160. package/docs/frameworks/next/iab/consent-banner.md +0 -91
  161. package/docs/frameworks/next/iab/consent-dialog.md +0 -129
  162. package/docs/frameworks/next/iab/use-gvl-data.md +0 -21
  163. package/docs/frameworks/next/iframe-blocking.md +0 -106
  164. package/docs/frameworks/next/internationalization.md +0 -207
  165. package/docs/frameworks/next/network-blocker.md +0 -140
  166. package/docs/frameworks/next/policy-packs.md +0 -248
  167. package/docs/frameworks/next/styling/classnames.md +0 -94
  168. package/docs/frameworks/next/styling/color-scheme.md +0 -84
  169. package/docs/frameworks/next/styling/css-variables.md +0 -53
  170. package/docs/frameworks/next/styling/slots.md +0 -94
  171. package/docs/frameworks/next/styling/tailwind.md +0 -137
  172. package/docs/frameworks/next/styling/tokens.md +0 -156
  173. package/docs/shared/concepts/client-modes.md +0 -103
  174. package/docs/shared/concepts/consent-categories.md +0 -41
  175. package/docs/shared/concepts/consent-models.md +0 -72
  176. package/docs/shared/concepts/cookie-management.md +0 -88
  177. package/docs/shared/concepts/glossary.md +0 -24
  178. package/docs/shared/concepts/initialization-flow.md +0 -105
  179. package/docs/shared/concepts/policy-packs.md +0 -225
  180. package/docs/shared/react/components/consent-banner.md +0 -242
  181. package/docs/shared/react/components/consent-dialog-link.md +0 -45
  182. package/docs/shared/react/components/consent-dialog-trigger.md +0 -185
  183. package/docs/shared/react/components/consent-dialog.md +0 -119
  184. package/docs/shared/react/components/consent-manager-provider.md +0 -225
  185. package/docs/shared/react/components/consent-widget.md +0 -121
  186. package/docs/shared/react/components/dev-tools.md +0 -81
  187. package/docs/shared/react/components/frame.md +0 -52
  188. package/docs/shared/react/guides/building-headless-components.md +0 -110
  189. package/docs/shared/react/guides/callbacks.md +0 -89
  190. package/docs/shared/react/guides/headless.md +0 -31
  191. package/docs/shared/react/guides/iframe-blocking.md +0 -65
  192. package/docs/shared/react/guides/internationalization.md +0 -123
  193. package/docs/shared/react/guides/network-blocker.md +0 -72
  194. package/docs/shared/react/guides/optimization.md +0 -44
  195. package/docs/shared/react/guides/policy-packs.md +0 -173
  196. package/docs/shared/react/guides/script-loader.md +0 -311
  197. package/docs/shared/react/hooks/use-color-scheme.md +0 -31
  198. package/docs/shared/react/hooks/use-consent-manager/checking-consent.md +0 -95
  199. package/docs/shared/react/hooks/use-consent-manager/location-info.md +0 -96
  200. package/docs/shared/react/hooks/use-consent-manager/overview.md +0 -74
  201. package/docs/shared/react/hooks/use-consent-manager/setting-consent.md +0 -93
  202. package/docs/shared/react/hooks/use-draggable.md +0 -30
  203. package/docs/shared/react/hooks/use-focus-trap.md +0 -20
  204. package/docs/shared/react/hooks/use-reduced-motion.md +0 -33
  205. package/docs/shared/react/hooks/use-ssr-status.md +0 -16
  206. package/docs/shared/react/hooks/use-text-direction.md +0 -38
  207. package/docs/shared/react/hooks/use-translations.md +0 -15
  208. package/docs/shared/react/iab/consent-banner.md +0 -60
  209. package/docs/shared/react/iab/consent-dialog.md +0 -76
  210. package/docs/shared/react/iab/overview.md +0 -80
  211. package/docs/shared/react/iab/use-gvl-data.md +0 -21
  212. package/docs/shared/react/styling/classnames.md +0 -93
  213. package/docs/shared/react/styling/color-scheme.md +0 -35
  214. package/docs/shared/react/styling/css-variables.md +0 -53
  215. package/docs/shared/react/styling/overview.md +0 -261
  216. package/docs/shared/react/styling/slots.md +0 -93
  217. package/docs/shared/react/styling/stylesheet-entrypoint.md +0 -8
  218. package/docs/shared/react/styling/tailwind.md +0 -88
  219. package/docs/shared/react/styling/tokens.md +0 -155
  220. package/docs/shared/troubleshooting.md +0 -82
@@ -0,0 +1,164 @@
1
+ import { createManifestTransport } from '@c15t/core/transports/manifest';
2
+ import type { ConsentConfig } from './config';
3
+ import type { ConsentState } from './types';
4
+ type Awaitable<Value> = Promise<Value> | Value;
5
+ /**
6
+ * Request context the server helpers read from.
7
+ *
8
+ * The default implementation calls `next/headers`, which only exists in the
9
+ * App Router. Pass your own when the request arrives another way, such as
10
+ * `getServerSideProps` in the Pages Router (see `@c15t/nextjs/pages`, which
11
+ * builds this adapter for you) or a test harness.
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * const state = await resolveConsent({
16
+ * request: {
17
+ * cookies: () => ({ toString: () => req.headers.cookie ?? '' }),
18
+ * headers: () => new Headers({ host: req.headers.host ?? '' }),
19
+ * },
20
+ * });
21
+ * ```
22
+ */
23
+ export interface NextRequestContext {
24
+ /**
25
+ * Returns the request cookies. Only `toString()` is read; it must
26
+ * serialize to a `Cookie` header value (`a=1; b=2`).
27
+ */
28
+ cookies: () => Awaitable<{
29
+ toString: () => string;
30
+ }>;
31
+ /**
32
+ * Returns the request headers as a Web `Headers` instance.
33
+ */
34
+ headers: () => Awaitable<Headers>;
35
+ }
36
+ /**
37
+ * How the request is read: the clock, the consent cookie, header
38
+ * overrides, and the adapter that exposes the request itself.
39
+ */
40
+ export interface ConsentRequestOptions {
41
+ /** Request clock reused for record validation and hydration. */
42
+ now?: number;
43
+ /**
44
+ * Cookie name holding persisted consent. Defaults to `c15t`, the
45
+ * persistence module's storage key. Set this only if you customized
46
+ * `storageConfig.storageKey` client-side; it must match.
47
+ */
48
+ cookieName?: string;
49
+ /**
50
+ * If provided, override the auto-detected country from request headers.
51
+ * Mainly useful for tests.
52
+ */
53
+ country?: string;
54
+ /**
55
+ * If provided, override the auto-detected language.
56
+ */
57
+ language?: string;
58
+ /**
59
+ * Request context adapter. Defaults to `next/headers`, so set this
60
+ * wherever that module is unavailable: the Pages Router, custom
61
+ * servers, or tests. `@c15t/nextjs/pages` derives it from the Node
62
+ * request for you.
63
+ */
64
+ request?: NextRequestContext;
65
+ }
66
+ /**
67
+ * Type alias re-exported so consumers can stay within `@c15t/nextjs`.
68
+ */
69
+ export type { KernelConfig } from '@c15t/core';
70
+ export type { ConsentState } from './types';
71
+ export type { ConsentConfig } from './config';
72
+ export { defineConsentConfig } from './config';
73
+ export interface ResolveConsentOptions extends ConsentRequestOptions {
74
+ /**
75
+ * Backend base URL. When set (here or through `config`), the helper
76
+ * calls `${backendURL}/init` server-side and folds the response into the
77
+ * returned state (policy, UI, translations, IAB metadata, and consents
78
+ * if the backend knows the user). This avoids a first-paint flicker
79
+ * before the client-side init lands.
80
+ *
81
+ * Relative URLs are resolved via the request headers (`x-forwarded-proto`,
82
+ * `host`) so the backend call works under any reverse-proxy.
83
+ *
84
+ * Without a backend URL the helper returns the cookie- and header-only
85
+ * state and performs no network call. Overrides `config.backendURL`.
86
+ */
87
+ backendURL?: string;
88
+ /**
89
+ * A `defineConsentConfig` result. Supplies `backendURL` and `manifestURL`
90
+ * defaults; the explicit fields on this options bag win.
91
+ */
92
+ config?: ConsentConfig;
93
+ /**
94
+ * Same-origin or absolute `GET /manifest` URL. When set, the helper
95
+ * resolves init locally from the cached manifest and does not call
96
+ * `/init`. Overrides `config.manifestURL`.
97
+ */
98
+ manifestURL?: string;
99
+ /**
100
+ * Inline manifest for hosts that already loaded it. Takes precedence over
101
+ * `manifestURL` and keeps the request path backend-free.
102
+ */
103
+ manifest?: Parameters<typeof createManifestTransport>[0]['manifest'];
104
+ /**
105
+ * Override fetch. Useful for testing or for wiring Vercel's
106
+ * unstable_cache / Next.js `fetch`-level caching around the call.
107
+ */
108
+ fetch?: typeof globalThis.fetch;
109
+ /**
110
+ * Forward additional request headers onto the backend call. Cookies,
111
+ * `x-forwarded-for`, and `user-agent` from the incoming request are
112
+ * forwarded automatically (see {@link DEFAULT_FORWARD_HEADERS}). Use this for
113
+ * authentication tokens or custom tracing headers.
114
+ */
115
+ forwardHeaders?: string[];
116
+ /**
117
+ * Called when the backend or manifest request fails. The helper still
118
+ * returns the request-only state so the page renders and the client
119
+ * retries on mount. When omitted, the failure is logged with
120
+ * `console.warn` outside production so it does not go unnoticed.
121
+ */
122
+ onError?: (error: unknown) => void;
123
+ }
124
+ /**
125
+ * Request headers forwarded to the backend on every server-side `/init`.
126
+ *
127
+ * The backend geolocates from the client IP when no CDN geo header is
128
+ * present, and records the user agent with the consent decision, so both
129
+ * have to travel with a server-initiated call the way they do with a
130
+ * browser-initiated one. `forwardHeaders` adds to this list.
131
+ */
132
+ export declare const DEFAULT_FORWARD_HEADERS: readonly ['x-forwarded-for', 'user-agent'];
133
+ /**
134
+ * Resolve the visitor's consent state for the current request.
135
+ *
136
+ * 1. Reads the consent cookie, geo headers, language, and GPC from the
137
+ * request.
138
+ * 2. With a backend URL (`backendURL` or `config.backendURL`), calls
139
+ * `${backendURL}/init` server-side with the request context, or resolves
140
+ * init from the cached manifest when `manifest` or `manifestURL` is set.
141
+ * 3. Folds the response into a `ConsentState` so first paint is correct
142
+ * without waiting for a client roundtrip.
143
+ *
144
+ * Without a backend URL, step 2 is skipped and the request-only state is
145
+ * returned with no network call. If the backend call fails, the request-only
146
+ * state is returned too, so the page still renders and `ConsentRoot` retries
147
+ * on mount. The failure reaches `onError` when provided, and is otherwise
148
+ * logged outside production.
149
+ *
150
+ * Each call reads fresh headers and never caches across requests, so
151
+ * concurrent requests stay isolated.
152
+ *
153
+ * @param options - Backend URL or a `defineConsentConfig` result, the
154
+ * manifest source, fetch overrides, and how to read the request
155
+ * @returns The visitor's JSON-serializable state for `ConsentRoot`
156
+ * @example
157
+ * ```ts
158
+ * import { resolveConsent } from '@c15t/nextjs/server';
159
+ * import { consentConfig } from '@/consent.config';
160
+ *
161
+ * const state = await resolveConsent({ config: consentConfig });
162
+ * ```
163
+ */
164
+ export declare const resolveConsent: (options?: ResolveConsentOptions) => Promise<ConsentState>;
@@ -0,0 +1,42 @@
1
+ import type { ConsentManifest, InitOutput, ResolveInitFromManifestInputs } from '@c15t/schema/types';
2
+ export type { ConsentManifest } from '@c15t/schema/types';
3
+ export interface StaticManifestModuleOptions {
4
+ manifestURL: string;
5
+ fetch?: typeof globalThis.fetch;
6
+ exportName?: string;
7
+ /** Package entry that supplies the generated ConsentManifest type. */
8
+ importSource?: string;
9
+ }
10
+ export interface StaticGeoResult {
11
+ country?: string | null;
12
+ countryCode?: string | null;
13
+ region?: string | null;
14
+ regionCode?: string | null;
15
+ }
16
+ export interface StaticConsentResolverOptions {
17
+ manifest: ConsentManifest;
18
+ geo?: StaticGeoResult | null;
19
+ geoURL?: string;
20
+ language?: string;
21
+ gpc?: boolean;
22
+ fetch?: typeof globalThis.fetch;
23
+ }
24
+ export interface StaticConsentResolution {
25
+ /**
26
+ * Synchronous policy outcome for first paint. Unknown geography never
27
+ * rewrites a configured matcher.
28
+ */
29
+ initial: InitOutput;
30
+ /**
31
+ * Resolves to the geo-specific result when `geo` or `geoURL` is available.
32
+ * Falls back to `initial` when geo cannot be resolved.
33
+ */
34
+ resolved: Promise<InitOutput>;
35
+ }
36
+ /** Resolve unknown geography without rewriting configured policy matchers. */
37
+ export declare const resolveStrictestDefaultInit: (manifest: ConsentManifest, inputs?: Omit<ResolveInitFromManifestInputs, 'country' | 'region'>) => InitOutput;
38
+ export declare const createStaticConsentResolver: (options: StaticConsentResolverOptions) => StaticConsentResolution;
39
+ /** Fetches the manifest used by static builds. */
40
+ export declare const loadStaticManifest: (options: Omit<StaticManifestModuleOptions, 'exportName'>) => Promise<ConsentManifest>;
41
+ /** Generates a typed manifest module for a static build. */
42
+ export declare const createStaticManifestModule: (options: StaticManifestModuleOptions) => Promise<string>;
@@ -1,38 +1,7 @@
1
- import type { ConsentManagerProviderProps } from '@c15t/react';
2
- import type { FetchSSRDataOptionsBase } from '@c15t/react/server';
3
- import type { PrefetchOptions } from 'c15t';
4
- export type InitialDataPromise = NonNullable<ConsentManagerProviderProps['options']['store']>['ssrData'];
5
- export interface NextCacheOptions {
6
- /**
7
- * Cache lifetime in seconds for the Next.js data cache.
8
- * Set to false to disable Next.js caching for this call.
9
- *
10
- * @default 1
11
- */
12
- revalidateSeconds?: number | false;
13
- }
14
- export interface C15tPrefetchProps extends PrefetchOptions {
15
- /**
16
- * Optional script element ID.
17
- *
18
- * @default 'c15t-initial-data-prefetch'
19
- */
20
- id?: string;
21
- }
1
+ import type { ConsentProviderPrefetch } from '@c15t/react/provider';
22
2
  /**
23
- * Options for the fetchInitialData function.
24
- *
25
- * @remarks
26
- * Uses the base options from @c15t/react/server - headers are
27
- * resolved automatically from Next.js.
3
+ * The visitor's resolved consent state: serializable policy, records, and
4
+ * request clock. Produced server-side by `resolveConsent()` and consumed by
5
+ * `ConsentRoot`, which hands it to the React provider.
28
6
  */
29
- export interface FetchInitialDataOptions extends FetchSSRDataOptionsBase {
30
- /**
31
- * Optional Next.js cache controls for SSR init requests.
32
- */
33
- nextCache?: NextCacheOptions;
34
- }
35
- export interface ConsentManagerProps {
36
- children: React.ReactNode;
37
- ssrData?: InitialDataPromise;
38
- }
7
+ export type ConsentState = ConsentProviderPrefetch;
@@ -1 +1 @@
1
- export declare const version = "2.2.1";
1
+ export declare const version = "3.0.0-alpha.0";
package/docs/README.md CHANGED
@@ -1,155 +1,115 @@
1
1
  # @c15t/nextjs
2
2
 
3
- > Next.js consent management docs for c15t, including App Router setup, consent UI, SSR behavior, script loading, and integrations.
3
+ > Next.js v3 App Router, Pages Router, static export and hydration with Inth.
4
4
 
5
5
  These docs ship inside the package so coding agents can read them offline. Open the topic file you need from the list below — paths are relative to this file.
6
6
 
7
+ ## Using these docs
8
+
9
+ These docs describe v3. Start with Inth hosted setup, identify the framework, router and deployment, then read its quickstart. Static sites can use Inth directly. Use page Markdown and package-bundled docs for targeted context. Verify scripts, rejection, reload and preferences; banner visibility alone is insufficient.
10
+
11
+ ## Start here
12
+
13
+ - [Next.js quickstart](./frameworks/next/quickstart.md)
14
+ - [App Router setup](./frameworks/next/app-router.md)
15
+ - [Pages Router setup](./frameworks/next/pages-router.md)
16
+ - [Static export setup](./frameworks/next/static-export.md)
17
+ - [Customize your consent interface](./customization/overview.md): Choose presentation, theme tokens, slots or custom markup for the change you need.
18
+ - [Verify consent before shipping](./guides/verify-consent.md): Test requests, policy resolution, persistence, navigation and preference changes in a production build.
19
+ - [Upgrade to v3 policies](./upgrade-v3.md): Migrate policy configuration, consent records, callbacks, and custom transports to the v3 policy system.
20
+
21
+ ## More documentation
22
+
23
+ [Documentation index](https://c15t.com/docs/llms.txt) · [Full Markdown context](https://c15t.com/llms-full.txt). Prefer the index and individual pages for focused tasks.
24
+
7
25
  ## Frameworks
8
26
 
9
- Install and configure c15t in JavaScript, React, and Next.js applications.
10
-
11
- - [Building Headless Components](./frameworks/next/building-headless-components.md): Build policy-aware custom consent components in Next.js using the headless hooks and policy-pack tooling.
12
- - [Callbacks](./frameworks/next/callbacks.md): React to consent lifecycle events - initialization, consent changes, errors, and revocation reloads.
13
- - [ConsentBanner](./frameworks/next/components/consent-banner.md): A pre-built consent banner that appears when user consent is needed. Supports policy-aware layout, theming, and advanced composition when markup must change.
14
- - [ConsentDialog](./frameworks/next/components/consent-dialog.md): A modal dialog where users can toggle individual consent categories.
15
- - [ConsentDialogLink](./frameworks/next/components/consent-dialog-link.md): An inline trigger for opening the consent dialog from footers, legal pages, and account settings.
16
- - [ConsentDialogTrigger](./frameworks/next/components/consent-dialog-trigger.md): A floating, draggable button that lets users re-open the consent dialog at any time.
17
- - [ConsentManagerProvider](./frameworks/next/components/consent-manager-provider.md): The root provider component that initializes the consent system and makes consent state available to all child components.
18
- - [ConsentWidget](./frameworks/next/components/consent-widget.md): An inline consent management widget for embedding in settings or privacy pages. Shows category toggles with accordion layout.
19
- - [DevTools](./frameworks/next/components/dev-tools.md): A development tool for inspecting consent state, geolocation, loaded scripts, and consent events in real time.
20
- - [Frame](./frameworks/next/components/frame.md): A consent-gated content wrapper - children only mount when the required consent category is granted.
21
- - [Client Modes](./frameworks/next/concepts/client-modes.md): Choose how c15t connects to its backend - full hosted integration, offline-only, or bring your own backend.
22
- - [Consent Categories](./frameworks/next/concepts/consent-categories.md): How c15t organizes tracking technologies into five consent categories.
23
- - [Consent Models](./frameworks/next/concepts/consent-models.md): How c15t determines consent behavior based on legal jurisdiction.
24
- - [Cookie Management](./frameworks/next/concepts/cookie-management.md): How c15t manages cookies through script, iframe, and network gating
25
- - [Glossary](./frameworks/next/concepts/glossary.md): Key terms used throughout the c15t documentation.
26
- - [Initialization Flow](./frameworks/next/concepts/initialization-flow.md): What happens from provider mount to first render — the full consent lifecycle.
27
- - [Policy Packs](./frameworks/next/concepts/policy-packs.md): How c15t resolves regional consent policies and what a policy pack controls.
28
- - [Headless Mode](./frameworks/next/headless.md): Build fully custom consent UI using only hooks - no pre-built components required.
29
- - [useColorScheme](./frameworks/next/hooks/use-color-scheme.md): Manage light/dark mode preferences for consent components.
30
- - [Checking Consent](./frameworks/next/hooks/use-consent-manager/checking-consent.md): Use has() for flexible consent checks with AND, OR, and NOT logic. Check if any consent exists with hasConsented().
31
- - [Location Info](./frameworks/next/hooks/use-consent-manager/location-info.md): Access detected jurisdiction, country, and region. Override geolocation for testing.
32
- - [useConsentManager](./frameworks/next/hooks/use-consent-manager/overview.md): The primary hook for accessing consent state and actions. Returns the full consent store including all state properties and action methods.
33
- - [Setting Consent](./frameworks/next/hooks/use-consent-manager/setting-consent.md): Save, update, and reset consent preferences with setConsent(), setSelectedConsent(), and saveConsents().
34
- - [useDraggable](./frameworks/next/hooks/use-draggable.md): Make an element draggable between viewport corners with snapping, persistence, and animation support.
35
- - [useFocusTrap](./frameworks/next/hooks/use-focus-trap.md): Trap keyboard focus within a container for accessible modal dialogs.
36
- - [useReducedMotion](./frameworks/next/hooks/use-reduced-motion.md): Detect the user's prefers-reduced-motion OS setting and reactively disable animations.
37
- - [useSSRStatus](./frameworks/next/hooks/use-ssr-status.md): Check whether server-side rendered consent data was used during initialization.
38
- - [useTextDirection](./frameworks/next/hooks/use-text-direction.md): Manage RTL/LTR text direction based on the active language for consent UI.
39
- - [useTranslations](./frameworks/next/hooks/use-translations.md): Access the current language's translations for building custom consent UI.
40
- - [IABConsentBanner](./frameworks/next/iab/consent-banner.md): An IAB TCF 2.3 compliant consent banner that displays partner count, purpose summaries, and legitimate interest notices.
41
- - [IABConsentDialog](./frameworks/next/iab/consent-dialog.md): An IAB TCF 2.3 compliant preference center with tabbed purpose and vendor management.
42
- - [IAB TCF 2.3](./frameworks/next/iab/overview.md): Implement IAB Transparency & Consent Framework 2.3 compliance for programmatic advertising in EU/EEA jurisdictions.
43
- - [useGVLData (Internal)](./frameworks/next/iab/use-gvl-data.md): Status note for the internal GVL hook used by the built-in IAB dialog.
44
- - [Iframe Blocking](./frameworks/next/iframe-blocking.md): Block embedded content (YouTube, social widgets, maps) until users grant consent for the appropriate category.
45
- - [Internationalization](./frameworks/next/internationalization.md): Translate consent UI into 30+ languages with built-in translations, custom overrides, and automatic browser language detection.
46
- - [Network Blocker](./frameworks/next/network-blocker.md): Block outgoing network requests to third-party domains until the user grants consent for the appropriate category.
47
- - [Optimization](./frameworks/next/optimization.md): Improve c15t startup performance in Next.js with same-origin rewrites, static prefetching, and dynamic-route SSR.
48
- - [Policy Packs](./frameworks/next/policy-packs.md): Configure regional consent policies in Next.js — hosted mode, presets, and offline fallback.
49
- - [Quickstart](./frameworks/next/quickstart.md): Add consent management to your Next.js app in under 5 minutes.
50
- - [Script Loader](./frameworks/next/script-loader.md): Gate third-party scripts behind consent in Next.js — load Google Analytics, Meta Pixel, and other tracking scripts only when users grant permission.
51
- - [Server-Side Data Fetching](./frameworks/next/server-side.md): Pre-fetch consent data in Server Components with fetchInitialData for dynamic Next.js routes.
52
- - [Class Names](./frameworks/next/styling/classnames.md): Style consent components using className props and per-slot className targeting via the theme.
53
- - [Color Scheme](./frameworks/next/styling/color-scheme.md): Support light mode, dark mode, and system preference detection in consent components.
54
- - [CSS Variables](./frameworks/next/styling/css-variables.md): Reference for all --c15t-* CSS custom properties generated by the theme system.
55
- - [Styling Overview](./frameworks/next/styling/overview.md): Five approaches for theming consent components — design tokens, component slots, CSS variables, className, and noStyle mode.
56
- - [Component Slots](./frameworks/next/styling/slots.md): Target individual component parts with styles using the slot system - className strings or inline style objects.
57
- - [Tailwind CSS](./frameworks/next/styling/tailwind.md): Use Tailwind CSS utility classes to style consent components via the slot system.
58
- - [Design Tokens](./frameworks/next/styling/tokens.md): The six base token categories that control colors, typography, spacing, radius, shadows, and motion, plus optional dark-mode overrides.
59
- - [Troubleshooting](./frameworks/next/troubleshooting.md): Solutions for common issues with @c15t/nextjs — provider errors, missing banners, consent persistence, and more.
27
+ - [Fetching reference](./frameworks/next/api-reference/data-fetching.md): Reference for Next.js consent URLs, manifest resolution, request geography and offline configuration.
28
+ - [App Router](./frameworks/next/app-router.md): Set up App Router with Inth, cached manifests and consent-gated scripts.
29
+ - [Client-side initialization](./frameworks/next/client-side.md): Initialize Next.js consent in the browser with one backend URL, without server prefetch or local API handlers.
30
+ - [ConsentBanner](./frameworks/next/components/consent-banner.md): Render the pre-built ConsentBanner inside a Next.js ConsentRoot and configure its variants, per-policy buttons and compound parts.
31
+ - [ConsentDialog](./frameworks/next/components/consent-dialog.md): Mount ConsentDialog as a Client Component inside a Next.js ConsentRoot to open the preference center from the banner, links and triggers.
32
+ - [ConsentDialogLink](./frameworks/next/components/consent-dialog-link.md): Open the preference center from a Next.js footer with ConsentDialogLink, a Client Component that renders an unstyled button inside ConsentRoot.
33
+ - [ConsentDialogTrigger](./frameworks/next/components/consent-dialog-trigger.md): Add the floating ConsentDialogTrigger button or toolbar to a Next.js ConsentRoot so visitors can reopen the preference center.
34
+ - [ConsentRoot](./frameworks/next/components/consent-manager-provider.md): Pass server-resolved consent state and shared configuration to the Next.js ConsentRoot.
35
+ - [ConsentWidget](./frameworks/next/components/consent-widget.md): Render ConsentWidget on a Next.js privacy page inside ConsentRoot as an inline preference center, server-rendered when the route resolves consent.
36
+ - [DevTools](./frameworks/next/components/dev-tools.md): Load the c15t DevTools panel only in Next.js development builds to inspect consent state, scripts, policy and events inside ConsentRoot.
37
+ - [Frame](./frameworks/next/components/frame.md): Consent-gate an iframe in Next.js with Frame inside ConsentRoot; with server prefetch the placeholder or embed is decided in the server HTML.
38
+ - [Consent categories](./frameworks/next/concepts/consent-categories.md): Assign optional features to categories and understand how policy scope affects permission.
39
+ - [Policy presets](./frameworks/next/concepts/policy-presets.md): Understand how policy rules affect Next.js prompts, permissions and persistent privacy controls.
40
+ - [Content Security Policy](./frameworks/next/content-security-policy.md): Pass a per-request CSP nonce to ConsentRoot in Next.js and allow the consent backend in connect-src.
41
+ - [Data fetching](./frameworks/next/data-fetching.md): Choose cached manifests for a Next.js server, backend initialization for a simpler setup, or offline mode for local development.
42
+ - [Forward geography headers](./frameworks/next/geography-headers.md): Use c15tProxy in Next.js proxy.ts or middleware.ts so Server Components and Route Handlers receive the visitor's country and region.
43
+ - [Headless](./frameworks/next/headless.md): Build a custom consent banner in Next.js with the c15t/next/headless hooks inside your existing ConsentRoot.
44
+ - [Hooks](./frameworks/next/hooks/use-consent-manager/overview.md): Gate features and save consent choices in Next.js Client Components with the focused hooks exported from c15t/next.
45
+ - [IAB TCF](./frameworks/next/iab/overview.md): Mount the IAB TCF banner and dialog inside a Next.js ConsentRoot and configure the CMP ID, policy and vendor data.
46
+ - [Optimization](./frameworks/next/optimization.md): Reuse cached policy data and optionally reduce browser connection overhead without changing consent behavior.
47
+ - [Pages Router](./frameworks/next/pages-router.md): Set up Pages Router with Inth, cached manifests and consent-gated scripts.
48
+ - [Quickstart](./frameworks/next/quickstart.md): Add c15t consent management to Next.js with Inth, with setup guides for the App Router, the Pages Router and static export.
49
+ - [Load scripts with consent](./frameworks/next/script-loader.md): Register vendor scripts in your existing Next.js ConsentRoot and handle loading and revocation.
50
+ - [Server rendering and hydration](./frameworks/next/server-side.md): Resolve consent on the server, choose what waits for the result, and preserve the same state through hydration.
51
+ - [Static export](./frameworks/next/static-export.md): Add c15t to output export without request helpers or a local API server.
52
+ - [Styling](./frameworks/next/styling/overview.md): Import the Next.js stylesheet and theme c15t components with tokens, slots, and class names through ConsentRoot options.
53
+ - [Troubleshoot Next.js consent](./frameworks/next/troubleshooting.md): Diagnose failed Next.js prefetch, verify manifest requests, and fix consent rendering or persistence problems.
54
+
55
+ ## Guides
56
+
57
+ - [Understand consent state](./guides/consent-state.md): Distinguish policy resolution, effective permissions, explicit choices, notices and privacy signals.
58
+ - [Data fetching and transports](./guides/data-fetching.md): Choose cached manifests, backend init or offline policy resolution, and understand where consent records are saved.
59
+ - [Choose a deployment mode](./guides/deployment-modes.md): Choose who runs your consent backend, then select manifest, init or offline resolution for your deployment.
60
+ - [Troubleshoot consent](./guides/troubleshooting.md): Diagnose missing banners, early vendor requests, lost choices and hydration differences.
61
+ - [Verify consent before shipping](./guides/verify-consent.md): Test requests, policy resolution, persistence, navigation and preference changes in a production build.
62
+
63
+ ## Customization
64
+
65
+ - [Customize your consent interface](./customization/overview.md): Choose presentation, theme tokens, slots or custom markup for the change you need.
66
+ - [Banner styling recipes](./customization/recipes.md): See real v3 components and reuse the exact theme configuration behind the examples.
67
+ - [Style component slots](./customization/slots.md): Target a specific c15t component part without replacing its markup or behavior.
68
+ - [Theme tokens and CSS](./customization/tokens.md): Style c15t with semantic tokens and use the stylesheet that matches your CSS tooling.
69
+ - [Copy and translations](./customization/translations.md): Change consent wording through i18n and test the complete prompt and preferences flow.
60
70
 
61
71
  ## Integrations
62
72
 
63
- Connect analytics, advertising, maps, media, and other third-party tools behind consent.
64
-
65
- - [Adobe Analytics](./integrations/adobe-analytics.md): Adobe Analytics loaded through an Adobe Experience Platform Data Collection Tags embed URL.
66
- - [Ahrefs Analytics](./integrations/ahrefs-analytics.md): Cookieless web analytics from Ahrefs with a prebuilt helper that wires the project key into a c15t-managed script.
67
- - [Amplitude](./integrations/amplitude.md): Load Amplitude Browser SDK 2 with c15t and gate product analytics behind measurement consent.
68
- - [Build a Custom Script Integration](./integrations/building-integrations.md): Learn when to use a raw Script, when to build a reusable manifest-backed integration, and how to debug and test custom consent-aware scripts in c15t.
69
- - [Clearbit](./integrations/clearbit.md): Visitor and company enrichment loaded with Clearbit's account-keyed tags.js snippet.
70
- - [Cloudflare Web Analytics](./integrations/cloudflare-web-analytics.md): Cookieless analytics from Cloudflare with a prebuilt helper that serializes the beacon config into the `data-cf-beacon` attribute.
71
- - [Crisp](./integrations/crisp.md): Load Crisp live chat with website ID, runtime, cookie, and session options.
72
- - [Databuddy](./integrations/databuddy.md): Databuddy is a privacy-focused analytics platform that helps you understand user behavior and track events. It supports cookieless tracking and manages consent automatically through c15t's consent state synchronization.
73
- - [Fathom Analytics](./integrations/fathom-analytics.md): Privacy-friendly cookieless analytics with a prebuilt helper that maps Fathom's data attributes into a c15t-managed script.
74
- - [Google Maps](./integrations/google-maps.md): Render Google Maps only after consent with one shared Maps JavaScript API loader and independently managed map instances.
75
- - [GA4 + Google Ads (gtag.js)](./integrations/google-tag.md): Send data to Google Analytics 4 and Google Ads with automatic Consent Mode v2 support.
76
- - [Google Tag Manager](./integrations/google-tag-manager.md): Deploy and manage marketing tags centrally with automatic consent state synchronization.
77
- - [Heap](./integrations/heap.md): Load Heap with c15t and gate autocapture product analytics behind measurement consent.
78
- - [Hightouch](./integrations/hightouch.md): Load Hightouch Events with c15t and gate the browser SDK behind measurement consent.
79
- - [Hotjar](./integrations/hotjar.md): Product analytics and behavior insights with a prebuilt helper that seeds Hotjar globals before loading the vendor bundle.
80
- - [Intercom](./integrations/intercom.md): Bootstrap Intercom settings and load the messenger widget bundle.
81
- - [LinkedIn Insights](./integrations/linkedin-insights.md): Track conversions and build matched audiences for LinkedIn advertising campaigns.
82
- - [LogRocket](./integrations/logrocket.md): Session replay and monitoring loaded after measurement consent with LogRocket's browser SDK.
83
- - [Matomo Analytics](./integrations/matomo-analytics.md): Load Matomo with c15t and keep Matomo's queue aligned with measurement consent.
84
- - [Meta Pixel](./integrations/meta-pixel.md): Track conversions and build audiences for Facebook and Instagram advertising campaigns.
85
- - [Microsoft Clarity](./integrations/microsoft-clarity.md): Session replay and behavior analytics with a prebuilt helper that keeps Clarity consent synchronized with c15t measurement state.
86
- - [Microsoft UET](./integrations/microsoft-uet.md): Track conversions and measure performance for Microsoft Advertising and Bing Ads.
87
- - [Mixpanel Analytics](./integrations/mixpanel-analytics.md): Load Mixpanel with c15t and let Mixpanel's own opt-in and opt-out APIs follow measurement consent.
88
- - [Integrations](./integrations/overview.md): Load analytics, pixels, tag managers, and widgets through c15t so consent state controls when they run, update, and appear in your consent UI.
89
- - [Pirsch](./integrations/pirsch.md): Privacy-friendly, cookieless analytics loaded with Pirsch's fixed script id and identification-code attributes.
90
- - [Plausible Analytics](./integrations/plausible-analytics.md): Privacy-friendly cookieless analytics with a prebuilt helper that preserves Plausible's queue bootstrap and loader attributes.
91
- - [PostHog](./integrations/posthog.md): PostHog is an open-source product analytics platform for tracking user behavior, session replays, feature flags, and A/B testing. It supports cookieless tracking, allowing analytics to continue even without cookie consent.
92
- - [Promptwatch](./integrations/promptwatch.md): Promptwatch analyzes traffic on your site for Artificial Intelligence (AI) traffic and usage insights. Data is stored in the EU without user-identifiable information.
93
- - [Reddit Pixel](./integrations/reddit-pixel.md): Track conversions and build retargeting audiences for Reddit advertising campaigns.
94
- - [RudderStack](./integrations/rudderstack.md): Load RudderStack's JavaScript SDK with c15t and gate the browser SDK behind measurement consent.
95
- - [Rybbit Analytics](./integrations/rybbit-analytics.md): Privacy-friendly analytics with script-tag configuration via Rybbit's data attributes.
96
- - [Segment](./integrations/segment.md): Load Segment Analytics.js with c15t and gate it behind measurement consent.
97
- - [Snapchat Pixel](./integrations/snapchat-pixel.md): Measure Snapchat ad performance and build remarketing audiences with a prebuilt pixel helper.
98
- - [TikTok Pixel](./integrations/tiktok-pixel.md): Measure ad performance and build audiences for TikTok advertising campaigns.
99
- - [Umami Analytics](./integrations/umami-analytics.md): Open-source, cookieless analytics with a prebuilt helper that maps Umami's data attributes into a c15t-managed script.
100
- - [Vercel Analytics](./integrations/vercel-analytics.md): Bootstrap Vercel Analytics with a declarative queue and script attributes.
101
- - [X Pixel (Twitter Pixel)](./integrations/x-pixel.md): Track conversions and build audiences for advertising campaigns on X (formerly Twitter).
102
- - [YouTube](./integrations/youtube.md): Keep YouTube iframes unmounted until consent with a privacy-enhanced, lazy-loaded React or Next.js embed.
73
+ - [Adobe Analytics](./integrations/adobe-analytics.md): Configure Adobe Analytics with c15t v3, understand measurement permission and verify loading and revocation.
74
+ - [Ahrefs Analytics](./integrations/ahrefs-analytics.md): Configure Ahrefs Analytics with c15t v3, understand measurement permission and verify loading and revocation.
75
+ - [Amplitude](./integrations/amplitude.md): Configure Amplitude with c15t v3, understand measurement permission and verify loading and revocation.
76
+ - [Custom integrations](./integrations/building-integrations.md): Define loading, initialization and consent-change behavior for a vendor without a helper.
77
+ - [Clearbit](./integrations/clearbit.md): Configure Clearbit with c15t v3, understand marketing permission and verify loading and revocation.
78
+ - [Cloudflare Web Analytics](./integrations/cloudflare-web-analytics.md): Configure Cloudflare Web Analytics with c15t v3, understand measurement permission and verify loading and revocation.
79
+ - [Crisp](./integrations/crisp.md): Configure Crisp with c15t v3, understand functionality permission and verify loading and revocation.
80
+ - [Databuddy](./integrations/databuddy.md): Configure Databuddy's initial and updated consent state with c15t v3.
81
+ - [Fathom Analytics](./integrations/fathom-analytics.md): Configure Fathom Analytics with c15t v3, understand measurement permission and verify loading and revocation.
82
+ - [Google Maps](./integrations/google-maps.md): Prevent a map iframe from mounting before the required permission.
83
+ - [Google Tag](./integrations/google-tag.md): Configure gtag with c15t Consent Mode signals and understand its loading behavior.
84
+ - [Google Tag Manager](./integrations/google-tag-manager.md): Load GTM with c15t consent signals and verify the tags inside your container.
85
+ - [Heap](./integrations/heap.md): Configure Heap with c15t v3, understand measurement permission and verify loading and revocation.
86
+ - [Hightouch](./integrations/hightouch.md): Configure Hightouch with c15t v3, understand measurement permission and verify loading and revocation.
87
+ - [Hotjar](./integrations/hotjar.md): Configure Hotjar with c15t v3, understand measurement permission and verify loading and revocation.
88
+ - [Intercom](./integrations/intercom.md): Load the Intercom messenger with functionality permission and configure its region.
89
+ - [LinkedIn Insight Tag](./integrations/linkedin-insights.md): Configure LinkedIn Insight Tag with c15t v3, understand marketing permission and verify loading and revocation.
90
+ - [LogRocket](./integrations/logrocket.md): Configure LogRocket with c15t v3, understand measurement permission and verify loading and revocation.
91
+ - [Matomo Analytics](./integrations/matomo-analytics.md): Choose gated loading or Matomo consent signaling and configure the correct tracker endpoints.
92
+ - [Meta Pixel](./integrations/meta-pixel.md): Register the Meta Pixel under marketing permission and verify event calls after revocation.
93
+ - [Microsoft Clarity](./integrations/microsoft-clarity.md): Configure Microsoft Clarity with c15t v3, understand measurement permission and verify loading and revocation.
94
+ - [Microsoft UET](./integrations/microsoft-uet.md): Configure Microsoft UET with c15t v3, understand marketing permission and verify loading and revocation.
95
+ - [Mixpanel](./integrations/mixpanel-analytics.md): Configure Mixpanel with c15t v3, understand measurement permission and verify loading and revocation.
96
+ - [OpenAI Pixel](./integrations/openai-pixel.md): Configure the OpenAI Measurement Pixel for ChatGPT Ads with c15t v3, manage marketing permission and verify conversion delivery.
97
+ - [Overview](./integrations/overview.md): Find all c15t integrations for analytics, tag managers, advertising, chat and embedded content.
98
+ - [Pirsch](./integrations/pirsch.md): Configure Pirsch with c15t v3, understand measurement permission and verify loading and revocation.
99
+ - [Plausible Analytics](./integrations/plausible-analytics.md): Configure Plausible Analytics with c15t v3, understand measurement permission and verify loading and revocation.
100
+ - [PostHog](./integrations/posthog.md): Choose PostHog loading and cookieless behavior, configure the region, and synchronize v3 permissions.
101
+ - [Promptwatch](./integrations/promptwatch.md): Configure Promptwatch with c15t v3, understand measurement permission and verify loading and revocation.
102
+ - [Reddit Pixel](./integrations/reddit-pixel.md): Configure Reddit Pixel with c15t v3, understand marketing permission and verify loading and revocation.
103
+ - [RudderStack](./integrations/rudderstack.md): Gate the RudderStack browser SDK or map c15t categories to destination consent IDs.
104
+ - [Rybbit Analytics](./integrations/rybbit-analytics.md): Configure Rybbit Analytics with c15t v3, understand measurement permission and verify loading and revocation.
105
+ - [Segment](./integrations/segment.md): Configure Segment with c15t v3, understand measurement permission and verify loading and revocation.
106
+ - [Snapchat Pixel](./integrations/snapchat-pixel.md): Configure Snapchat Pixel with c15t v3, understand marketing permission and verify loading and revocation.
107
+ - [TikTok Pixel](./integrations/tiktok-pixel.md): Configure TikTok Pixel with c15t v3, understand marketing permission and verify loading and revocation.
108
+ - [Umami Analytics](./integrations/umami-analytics.md): Configure Umami Analytics with c15t v3, understand measurement permission and verify loading and revocation.
109
+ - [Vercel Analytics](./integrations/vercel-analytics.md): Configure Vercel Analytics with c15t v3, understand measurement permission and verify loading and revocation.
110
+ - [X Pixel](./integrations/x-pixel.md): Configure X Pixel with c15t v3, understand marketing permission and verify loading and revocation.
111
+ - [YouTube](./integrations/youtube.md): Gate YouTube embeds with c15t v3 in Next.js, TanStack Start, React, Nuxt, Vue, Astro, Svelte, SvelteKit or JavaScript.
103
112
 
104
113
  ## Reference
105
114
 
106
- Concepts, legal templates, open-source policies, and contributor documentation.
107
-
108
- - [Client Modes](./shared/concepts/client-modes.md): Reference page for client modes.
109
- - [Consent Categories](./shared/concepts/consent-categories.md): Reference page for consent categories.
110
- - [Consent Models](./shared/concepts/consent-models.md): Reference page for consent models.
111
- - [Cookie Management](./shared/concepts/cookie-management.md): Reference page for cookie management.
112
- - [Glossary](./shared/concepts/glossary.md): Reference page for glossary.
113
- - [Initialization Flow](./shared/concepts/initialization-flow.md): Reference page for initialization flow.
114
- - [Policy Packs](./shared/concepts/policy-packs.md): Reference page for policy packs.
115
- - [Consent Banner](./shared/react/components/consent-banner.md): Reference page for consent banner.
116
- - [Consent Dialog](./shared/react/components/consent-dialog.md): Reference page for consent dialog.
117
- - [Consent Dialog Link](./shared/react/components/consent-dialog-link.md): Reference page for consent dialog link.
118
- - [Consent Dialog Trigger](./shared/react/components/consent-dialog-trigger.md): Reference page for consent dialog trigger.
119
- - [Consent Manager Provider](./shared/react/components/consent-manager-provider.md): Reference page for consent manager provider.
120
- - [Consent Widget](./shared/react/components/consent-widget.md): Reference page for consent widget.
121
- - [Dev Tools](./shared/react/components/dev-tools.md): Reference page for dev tools.
122
- - [Frame](./shared/react/components/frame.md): Reference page for frame.
123
- - [Building Headless Components](./shared/react/guides/building-headless-components.md): Reference page for building headless components.
124
- - [Callbacks](./shared/react/guides/callbacks.md): Reference page for callbacks.
125
- - [Headless](./shared/react/guides/headless.md): Reference page for headless.
126
- - [Iframe Blocking](./shared/react/guides/iframe-blocking.md): Reference page for iframe blocking.
127
- - [Internationalization](./shared/react/guides/internationalization.md): Reference page for internationalization.
128
- - [Network Blocker](./shared/react/guides/network-blocker.md): Reference page for network blocker.
129
- - [Optimization](./shared/react/guides/optimization.md): Reference page for optimization.
130
- - [Policy Packs](./shared/react/guides/policy-packs.md): Reference page for policy packs.
131
- - [Script Loader](./shared/react/guides/script-loader.md): Reference page for script loader.
132
- - [Use Color Scheme](./shared/react/hooks/use-color-scheme.md): Reference page for use color scheme.
133
- - [Checking Consent](./shared/react/hooks/use-consent-manager/checking-consent.md): Reference page for checking consent.
134
- - [Location Info](./shared/react/hooks/use-consent-manager/location-info.md): Reference page for location info.
135
- - [Overview](./shared/react/hooks/use-consent-manager/overview.md): Reference page for overview.
136
- - [Setting Consent](./shared/react/hooks/use-consent-manager/setting-consent.md): Reference page for setting consent.
137
- - [Use Draggable](./shared/react/hooks/use-draggable.md): Reference page for use draggable.
138
- - [Use Focus Trap](./shared/react/hooks/use-focus-trap.md): Reference page for use focus trap.
139
- - [Use Reduced Motion](./shared/react/hooks/use-reduced-motion.md): Reference page for use reduced motion.
140
- - [Use SSR Status](./shared/react/hooks/use-ssr-status.md): Reference page for use ssr status.
141
- - [Use Text Direction](./shared/react/hooks/use-text-direction.md): Reference page for use text direction.
142
- - [Use Translations](./shared/react/hooks/use-translations.md): Reference page for use translations.
143
- - [Consent Banner](./shared/react/iab/consent-banner.md): Reference page for consent banner.
144
- - [Consent Dialog](./shared/react/iab/consent-dialog.md): Reference page for consent dialog.
145
- - [Overview](./shared/react/iab/overview.md): Reference page for overview.
146
- - [Use GVL Data](./shared/react/iab/use-gvl-data.md): Reference page for use gvl data.
147
- - [Classnames](./shared/react/styling/classnames.md): Reference page for classnames.
148
- - [Color Scheme](./shared/react/styling/color-scheme.md): Reference page for color scheme.
149
- - [CSS Variables](./shared/react/styling/css-variables.md): Reference page for css variables.
150
- - [Overview](./shared/react/styling/overview.md): Reference page for overview.
151
- - [Slots](./shared/react/styling/slots.md): Reference page for slots.
152
- - [Stylesheet Entrypoint](./shared/react/styling/stylesheet-entrypoint.md): Reference page for stylesheet entrypoint.
153
- - [Tailwind](./shared/react/styling/tailwind.md): Reference page for tailwind.
154
- - [Tokens](./shared/react/styling/tokens.md): Reference page for tokens.
155
- - [Troubleshooting](./shared/troubleshooting.md): Reference page for troubleshooting.
115
+ - [Upgrade to v3 policies](./upgrade-v3.md): Migrate policy configuration, consent records, callbacks, and custom transports to the v3 policy system.
Binary file
Binary file
Binary file
Binary file
Binary file