@c15t/nextjs 2.1.0 → 2.2.1

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 (162) hide show
  1. package/AGENTS.md +155 -0
  2. package/README.md +31 -15
  3. package/client/components/integrations.js +3 -0
  4. package/dist/components/integrations/index.cjs +1 -0
  5. package/dist/components/integrations/index.js +1 -0
  6. package/dist/headless.cjs +1 -1
  7. package/dist/index.cjs +1 -1
  8. package/dist/libs/browser-initial-data.cjs +1 -1
  9. package/dist/libs/initial-data.cjs +1 -1
  10. package/dist/styles.tw3.css +1 -1
  11. package/dist/version.cjs +1 -1
  12. package/dist/version.js +1 -1
  13. package/dist-types/components/integrations/index.d.ts +1 -0
  14. package/dist-types/libs/browser-initial-data.d.ts +1 -1
  15. package/dist-types/version.d.ts +1 -1
  16. package/docs/README.md +155 -73
  17. package/docs/{building-headless-components.md → frameworks/next/building-headless-components.md} +3 -1
  18. package/docs/{callbacks.md → frameworks/next/callbacks.md} +3 -1
  19. package/docs/{components → frameworks/next/components}/consent-banner.md +10 -21
  20. package/docs/{components → frameworks/next/components}/consent-dialog-link.md +8 -5
  21. package/docs/frameworks/next/components/consent-dialog-trigger.md +202 -0
  22. package/docs/{components → frameworks/next/components}/consent-dialog.md +7 -15
  23. package/docs/frameworks/next/components/consent-manager-provider.md +327 -0
  24. package/docs/{components → frameworks/next/components}/consent-widget.md +8 -6
  25. package/docs/{components → frameworks/next/components}/dev-tools.md +9 -6
  26. package/docs/{components → frameworks/next/components}/frame.md +8 -9
  27. package/docs/{concepts → frameworks/next/concepts}/client-modes.md +4 -2
  28. package/docs/{concepts → frameworks/next/concepts}/consent-categories.md +1 -0
  29. package/docs/{concepts → frameworks/next/concepts}/consent-models.md +1 -0
  30. package/docs/{concepts → frameworks/next/concepts}/cookie-management.md +3 -3
  31. package/docs/{concepts → frameworks/next/concepts}/glossary.md +1 -0
  32. package/docs/{concepts → frameworks/next/concepts}/initialization-flow.md +1 -0
  33. package/docs/{concepts → frameworks/next/concepts}/policy-packs.md +1 -0
  34. package/docs/{headless.md → frameworks/next/headless.md} +3 -1
  35. package/docs/{hooks → frameworks/next/hooks}/use-color-scheme.md +1 -0
  36. package/docs/{hooks → frameworks/next/hooks}/use-consent-manager/checking-consent.md +3 -1
  37. package/docs/{hooks → frameworks/next/hooks}/use-consent-manager/location-info.md +3 -1
  38. package/docs/frameworks/next/hooks/use-consent-manager/overview.md +185 -0
  39. package/docs/{hooks → frameworks/next/hooks}/use-consent-manager/setting-consent.md +3 -1
  40. package/docs/{hooks → frameworks/next/hooks}/use-draggable.md +3 -1
  41. package/docs/{hooks → frameworks/next/hooks}/use-focus-trap.md +1 -0
  42. package/docs/{hooks → frameworks/next/hooks}/use-reduced-motion.md +3 -1
  43. package/docs/{hooks → frameworks/next/hooks}/use-ssr-status.md +6 -5
  44. package/docs/{hooks → frameworks/next/hooks}/use-text-direction.md +1 -0
  45. package/docs/frameworks/next/hooks/use-translations.md +55 -0
  46. package/docs/{iab → frameworks/next/iab}/consent-banner.md +9 -12
  47. package/docs/{iab → frameworks/next/iab}/consent-dialog.md +9 -14
  48. package/docs/{iab → frameworks/next/iab}/overview.md +4 -2
  49. package/docs/{iab → frameworks/next/iab}/use-gvl-data.md +3 -2
  50. package/docs/{iframe-blocking.md → frameworks/next/iframe-blocking.md} +8 -9
  51. package/docs/{internationalization.md → frameworks/next/internationalization.md} +13 -3
  52. package/docs/{network-blocker.md → frameworks/next/network-blocker.md} +13 -51
  53. package/docs/{optimization.md → frameworks/next/optimization.md} +5 -4
  54. package/docs/{policy-packs.md → frameworks/next/policy-packs.md} +3 -1
  55. package/docs/{quickstart.md → frameworks/next/quickstart.md} +26 -42
  56. package/docs/{script-loader.md → frameworks/next/script-loader.md} +72 -90
  57. package/docs/{server-side.md → frameworks/next/server-side.md} +12 -15
  58. package/docs/{styling → frameworks/next/styling}/classnames.md +3 -1
  59. package/docs/{styling → frameworks/next/styling}/color-scheme.md +3 -1
  60. package/docs/frameworks/next/styling/css-variables.md +53 -0
  61. package/docs/frameworks/next/styling/overview.md +299 -0
  62. package/docs/frameworks/next/styling/slots.md +94 -0
  63. package/docs/{styling → frameworks/next/styling}/tailwind.md +3 -1
  64. package/docs/frameworks/next/styling/tokens.md +156 -0
  65. package/docs/{troubleshooting.md → frameworks/next/troubleshooting.md} +3 -1
  66. package/docs/integrations/adobe-analytics.md +160 -0
  67. package/docs/integrations/ahrefs-analytics.md +15 -82
  68. package/docs/integrations/amplitude.md +230 -0
  69. package/docs/integrations/building-integrations.md +15 -181
  70. package/docs/integrations/clearbit.md +130 -0
  71. package/docs/integrations/cloudflare-web-analytics.md +15 -83
  72. package/docs/integrations/crisp.md +13 -87
  73. package/docs/integrations/databuddy.md +16 -85
  74. package/docs/integrations/fathom-analytics.md +15 -86
  75. package/docs/integrations/google-maps.md +263 -0
  76. package/docs/integrations/google-tag-manager.md +18 -86
  77. package/docs/integrations/google-tag.md +15 -84
  78. package/docs/integrations/heap.md +219 -0
  79. package/docs/integrations/hightouch.md +199 -0
  80. package/docs/integrations/hotjar.md +15 -83
  81. package/docs/integrations/intercom.md +13 -83
  82. package/docs/integrations/linkedin-insights.md +15 -82
  83. package/docs/integrations/logrocket.md +175 -0
  84. package/docs/integrations/matomo-analytics.md +13 -88
  85. package/docs/integrations/meta-pixel.md +33 -316
  86. package/docs/integrations/microsoft-clarity.md +15 -83
  87. package/docs/integrations/microsoft-uet.md +16 -83
  88. package/docs/integrations/mixpanel-analytics.md +15 -83
  89. package/docs/integrations/overview.md +55 -6
  90. package/docs/integrations/pirsch.md +142 -0
  91. package/docs/integrations/plausible-analytics.md +14 -97
  92. package/docs/integrations/posthog.md +26 -98
  93. package/docs/integrations/promptwatch.md +16 -82
  94. package/docs/integrations/reddit-pixel.md +27 -122
  95. package/docs/integrations/rudderstack.md +271 -0
  96. package/docs/integrations/rybbit-analytics.md +15 -94
  97. package/docs/integrations/segment.md +15 -82
  98. package/docs/integrations/snapchat-pixel.md +21 -102
  99. package/docs/integrations/tiktok-pixel.md +13 -81
  100. package/docs/integrations/umami-analytics.md +16 -88
  101. package/docs/integrations/vercel-analytics.md +13 -85
  102. package/docs/integrations/x-pixel.md +27 -102
  103. package/docs/integrations/youtube.md +193 -0
  104. package/docs/shared/concepts/client-modes.md +103 -0
  105. package/docs/shared/concepts/consent-categories.md +41 -0
  106. package/docs/shared/concepts/consent-models.md +72 -0
  107. package/docs/shared/concepts/cookie-management.md +88 -0
  108. package/docs/shared/concepts/glossary.md +24 -0
  109. package/docs/shared/concepts/initialization-flow.md +105 -0
  110. package/docs/shared/concepts/policy-packs.md +225 -0
  111. package/docs/shared/react/components/consent-banner.md +242 -0
  112. package/docs/shared/react/components/consent-dialog-link.md +45 -0
  113. package/docs/shared/react/components/consent-dialog-trigger.md +185 -0
  114. package/docs/shared/react/components/consent-dialog.md +119 -0
  115. package/docs/shared/react/components/consent-manager-provider.md +225 -0
  116. package/docs/shared/react/components/consent-widget.md +121 -0
  117. package/docs/shared/react/components/dev-tools.md +81 -0
  118. package/docs/shared/react/components/frame.md +52 -0
  119. package/docs/shared/react/guides/building-headless-components.md +110 -0
  120. package/docs/shared/react/guides/callbacks.md +89 -0
  121. package/docs/shared/react/guides/headless.md +31 -0
  122. package/docs/shared/react/guides/iframe-blocking.md +65 -0
  123. package/docs/shared/react/guides/internationalization.md +123 -0
  124. package/docs/shared/react/guides/network-blocker.md +72 -0
  125. package/docs/shared/react/guides/optimization.md +44 -0
  126. package/docs/shared/react/guides/policy-packs.md +173 -0
  127. package/docs/shared/react/guides/script-loader.md +311 -0
  128. package/docs/shared/react/hooks/use-color-scheme.md +31 -0
  129. package/docs/shared/react/hooks/use-consent-manager/checking-consent.md +95 -0
  130. package/docs/shared/react/hooks/use-consent-manager/location-info.md +96 -0
  131. package/docs/shared/react/hooks/use-consent-manager/overview.md +74 -0
  132. package/docs/shared/react/hooks/use-consent-manager/setting-consent.md +93 -0
  133. package/docs/shared/react/hooks/use-draggable.md +30 -0
  134. package/docs/shared/react/hooks/use-focus-trap.md +20 -0
  135. package/docs/shared/react/hooks/use-reduced-motion.md +33 -0
  136. package/docs/shared/react/hooks/use-ssr-status.md +16 -0
  137. package/docs/shared/react/hooks/use-text-direction.md +38 -0
  138. package/docs/shared/react/hooks/use-translations.md +15 -0
  139. package/docs/shared/react/iab/consent-banner.md +60 -0
  140. package/docs/shared/react/iab/consent-dialog.md +76 -0
  141. package/docs/shared/react/iab/overview.md +80 -0
  142. package/docs/shared/react/iab/use-gvl-data.md +21 -0
  143. package/docs/shared/react/styling/classnames.md +93 -0
  144. package/docs/shared/react/styling/color-scheme.md +35 -0
  145. package/docs/shared/react/styling/css-variables.md +53 -0
  146. package/docs/shared/react/styling/overview.md +261 -0
  147. package/docs/shared/react/styling/slots.md +93 -0
  148. package/docs/shared/react/styling/stylesheet-entrypoint.md +8 -0
  149. package/docs/shared/react/styling/tailwind.md +88 -0
  150. package/docs/shared/react/styling/tokens.md +155 -0
  151. package/docs/shared/troubleshooting.md +82 -0
  152. package/package.json +19 -10
  153. package/readme.json +14 -8
  154. package/docs/ai-agents.md +0 -111
  155. package/docs/components/consent-dialog-trigger.md +0 -103
  156. package/docs/components/consent-manager-provider.md +0 -425
  157. package/docs/hooks/use-consent-manager/overview.md +0 -420
  158. package/docs/hooks/use-translations.md +0 -118
  159. package/docs/styling/css-variables.md +0 -92
  160. package/docs/styling/overview.md +0 -457
  161. package/docs/styling/slots.md +0 -128
  162. package/docs/styling/tokens.md +0 -216
