Ctrl K
ComunidadGuías…

context7.json

Rama canary · réplica de lectura del repositorio original.

Archivo original ↗Preguntar a KiBot
{
	"$schema": "https://context7.com/schema/context7.json",
	"projectTitle": "c15t",
	"description": "A headless consent engine that transforms privacy management from a compliance checkbox into a fully observable system. Built for modern development teams with GDPR compliance, TypeScript-first APIs, and framework-agnostic design.",
	"folders": ["docs"],
	"branchVersions": ["canary", "main"],
	"excludeFolders": [
		"internals",
		"node_modules",
		"**/dist",
		"**/coverage",
		"**/node_modules",
		"changelog",
		"**/__tests__",
		"**/test",
		"**/.turbo"
	],
	"excludeFiles": [],
	"rules": [
		"Package selection: Use @c15t/react for React apps, @c15t/nextjs for Next.js (App Router & Pages Router), or c15t for vanilla JavaScript",
		"Use the Inth CLI (`inth c15t`) for the easiest setup - it creates or selects an Inth project, then starts a coding agent with the c15t setup prompt or writes the framework quickstart files with `inth c15t scaffold`",
		"Configuration modes: Use mode: 'c15t' with backendURL for hosted/managed inth.com instances (recommended), mode: 'offline' for client-side only with localStorage, or custom client for full control",
		"For production, use inth.com (hosted) or self-hosted @c15t/backend. Offline mode is only for development or simple implementations",
		"Consent categories: Use 'necessary' (always required), 'measurement' (analytics like GA4), 'marketing' (advertising like Google Ads, Meta Pixel), 'experience' (personalization and onboarding), and 'functionality' (optional features such as chat widgets)",
		"Always check consent before loading analytics/tracking scripts using the has() method: has('measurement') for analytics, has('marketing') for advertising",
		"Use the script loader for conditional script loading: add scripts array to ConsentManagerProvider options with category property matching consent categories",
		"For tag managers (GTM, PostHog) that handle consent internally, use alwaysLoad: true - these scripts load immediately and manage their own consent state",
		"React/Next.js: Wrap your app with ConsentManagerProvider, include ConsentBanner and ConsentDialog components. In Next.js App Router, use 'use client' directive",
		"Next.js: Use Next.js Rewrites to proxy backendURL through /api/c15t/:path* to hide the backend URL from users",
		"Consent checking: Use has() with simple checks (has('marketing')), complex logic (has({ and: ['measurement', 'marketing'] })), or nested conditions (has({ and: ['necessary', { or: ['measurement', 'marketing'] }] }))",
		"Prebuilt scripts available in `@c15t/integrations` include ada, cloudflareZaraz, googleTagManager, googleTag, ahrefsAnalytics, adobeAnalytics, adobeTarget, amplitude, appcues, clay, cloudflareWebAnalytics, clearbit, clarity, databuddy, defaultComPixel, defaultComFormsSdk, fathomAnalytics, fullStory, gainsightPx, heap, hotjar, hubspot, hightouch, logRocket, luckyOrange, plausibleAnalytics, pirsch, marketoMunchkin, matomoAnalytics, mixpanelAnalytics, oneDollarStats, eloquaTracking, pardotTracking, pendo, posthog, promptwatch, rb2b, rudderstack, segment, statableAnalytics, caplessAnalytics, sentry, rybbitAnalytics, umamiAnalytics, vercelAnalytics, vercelSpeedInsights, optimizelyWeb, dynamicYield, adrollPixel, metaPixel, openaiPixel, pinterestTag, crisp, frontChat, gorgiasChat, intercom, activeCampaignTracking, zendeskWidget, wisepops, attentiveTag, customerIo, insiderTag, klaviyo, redditPixel, snapchatPixel, theTradeDeskPixel, tiktokPixel, linkedinInsights, liveIntentTag, microsoftUet, vector, and xPixel.",
		"Analytics and tracking scripts include ahrefsAnalytics, adobeAnalytics, amplitude, clay, cloudflareWebAnalytics, clearbit, clarity, databuddy, fathomAnalytics, fullStory, gainsightPx, heap, hotjar, hubspot, hightouch, logRocket, luckyOrange, plausibleAnalytics, pirsch, matomoAnalytics, mixpanelAnalytics, oneDollarStats, eloquaTracking, pendo, posthog, promptwatch, rb2b, rudderstack, segment, statableAnalytics, caplessAnalytics, rybbitAnalytics, umamiAnalytics, vercelAnalytics, vercelSpeedInsights, defaultComPixel and the standalone defaultComFormsSdk. Default Pixel defaults to measurement consent; the standalone Forms SDK defaults to functionality consent.",
		"Experience and personalization scripts include adobeTarget, appcues for onboarding flows, dynamicYield, and optimizelyWeb, using the experience category.",
		"Functional integrations include ada, crisp, frontChat, gorgiasChat, intercom, and zendeskWidget for live chat widgets, including Zendesk Messaging, and wisepops for popups and onsite campaigns. The wisepops helper defaults to marketing consent; use experience only when it matches the campaign's purpose and policy.",
		"Sentry: use sentry({ getClient, init, setUser, initOptions, replay: { load } }) with your SDK's init. Custom init callbacks must forward the supplied options to Sentry.init; do not initialize as an import side effect. c15t installs its consent integration before startup hooks. Error monitoring runs for every visitor by default. Replay requires both replay.category and pii.category, defaults to measurement, and stops without flushing when either is withdrawn. While PII is denied, events drop user data and navigation/HTTP breadcrumb URL queries and fragments. Independently initialized SDKs can send before attachment; follow docs/integrations/sentry.mdx for conservative startup collection settings, maxBreadcrumbs: 0 and event filters.",
		"Email and SMS marketing: activeCampaignTracking loads ActiveCampaign site tracking after marketing consent. Keep reloadOnConsentRevoked enabled because its running tracker has no documented stop command. attentiveTag loads Attentive only after marketing consent. Keep reloadOnConsentRevoked enabled because removing its tag does not stop the runtime. customerIo loads Customer.io after marketing consent by default. klaviyo loads Klaviyo.js only when both marketing and measurement are allowed, because one bundle serves signup forms and onsite tracking. mode: 'forms-only' loads on marketing and sets Klaviyo's __kla_off cookie to disable web tracking. marketoMunchkin and pardotTracking (Salesforce Account Engagement) load after marketing consent.",
		"Advertising pixels include adrollPixel, metaPixel, openaiPixel, pinterestTag, redditPixel, snapchatPixel, theTradeDeskPixel, tiktokPixel, linkedinInsights, liveIntentTag, microsoftUet, vector, and xPixel.",
		"Google Tag (gtag.js): Use category: 'measurement' for GA4 analytics-only, category: 'marketing' for Google Ads. c15t automatically configures Consent Mode v2 defaults",
		"Geo-location: Set ignoreGeoLocation: true during development to always show the banner. In production, GDPR banners show automatically for EU users",
		"Server-side rendering: Consent state is stored in cookies accessible both client and server-side. Use server-side consent checks in Next.js middleware and API routes",
		"Translations: Import from @c15t/translations package. Supports partial or complete translations with type-safe interfaces",
		"TypeScript-first: All APIs are fully typed. Use TypeScript for best experience with autocomplete and type safety",
		"Performance: c15t is lightweight with minimal bundle impact. Scripts load/unload dynamically based on consent changes",
		"Privacy by design: GDPR-compliant by default with granular consent controls and complete audit trail for compliance",
		"Amazon Ads: use amazonAdsTag from @c15t/integrations/amazon-ads to gate loading on marketing consent. Keep c15t's default reload on revocation to stop code already running.",
		"RB2B: use rb2b from @c15t/integrations/rb2b to gate loading on marketing consent. Keep c15t's default reload on revocation to stop code already running.",
		"The Trade Desk: use theTradeDeskPixel from @c15t/integrations/the-trade-desk to gate loading on marketing consent. Keep c15t's default reload on revocation to stop code already running.",
		"LiveIntent: use liveIntentTag from @c15t/integrations/liveintent to gate loading on marketing consent. Keep c15t's default reload on revocation to stop code already running.",
		"AdRoll: use adrollPixel from @c15t/integrations/adroll to gate loading on marketing consent. Keep c15t's default reload on revocation to stop code already running.",
		"Vector: use vector from @c15t/integrations/vector to gate loading on marketing consent. Keep c15t's default reload on revocation to stop code already running.",
		"Default: choose defaultComPixel or defaultComFormsSdk from @c15t/integrations/default-com, one helper per page. Pixel defaults to measurement consent and supports an explicit loadMode: 'always' opt-in. Forms SDK defaults to functionality consent. Both accept a category override. Always mode permits pre-consent loader, form-list and form-capture requests. Keep c15t's default reload on revocation for code already running; an always-mode Pixel loads again after reload. Full shutdown needs a new document without the helper or with denied gated loading.",
		"HubSpot: use hubspot from @c15t/integrations/hubspot to gate loading on marketing consent. Keep c15t's default reload on revocation to stop code already running.",
		"Clay: use clay from @c15t/integrations/clay to gate loading on marketing consent. Keep c15t's default reload on revocation to stop code already running.",
		"Pendo: use pendo from @c15t/integrations/pendo to gate loading on measurement consent. Revocation calls stopSendingEvents and regrant calls startSendingEvents with the same identity. It never calls clearSession; storage and guides stay until the page reloads."
	]
}