@c15t/integrations: Cookie consent integrations for analytics, ads and widgets
Cookie consent integrations for Google Tag Manager, GA4, Google Ads, Meta Pixel, Wisepops popups, Attentive email and SMS marketing, Customer.io, analytics tools, pixels, tag managers, and widgets. Control when scripts load and send visitors' choices through Google Consent Mode v2 and other vendor consent APIs.
c15t is used by 2,100+ sites, including expo.dev, zed.dev, unkey.dev, mintlify.com, and sazabi.com.
Key Features
- Most loaders run when the visitor's consent policy allows their category. A few, such as Google Tag Manager, load immediately and pass permission updates to the vendor's consent API
- Prebuilt script loaders for popular analytics, advertising, marketing, and functional tools
- Google Tag Manager support with Google Consent Mode v2 defaults and consent updates
- Google Analytics 4 and Google Ads support through gtag.js
- Consent-gated Meta Pixel and conversion pixel loading
- Supported vendors include Google Tag Manager, Meta Pixel, OpenAI Pixel, Amplitude, FullStory, Heap, PostHog, TikTok Pixel, LinkedIn Insights, Microsoft UET, X Pixel, Reddit Pixel, Snapchat Pixel, Ada, Intercom, Crisp, ActiveCampaign, Gorgias Chat, Zendesk Messaging, Attentive, Customer.io, Insider, Klaviyo, Appcues, Wisepops, and more
Documentation
See the documentation for guides, API reference, and examples.
Integrations
Find integrations by what each tool does. The overview lists each helper, its consent category, and its loading behavior.
Web analytics
- Google Analytics 4 + Google Ads (gtag.js): Consent Mode v2 defaults and consent updates when users make a choice (guide)
- Plausible, Fathom, Umami, Vercel Analytics, Cloudflare Web Analytics, Matomo, Adobe Analytics, Ahrefs Analytics, Databuddy, Pirsch, Rybbit, OneDollarStats, Promptwatch, and Statable
Product analytics
- PostHog: Loads before or after measurement consent, with switches that stop PostHog downloading its surveys, heatmaps, dead clicks and web vitals modules or requesting
/flags(guide) - Amplitude, Heap, Mixpanel, and Gainsight PX
- Pendo: Loads after measurement consent; stops and resumes event sending when consent changes (guide)
Replay and monitoring
- FullStory, Microsoft Clarity, Hotjar, LogRocket, Lucky Orange, and Vercel Speed Insights
- Sentry: Loads Sentry from its CDN or works with your own SDK; Session Replay and user data wait for measurement, and error monitoring can too (guide)
Experimentation and personalization
- Adobe Target, Appcues, Dynamic Yield, Optimizely Web Experimentation, and Wisepops. Wisepops waits for marketing consent by default; the others wait for experience consent
Ads and growth
- Conversion pixels: Meta Pixel, OpenAI Pixel, Pinterest Tag, TikTok Pixel, LinkedIn Insights, Microsoft UET (Microsoft Ads), X Pixel, Reddit Pixel, Snapchat Pixel
- Email and SMS: ActiveCampaign site tracking, loaded after marketing consent (guide); Attentive loads after marketing consent and requires a page reload on withdrawal; Customer.io loads after marketing consent by default (guide). Insider, loaded after marketing consent; Klaviyo loads only once marketing and measurement are both allowed; Marketo Munchkin and Salesforce Account Engagement load after marketing consent (guide)
- Clearbit: Loads after marketing consent (guide)
- Oracle Eloqua: Loads after marketing consent by default (guide)
- HubSpot: Loads after marketing consent (guide)
- Default: Pixel after measurement consent or standalone Forms SDK after functionality consent, with configurable categories and an opt-in always mode for the Pixel (guide)
- The Trade Desk: Loads after marketing consent (guide)
- LiveIntent: Loads after marketing consent (guide)
- AdRoll: Loads after marketing consent (guide)
- Vector: Loads after marketing consent (guide)
- RB2B: Loads after marketing consent (guide)
- Amazon Ads: Loads after marketing consent (guide)
- Clay: Loads after marketing consent (guide)
Data and tags
- Google Tag Manager: Sends current permissions through Google Consent Mode v2; configure consent checks for non-Google tags (guide)
- Cloudflare Zaraz: Maps c15t effective permissions to Zaraz purpose IDs for tools managed in Cloudflare (guide)
- Segment, RudderStack, and Hightouch
- Shopify: Sends c15t consent to Shopify's Customer Privacy API from a Hydrogen storefront (guide)
Chat and embeds
- Ada, Intercom, Crisp, Front Chat, Gorgias Chat, and Zendesk Messaging
- YouTube and Google Maps use consent-gated iframes and do not require this package
Example
import { googleTagManager } from '@c15t/integrations/google-tag-manager'
import { metaPixel } from '@c15t/integrations/meta-pixel'
const scripts = [
googleTagManager({ id: 'GTM-XXXXXX' }),
metaPixel({ pixelId: '000000000000000' }),
]
Docs for AI Agents
This package ships its documentation as Markdown, matched to the installed version. After you install it, point your coding agent at node_modules/@c15t/integrations/AGENTS.md. It indexes every guide in node_modules/@c15t/integrations/docs/.
On the web, every page of the c15t docs has a Markdown version, and llms.txt lists them all. Install the c15t agent skills with npx skills add c15t/skills.
Support
- Join our Discord community
- Open an issue on our GitHub repository
- Visit inth.com and use the chat widget
- Contact our support team via email [email protected]
Contributing
- Read the contribution guidelines before you open a pull request
- Follow the code of conduct
Security
Do not open a public issue for a security vulnerability. Report it privately through GitHub's vulnerability reporting. We examine every valid report.
- Do not share the vulnerability in public forums, issues, or pull requests
- Give the steps to reproduce it and the versions it affects
- Give us time to release a fix before you disclose it
License
Built by Inth