@@ -1,7 +1,8 @@
1
1
  ---
2
2
  title: Mixpanel Analytics
3
- description: Load Mixpanel with c15t and let Mixpanel's own opt-in and opt-out APIs follow measurement consent.
4
- lastModified: 2026-05-10
3
+ description: Load Mixpanel with c15t and let Mixpanel's own opt-in and opt-out
4
+ APIs follow measurement consent.
5
+ group: integrations
5
6
  icon: mixpanel
6
7
  ---
7
8
  Mixpanel helps you track product usage, funnels, and retention. The `mixpanelAnalytics()` helper always loads the Mixpanel library, initializes it after the bundle is ready, and uses Mixpanel's own `opt_in_tracking()` and `opt_out_tracking()` methods to keep tracking aligned with `measurement` consent.
@@ -112,87 +113,18 @@ Because Mixpanel is configured with `alwaysLoad: true`, `window.mixpanel` is ava
112
113
 
113
114
  ### MixpanelAnalyticsOptions
114
115
 
115
- |Property|Type|Description|Default|Required|
116
- |:--|:--|:--|:--|:--:|
117
- |token|string|Your Mixpanel project token.|-|✅ Required|
118
- |initOptions|Record\<string, unknown> \|undefined|Mixpanel init options passed after the library loads. The manifest engine serializes this object as a template variable, so use JSON-serializable values only (no functions, class instances, prototypes, \`Map\`, \`Set\`, or other non-JSON types). Named instances and nested \`people.\*\` queue helpers are intentionally out of scope for this helper.|-|Optional|
119
- |scriptUrl|string \|undefined|Mixpanel loader URL.|-|Optional|
116
+ |Property|Value|
117
+ |:--|:--|
118
+ |Type Name|\`MixpanelAnalyticsOptions\`|
119
+ |Source Path|\`./packages/scripts/src/vendors/analytics/mixpanel-analytics.ts\`|
120
+
121
+ \*ExtractedTypeTable: Could not extract "MixpanelAnalyticsOptions" from "./packages/scripts/src/vendors/analytics/mixpanel-analytics.ts" using base path "/home/runner/work/c15t/c15t". Verify the path/name and that the file is included by your tsconfig.\*
120
122
 
121
123
  ### Script
122
124
 
123
- |Property|Type|Description|Default|Required|
124
- |:--|:--|:--|:--|:--:|
125
- |id|string|Unique identifier for the script|-|✅ Required|
126
- |src|string \|undefined|URL of the script to load|-|Optional|
127
- |textContent|string \|undefined|Inline JavaScript code to execute|-|Optional|
128
- |category|HasCondition\<AllConsentNames>|Consent category or condition required to load this script|-|✅ Required|
129
- |callbackOnly|boolean \|undefined|Whether this is a callback-only script that doesn't need to load an external resource. When true, no script tag will be added to the DOM, only callbacks will be executed.|false|Optional|
130
- |persistAfterConsentRevoked|boolean \|undefined|Whether the script should persist after consent is revoked.|false|Optional|
131
- |alwaysLoad|boolean \|undefined|Whether the script should always load regardless of consent state. This is useful for scripts like Google Tag Manager or PostHog that manage their own consent state internally. The script will load immediately and never be unloaded based on consent changes. Note: When using this option, you are responsible for ensuring the script itself respects user consent preferences through its own consent management.|false|Optional|
132
- |fetchPriority|"high" \|"low" \|"auto" \|undefined|Priority hint for browser resource loading|-|Optional|
133
- |attributes|Record\<string, string> \|undefined|Additional attributes to add to the script element|-|Optional|
134
- |async|boolean \|undefined|Whether to use async loading|-|Optional|
135
- |defer|boolean \|undefined|Whether to defer script loading|-|Optional|
136
- |nonce|string \|undefined|Content Security Policy nonce|-|Optional|
137
- |anonymizeId|boolean \|undefined|Whether to use an anonymized ID for the script element, this helps ensure the script is not blocked by ad blockers|true|Optional|
138
- |target|"head" \|"body" \|undefined|Where to inject the script element in the DOM. Options: \`'head'\`: Scripts are appended to \`\<head>\` (default); \`'body'\`: Scripts are appended to \`\<body>\`|'head'|Optional|
139
- |onBeforeLoad|Object \|undefined|Callback executed before the script is loaded|-|Optional|
140
- |onLoad|Object \|undefined|Callback executed when the script loads successfully|-|Optional|
141
- |onError|Object \|undefined|Callback executed if the script fails to load|-|Optional|
142
- |onConsentChange|Object \|undefined|Callback executed whenever the consent store is changed. This callback only applies to scripts already loaded.|-|Optional|
143
- |vendorId|string \|number \|undefined|IAB TCF vendor ID - links script to a registered vendor. When in IAB mode, the script will only load if this vendor has consent. Takes precedence over \`category\` when in IAB mode. Use custom vendor IDs (string or number) to gate non-IAB vendors too.|-|Optional|
144
- |iabPurposes|number\[] \|undefined|IAB TCF purpose IDs this script requires consent for. When in IAB mode and no vendorId is set, the script will only load if ALL specified purposes have consent.|-|Optional|
145
- |iabLegIntPurposes|number\[] \|undefined|IAB TCF legitimate interest purpose IDs. These purposes can operate under legitimate interest instead of consent. The script loads if all iabPurposes have consent OR all iabLegIntPurposes have legitimate interest established.|-|Optional|
146
- |iabSpecialFeatures|number\[] \|undefined|IAB TCF special feature IDs this script requires. Options: 1: Use precise geolocation data; 2: Actively scan device characteristics for identification|-|Optional|
147
-
148
- #### `onBeforeLoad`
149
-
150
- Callback executed before the script is loaded
151
-
152
- |Property|Type|Description|Default|Required|
153
- |:--|:--|:--|:--|:--:|
154
- |id|string|The original script ID|-|✅ Required|
155
- |elementId|string|The actual DOM element ID used (anonymized if enabled)|-|✅ Required|
156
- |hasConsent|boolean|Has consent|-|✅ Required|
157
- |consents|ConsentState|The current consent state|-|✅ Required|
158
- |element|HTMLScriptElement \|undefined|The script element (for load/error callbacks) Will be undefined for callback-only scripts|-|Optional|
159
- |error|Error \|undefined|Error information (for error callbacks)|-|Optional|
160
-
161
- #### `onLoad`
162
-
163
- Callback executed when the script loads successfully
164
-
165
- |Property|Type|Description|Default|Required|
166
- |:--|:--|:--|:--|:--:|
167
- |id|string|The original script ID|-|✅ Required|
168
- |elementId|string|The actual DOM element ID used (anonymized if enabled)|-|✅ Required|
169
- |hasConsent|boolean|Has consent|-|✅ Required|
170
- |consents|ConsentState|The current consent state|-|✅ Required|
171
- |element|HTMLScriptElement \|undefined|The script element (for load/error callbacks) Will be undefined for callback-only scripts|-|Optional|
172
- |error|Error \|undefined|Error information (for error callbacks)|-|Optional|
173
-
174
- #### `onError`
175
-
176
- Callback executed if the script fails to load
177
-
178
- |Property|Type|Description|Default|Required|
179
- |:--|:--|:--|:--|:--:|
180
- |id|string|The original script ID|-|✅ Required|
181
- |elementId|string|The actual DOM element ID used (anonymized if enabled)|-|✅ Required|
182
- |hasConsent|boolean|Has consent|-|✅ Required|
183
- |consents|ConsentState|The current consent state|-|✅ Required|
184
- |element|HTMLScriptElement \|undefined|The script element (for load/error callbacks) Will be undefined for callback-only scripts|-|Optional|
185
- |error|Error \|undefined|Error information (for error callbacks)|-|Optional|
186
-
187
- #### `onConsentChange`
188
-
189
- Callback executed whenever the consent store is changed. This callback only applies to scripts already loaded.
190
-
191
- |Property|Type|Description|Default|Required|
192
- |:--|:--|:--|:--|:--:|
193
- |id|string|The original script ID|-|✅ Required|
194
- |elementId|string|The actual DOM element ID used (anonymized if enabled)|-|✅ Required|
195
- |hasConsent|boolean|Has consent|-|✅ Required|
196
- |consents|ConsentState|The current consent state|-|✅ Required|
197
- |element|HTMLScriptElement \|undefined|The script element (for load/error callbacks) Will be undefined for callback-only scripts|-|Optional|
198
- |error|Error \|undefined|Error information (for error callbacks)|-|Optional|
125
+ |Property|Value|
126
+ |:--|:--|
127
+ |Type Name|\`Script\`|
128
+ |Source Path|\`./packages/core/src/libs/script-loader/types.ts\`|
129
+
130
+ \*ExtractedTypeTable: Could not extract "Script" from "./packages/core/src/libs/script-loader/types.ts" using base path "/home/runner/work/c15t/c15t". Verify the path/name and that the file is included by your tsconfig.\*
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  title: Integrations
3
- description: "Load analytics, pixels, tag managers, and widgets through c15t so consent state controls when they run, update, and appear in your consent UI."
4
- lastModified: 2026-05-12
5
-
3
+ description: Load analytics, pixels, tag managers, and widgets through c15t so
4
+ consent state controls when they run, update, and appear in your consent UI.
5
+ group: integrations
6
6
  ---
7
7
  Third-party tools are easy to paste into app code, but consent makes them part
8
8
  of your privacy runtime. Analytics SDKs, ad pixels, tag managers, and chat
@@ -38,7 +38,7 @@ lifecycles.
38
38
 
39
39
  ## Built-In Helpers
40
40
 
41
- c15t ships prebuilt helpers in
41
+ c15t ships prebuilt script helpers in
42
42
  [`@c15t/scripts`](https://www.npmjs.com/package/@c15t/scripts) for the
43
43
  third-party tools developers integrate most often. Prefer them over copied
44
44
  vendor snippets whenever c15t already supports the vendor.
@@ -63,22 +63,70 @@ Most apps mix more than one style. Pick the smallest one that keeps consent beha
63
63
 
64
64
  Setup is the same shape in every framework: import the helper, call it with vendor options, and pass the result to the consent runtime through your provider's `scripts` option. See the framework guides for end-to-end snippets — [JavaScript](/docs/frameworks/javascript/script-loader), [React](/docs/frameworks/react/script-loader), [Next.js](/docs/frameworks/next/script-loader).
65
65
 
66
+ ## Renderable Integrations
67
+
68
+ Maps and video embeds need a visible component as well as consent-aware loading.
69
+ The React and Next.js packages include components that own the placeholder,
70
+ vendor loading, and rendered surface. They are imported from the framework
71
+ package rather than `@c15t/scripts`.
72
+
73
+ * [Google Maps](/docs/integrations/google-maps)
74
+ * [YouTube](/docs/integrations/youtube)
75
+
66
76
  ## Analytics
67
77
 
68
78
  Analytics integrations usually require `measurement` consent. Some vendors can run in a consent-aware or cookieless mode; others should stay fully blocked until measurement consent is granted.
69
79
 
80
+ * [Google Tag (gtag.js)](/docs/integrations/google-tag)
81
+ * [Ahrefs Analytics](/docs/integrations/ahrefs-analytics)
82
+ * [Adobe Analytics](/docs/integrations/adobe-analytics)
83
+ * [Amplitude](/docs/integrations/amplitude)
84
+ * [Cloudflare Web Analytics](/docs/integrations/cloudflare-web-analytics)
85
+ * [Clearbit](/docs/integrations/clearbit)
86
+ * [Microsoft Clarity](/docs/integrations/microsoft-clarity)
87
+ * [Databuddy](/docs/integrations/databuddy)
88
+ * [Rybbit Analytics](/docs/integrations/rybbit-analytics)
89
+ * [Fathom Analytics](/docs/integrations/fathom-analytics)
90
+ * [Heap](/docs/integrations/heap)
91
+ * [Mixpanel Analytics](/docs/integrations/mixpanel-analytics)
92
+ * [Hotjar](/docs/integrations/hotjar)
93
+ * [Hightouch](/docs/integrations/hightouch)
94
+ * [LogRocket](/docs/integrations/logrocket)
95
+ * [Matomo Analytics](/docs/integrations/matomo-analytics)
96
+ * [PostHog](/docs/integrations/posthog)
97
+ * [Promptwatch](/docs/integrations/promptwatch)
98
+ * [Pirsch](/docs/integrations/pirsch)
99
+ * [RudderStack](/docs/integrations/rudderstack)
100
+ * [Segment](/docs/integrations/segment)
101
+ * [Plausible Analytics](/docs/integrations/plausible-analytics)
102
+ * [Umami Analytics](/docs/integrations/umami-analytics)
103
+ * [Vercel Analytics](/docs/integrations/vercel-analytics)
104
+
70
105
  ## Functional
71
106
 
72
107
  Functional integrations usually require `functionality` consent. They add optional user-facing capabilities, such as chat widgets, that should only run after the user allows them.
73
108
 
109
+ * [Crisp](/docs/integrations/crisp)
110
+ * [Intercom](/docs/integrations/intercom)
111
+
74
112
  ## Ads & Pixels
75
113
 
76
114
  Advertising pixels usually require `marketing` consent. Many of them need startup stubs so events can be queued safely before the remote SDK loads — built-in helpers handle this for you.
77
115
 
116
+ * [Meta Pixel](/docs/integrations/meta-pixel)
117
+ * [Snapchat Pixel](/docs/integrations/snapchat-pixel)
118
+ * [Reddit Pixel](/docs/integrations/reddit-pixel)
119
+ * [TikTok Pixel](/docs/integrations/tiktok-pixel)
120
+ * [LinkedIn Insight Tag](/docs/integrations/linkedin-insights)
121
+ * [Microsoft UET](/docs/integrations/microsoft-uet)
122
+ * [X (Twitter) Pixel](/docs/integrations/x-pixel)
123
+
78
124
  ## Tag Managers
79
125
 
80
126
  Tag managers can load other scripts, so they deserve extra care. Prefer vendor consent modes and denied defaults before any tags are allowed to run.
81
127
 
128
+ * [Google Tag Manager](/docs/integrations/google-tag-manager)
129
+
82
130
  ## Build Your Own
83
131
 
84
132
  If c15t does not ship the vendor you need, drop down a level:
@@ -96,5 +144,6 @@ Learn when to use a raw `Script`, when to use a manifest, and how to debug and t
96
144
  ## Where To Next
97
145
 
98
146
  * Read the script loader guide for your framework: [JavaScript](/docs/frameworks/javascript/script-loader), [React](/docs/frameworks/react/script-loader), [Next.js](/docs/frameworks/next/script-loader).
99
- * See the [iframe blocking](/docs/frameworks/react/iframe-blocking) pattern for visible embeds (YouTube, maps, calendars).
100
- * Use [`has()`](/docs/frameworks/javascript/store/checking-consent) to conditionally run app code based on consent state.
147
+ * Use the [Google Maps](/docs/integrations/google-maps) and [YouTube](/docs/integrations/youtube) components for built-in renderable integrations.
148
+ * See the [iframe blocking](/docs/frameworks/react/iframe-blocking) pattern for other visible embeds such as calendars and social widgets.
149
+ * Use [`has()`](/docs/frameworks/javascript/api/checking-consent) to conditionally run app code based on consent state.
@@ -0,0 +1,142 @@
1
+ ---
2
+ title: Pirsch
3
+ description: Privacy-friendly, cookieless analytics loaded with Pirsch's fixed
4
+ script id and identification-code attributes.
5
+ group: integrations
6
+ icon: pirsch
7
+ ---
8
+ [Pirsch](https://pirsch.io) provides privacy-friendly, cookieless web analytics. The official embed loads a single deferred script with an `id` of `pianjs` and your `data-code` identification code. c15t preserves that script id so the Pirsch loader can find its own element and read the configured attributes.
9
+
10
+ ## Integrate with c15t
11
+
12
+ **React**
13
+
14
+ ```tsx
15
+ import { type ReactNode } from 'react';
16
+ import { ConsentManagerProvider } from '@c15t/react';
17
+ import { pirsch } from '@c15t/scripts/pirsch';
18
+
19
+ const scripts = [
20
+ pirsch({
21
+ identificationCode: 'YOUR_IDENTIFICATION_CODE',
22
+ }),
23
+ ];
24
+
25
+ export function ConsentProvider({ children }: { children: ReactNode }) {
26
+ return (
27
+ <ConsentManagerProvider
28
+ options={{
29
+ mode: 'hosted',
30
+ backendURL: 'https://your-instance.c15t.dev',
31
+ scripts,
32
+ }}
33
+ >
34
+ {children}
35
+ </ConsentManagerProvider>
36
+ );
37
+ }
38
+ ```
39
+
40
+ **Next.js**
41
+
42
+ ```tsx
43
+ 'use client';
44
+
45
+ import { type ReactNode } from 'react';
46
+ import { ConsentManagerProvider } from '@c15t/nextjs';
47
+ import { pirsch } from '@c15t/scripts/pirsch';
48
+
49
+ const scripts = [
50
+ pirsch({
51
+ identificationCode: 'YOUR_IDENTIFICATION_CODE',
52
+ }),
53
+ ];
54
+
55
+ export function ConsentProvider({ children }: { children: ReactNode }) {
56
+ return (
57
+ <ConsentManagerProvider
58
+ options={{
59
+ mode: 'hosted',
60
+ backendURL: '/api/c15t',
61
+ scripts,
62
+ }}
63
+ >
64
+ {children}
65
+ </ConsentManagerProvider>
66
+ );
67
+ }
68
+ ```
69
+
70
+ **JavaScript**
71
+
72
+ ```ts
73
+ import { getOrCreateConsentRuntime } from 'c15t';
74
+ import { pirsch } from '@c15t/scripts/pirsch';
75
+
76
+ getOrCreateConsentRuntime({
77
+ mode: 'hosted',
78
+ backendURL: 'https://your-instance.c15t.dev',
79
+ scripts: [
80
+ pirsch({
81
+ identificationCode: 'YOUR_IDENTIFICATION_CODE',
82
+ }),
83
+ ],
84
+ });
85
+ ```
86
+
87
+ ## How c15t loads it
88
+
89
+ * **Category:** `measurement` (Analytics)
90
+ * **Loads when:** measurement consent is granted
91
+ * **On revocation:** unloaded — c15t removes the script element from the DOM. Pirsch is cookieless, so no client-side cookies need clearing.
92
+
93
+ The helper maps Pirsch's core script attributes:
94
+
95
+ ```ts
96
+ pirsch({
97
+ identificationCode: 'YOUR_IDENTIFICATION_CODE',
98
+ domain: 'rollup.example.com:ROLLUP_IDENTIFICATION_CODE',
99
+ dev: 'example.com',
100
+ hitEndpoint: 'https://analytics.example.com/hit',
101
+ eventEndpoint: 'https://analytics.example.com/event',
102
+ disablePageViews: true,
103
+ })
104
+ ```
105
+
106
+ Use the extended loader when you need Pirsch's extended script variant:
107
+
108
+ ```ts
109
+ pirsch({
110
+ identificationCode: 'YOUR_IDENTIFICATION_CODE',
111
+ extended: true,
112
+ })
113
+ ```
114
+
115
+ To proxy or self-host the loader, pass a custom URL:
116
+
117
+ ```ts
118
+ pirsch({
119
+ identificationCode: 'YOUR_IDENTIFICATION_CODE',
120
+ scriptUrl: 'https://analytics.example.com/pa.js',
121
+ })
122
+ ```
123
+
124
+ ## Types
125
+
126
+ ### PirschOptions
127
+
128
+ |Property|Value|
129
+ |:--|:--|
130
+ |Type Name|\`PirschOptions\`|
131
+ |Source Path|\`./packages/scripts/src/vendors/analytics/pirsch.ts\`|
132
+
133
+ \*ExtractedTypeTable: Could not extract "PirschOptions" from "./packages/scripts/src/vendors/analytics/pirsch.ts" using base path "/home/runner/work/c15t/c15t". Verify the path/name and that the file is included by your tsconfig.\*
134
+
135
+ ### Script
136
+
137
+ |Property|Value|
138
+ |:--|:--|
139
+ |Type Name|\`Script\`|
140
+ |Source Path|\`./packages/core/src/libs/script-loader/types.ts\`|
141
+
142
+ \*ExtractedTypeTable: Could not extract "Script" from "./packages/core/src/libs/script-loader/types.ts" using base path "/home/runner/work/c15t/c15t". Verify the path/name and that the file is included by your tsconfig.\*
@@ -1,7 +1,8 @@
1
1
  ---
2
2
  title: Plausible Analytics
3
- description: Privacy-friendly cookieless analytics with a prebuilt helper that preserves Plausible's queue bootstrap and loader attributes.
4
- lastModified: 2026-05-10
3
+ description: Privacy-friendly cookieless analytics with a prebuilt helper that
4
+ preserves Plausible's queue bootstrap and loader attributes.
5
+ group: integrations
5
6
  icon: plausible
6
7
  ---
7
8
  Plausible Analytics is a privacy-friendly, cookieless analytics product with a lightweight script loader. The `plausibleAnalytics()` helper models Plausible's queue bootstrap and script attributes as a c15t-managed script so early `window.plausible(...)` calls are buffered safely until the tracker loads.
@@ -136,102 +137,18 @@ if (consentStore.getState().has('measurement')) {
136
137
 
137
138
  ### PlausibleAnalyticsOptions
138
139
 
139
- |Property|Type|Description|Default|Required|
140
- |:--|:--|:--|:--|:--:|
141
- |scriptId|string \|undefined|Unique Plausible script ID for the new script format.|-|Optional|
142
- |domain|string \|undefined|Legacy domain-based site identifier.|-|Optional|
143
- |extension|PlausibleExtension \|undefined|Legacy script extensions.|-|Optional|
144
- |customProperties|Record\<string, unknown> \|undefined|Properties tracked with each pageview.|-|Optional|
145
- |endpoint|string \|undefined|Custom tracking endpoint.|-|Optional|
146
- |fileDownloads|Object \|undefined|File download tracking configuration.|-|Optional|
147
- |hashBasedRouting|boolean \|undefined|Enable hash-based routing support.|-|Optional|
148
- |autoCapturePageviews|boolean \|undefined|Disable automatic pageview capture when set to \`false\`.|-|Optional|
149
- |captureOnLocalhost|boolean \|undefined|Enable tracking on localhost.|-|Optional|
150
- |scriptUrl|string \|undefined|Custom loader URL.|-|Optional|
140
+ |Property|Value|
141
+ |:--|:--|
142
+ |Type Name|\`PlausibleAnalyticsOptions\`|
143
+ |Source Path|\`./packages/scripts/src/vendors/analytics/plausible-analytics.ts\`|
151
144
 
152
- #### `fileDownloads`
153
-
154
- File download tracking configuration.
155
-
156
- |Property|Type|Description|Default|Required|
157
- |:--|:--|:--|:--|:--:|
158
- |fileExtensions|string\[] \|undefined|-|-|Optional|
145
+ \*ExtractedTypeTable: Could not extract "PlausibleAnalyticsOptions" from "./packages/scripts/src/vendors/analytics/plausible-analytics.ts" using base path "/home/runner/work/c15t/c15t". Verify the path/name and that the file is included by your tsconfig.\*
159
146
 
160
147
  ### Script
161
148
 
162
- |Property|Type|Description|Default|Required|
163
- |:--|:--|:--|:--|:--:|
164
- |id|string|Unique identifier for the script|-|✅ Required|
165
- |src|string \|undefined|URL of the script to load|-|Optional|
166
- |textContent|string \|undefined|Inline JavaScript code to execute|-|Optional|
167
- |category|HasCondition\<AllConsentNames>|Consent category or condition required to load this script|-|✅ Required|
168
- |callbackOnly|boolean \|undefined|Whether this is a callback-only script that doesn't need to load an external resource. When true, no script tag will be added to the DOM, only callbacks will be executed.|false|Optional|
169
- |persistAfterConsentRevoked|boolean \|undefined|Whether the script should persist after consent is revoked.|false|Optional|
170
- |alwaysLoad|boolean \|undefined|Whether the script should always load regardless of consent state. This is useful for scripts like Google Tag Manager or PostHog that manage their own consent state internally. The script will load immediately and never be unloaded based on consent changes. Note: When using this option, you are responsible for ensuring the script itself respects user consent preferences through its own consent management.|false|Optional|
171
- |fetchPriority|"high" \|"low" \|"auto" \|undefined|Priority hint for browser resource loading|-|Optional|
172
- |attributes|Record\<string, string> \|undefined|Additional attributes to add to the script element|-|Optional|
173
- |async|boolean \|undefined|Whether to use async loading|-|Optional|
174
- |defer|boolean \|undefined|Whether to defer script loading|-|Optional|
175
- |nonce|string \|undefined|Content Security Policy nonce|-|Optional|
176
- |anonymizeId|boolean \|undefined|Whether to use an anonymized ID for the script element, this helps ensure the script is not blocked by ad blockers|true|Optional|
177
- |target|"head" \|"body" \|undefined|Where to inject the script element in the DOM. Options: \`'head'\`: Scripts are appended to \`\<head>\` (default); \`'body'\`: Scripts are appended to \`\<body>\`|'head'|Optional|
178
- |onBeforeLoad|Object \|undefined|Callback executed before the script is loaded|-|Optional|
179
- |onLoad|Object \|undefined|Callback executed when the script loads successfully|-|Optional|
180
- |onError|Object \|undefined|Callback executed if the script fails to load|-|Optional|
181
- |onConsentChange|Object \|undefined|Callback executed whenever the consent store is changed. This callback only applies to scripts already loaded.|-|Optional|
182
- |vendorId|string \|number \|undefined|IAB TCF vendor ID - links script to a registered vendor. When in IAB mode, the script will only load if this vendor has consent. Takes precedence over \`category\` when in IAB mode. Use custom vendor IDs (string or number) to gate non-IAB vendors too.|-|Optional|
183
- |iabPurposes|number\[] \|undefined|IAB TCF purpose IDs this script requires consent for. When in IAB mode and no vendorId is set, the script will only load if ALL specified purposes have consent.|-|Optional|
184
- |iabLegIntPurposes|number\[] \|undefined|IAB TCF legitimate interest purpose IDs. These purposes can operate under legitimate interest instead of consent. The script loads if all iabPurposes have consent OR all iabLegIntPurposes have legitimate interest established.|-|Optional|
185
- |iabSpecialFeatures|number\[] \|undefined|IAB TCF special feature IDs this script requires. Options: 1: Use precise geolocation data; 2: Actively scan device characteristics for identification|-|Optional|
186
-
187
- #### `onBeforeLoad`
188
-
189
- Callback executed before the script is loaded
190
-
191
- |Property|Type|Description|Default|Required|
192
- |:--|:--|:--|:--|:--:|
193
- |id|string|The original script ID|-|✅ Required|
194
- |elementId|string|The actual DOM element ID used (anonymized if enabled)|-|✅ Required|
195
- |hasConsent|boolean|Has consent|-|✅ Required|
196
- |consents|ConsentState|The current consent state|-|✅ Required|
197
- |element|HTMLScriptElement \|undefined|The script element (for load/error callbacks) Will be undefined for callback-only scripts|-|Optional|
198
- |error|Error \|undefined|Error information (for error callbacks)|-|Optional|
199
-
200
- #### `onLoad`
201
-
202
- Callback executed when the script loads successfully
203
-
204
- |Property|Type|Description|Default|Required|
205
- |:--|:--|:--|:--|:--:|
206
- |id|string|The original script ID|-|✅ Required|
207
- |elementId|string|The actual DOM element ID used (anonymized if enabled)|-|✅ Required|
208
- |hasConsent|boolean|Has consent|-|✅ Required|
209
- |consents|ConsentState|The current consent state|-|✅ Required|
210
- |element|HTMLScriptElement \|undefined|The script element (for load/error callbacks) Will be undefined for callback-only scripts|-|Optional|
211
- |error|Error \|undefined|Error information (for error callbacks)|-|Optional|
212
-
213
- #### `onError`
214
-
215
- Callback executed if the script fails to load
216
-
217
- |Property|Type|Description|Default|Required|
218
- |:--|:--|:--|:--|:--:|
219
- |id|string|The original script ID|-|✅ Required|
220
- |elementId|string|The actual DOM element ID used (anonymized if enabled)|-|✅ Required|
221
- |hasConsent|boolean|Has consent|-|✅ Required|
222
- |consents|ConsentState|The current consent state|-|✅ Required|
223
- |element|HTMLScriptElement \|undefined|The script element (for load/error callbacks) Will be undefined for callback-only scripts|-|Optional|
224
- |error|Error \|undefined|Error information (for error callbacks)|-|Optional|
225
-
226
- #### `onConsentChange`
227
-
228
- Callback executed whenever the consent store is changed. This callback only applies to scripts already loaded.
229
-
230
- |Property|Type|Description|Default|Required|
231
- |:--|:--|:--|:--|:--:|
232
- |id|string|The original script ID|-|✅ Required|
233
- |elementId|string|The actual DOM element ID used (anonymized if enabled)|-|✅ Required|
234
- |hasConsent|boolean|Has consent|-|✅ Required|
235
- |consents|ConsentState|The current consent state|-|✅ Required|
236
- |element|HTMLScriptElement \|undefined|The script element (for load/error callbacks) Will be undefined for callback-only scripts|-|Optional|
237
- |error|Error \|undefined|Error information (for error callbacks)|-|Optional|
149
+ |Property|Value|
150
+ |:--|:--|
151
+ |Type Name|\`Script\`|
152
+ |Source Path|\`./packages/core/src/libs/script-loader/types.ts\`|
153
+
154
+ \*ExtractedTypeTable: Could not extract "Script" from "./packages/core/src/libs/script-loader/types.ts" using base path "/home/runner/work/c15t/c15t". Verify the path/name and that the file is included by your tsconfig.\*