@c15t/browser 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.
- package/AGENTS.md +64 -0
- package/CHANGELOG.md +27 -0
- package/README.md +128 -0
- package/dist/861.js +1079 -0
- package/dist/925.js +649 -0
- package/dist/c15t.css +213 -0
- package/dist/c15t.devtools.js +1 -0
- package/dist/c15t.headless.js +1 -0
- package/dist/c15t.iab.css +190 -0
- package/dist/c15t.iab.js +221 -0
- package/dist/c15t.js +30 -0
- package/dist/devtools.js +11 -0
- package/dist/headless.js +17 -0
- package/dist/iab.js +784 -0
- package/dist/index.js +17 -0
- package/dist-types/auto-init.d.ts +42 -0
- package/dist-types/client.d.ts +51 -0
- package/dist-types/deferred.d.ts +13 -0
- package/dist-types/devtools.d.ts +32 -0
- package/dist-types/entries/cdn-devtools.d.ts +13 -0
- package/dist-types/entries/cdn-headless.d.ts +8 -0
- package/dist-types/entries/cdn-iab.d.ts +1 -0
- package/dist-types/entries/cdn.d.ts +8 -0
- package/dist-types/gated-scripts.d.ts +35 -0
- package/dist-types/generated/iab-styles.d.ts +144 -0
- package/dist-types/generated/styles.d.ts +137 -0
- package/dist-types/global.d.ts +112 -0
- package/dist-types/headless.d.ts +41 -0
- package/dist-types/iab/mount.d.ts +8 -0
- package/dist-types/iab/preferences.d.ts +9 -0
- package/dist-types/iab/styles.d.ts +2 -0
- package/dist-types/iab/surface.d.ts +4 -0
- package/dist-types/iab/vendor-disclosures.d.ts +14 -0
- package/dist-types/iab.d.ts +20 -0
- package/dist-types/index.d.ts +43 -0
- package/dist-types/transports/manifest.d.ts +62 -0
- package/dist-types/transports/offline.d.ts +18 -0
- package/dist-types/types.d.ts +290 -0
- package/dist-types/ui/actions.d.ts +29 -0
- package/dist-types/ui/banner.d.ts +13 -0
- package/dist-types/ui/branding.d.ts +25 -0
- package/dist-types/ui/copy.d.ts +28 -0
- package/dist-types/ui/dialog.d.ts +14 -0
- package/dist-types/ui/dom.d.ts +48 -0
- package/dist-types/ui/mount.d.ts +27 -0
- package/dist-types/ui/surface.d.ts +43 -0
- package/dist-types/ui/trigger.d.ts +14 -0
- package/dist-types/ui/widget.d.ts +27 -0
- package/dist-types/version.d.ts +1 -0
- package/docs/README.md +64 -0
- package/docs/frameworks/javascript/script-loader.md +47 -0
- package/docs/frameworks/javascript/script-tag.md +375 -0
- package/docs/integrations/adobe-analytics.md +294 -0
- package/docs/integrations/ahrefs-analytics.md +291 -0
- package/docs/integrations/amplitude.md +292 -0
- package/docs/integrations/building-integrations.md +47 -0
- package/docs/integrations/clearbit.md +291 -0
- package/docs/integrations/cloudflare-web-analytics.md +292 -0
- package/docs/integrations/crisp.md +294 -0
- package/docs/integrations/databuddy.md +311 -0
- package/docs/integrations/fathom-analytics.md +293 -0
- package/docs/integrations/google-maps.md +384 -0
- package/docs/integrations/google-tag-manager.md +306 -0
- package/docs/integrations/google-tag.md +305 -0
- package/docs/integrations/heap.md +292 -0
- package/docs/integrations/hightouch.md +293 -0
- package/docs/integrations/hotjar.md +292 -0
- package/docs/integrations/intercom.md +285 -0
- package/docs/integrations/linkedin-insights.md +291 -0
- package/docs/integrations/logrocket.md +293 -0
- package/docs/integrations/matomo-analytics.md +316 -0
- package/docs/integrations/meta-pixel.md +285 -0
- package/docs/integrations/microsoft-clarity.md +292 -0
- package/docs/integrations/microsoft-uet.md +291 -0
- package/docs/integrations/mixpanel-analytics.md +295 -0
- package/docs/integrations/openai-pixel.md +441 -0
- package/docs/integrations/overview.md +111 -0
- package/docs/integrations/pirsch.md +295 -0
- package/docs/integrations/plausible-analytics.md +295 -0
- package/docs/integrations/posthog.md +397 -0
- package/docs/integrations/promptwatch.md +291 -0
- package/docs/integrations/reddit-pixel.md +294 -0
- package/docs/integrations/rudderstack.md +328 -0
- package/docs/integrations/rybbit-analytics.md +296 -0
- package/docs/integrations/segment.md +292 -0
- package/docs/integrations/snapchat-pixel.md +293 -0
- package/docs/integrations/tiktok-pixel.md +291 -0
- package/docs/integrations/umami-analytics.md +295 -0
- package/docs/integrations/vercel-analytics.md +293 -0
- package/docs/integrations/x-pixel.md +291 -0
- package/docs/integrations/youtube.md +405 -0
- package/package.json +117 -0
- package/readme.json +44 -0
package/AGENTS.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# @c15t/browser
|
|
2
|
+
|
|
3
|
+
> Script-tag consent docs for c15t on Framer, Webflow, WordPress, and plain HTML: the data attributes, the window.c15t API, headless use, styling, manifest mode, and integrations.
|
|
4
|
+
|
|
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
|
+
|
|
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
|
+
- [Script tag setup](./docs/frameworks/javascript/script-tag.md)
|
|
14
|
+
|
|
15
|
+
## More documentation
|
|
16
|
+
|
|
17
|
+
[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.
|
|
18
|
+
|
|
19
|
+
## Frameworks
|
|
20
|
+
|
|
21
|
+
- [JavaScript script loading](./docs/frameworks/javascript/script-loader.md): Attach a script loader to the consent kernel and dispose it with the application.
|
|
22
|
+
- [Script tag](./docs/frameworks/javascript/script-tag.md): Add a consent banner to Framer, Webflow, WordPress, Squarespace, or any HTML page with one script tag and no build step.
|
|
23
|
+
|
|
24
|
+
## Integrations
|
|
25
|
+
|
|
26
|
+
- [Adobe Analytics](./docs/integrations/adobe-analytics.md): Configure Adobe Analytics with c15t v3, understand measurement permission and verify loading and revocation.
|
|
27
|
+
- [Ahrefs Analytics](./docs/integrations/ahrefs-analytics.md): Configure Ahrefs Analytics with c15t v3, understand measurement permission and verify loading and revocation.
|
|
28
|
+
- [Amplitude](./docs/integrations/amplitude.md): Configure Amplitude with c15t v3, understand measurement permission and verify loading and revocation.
|
|
29
|
+
- [Custom integrations](./docs/integrations/building-integrations.md): Define loading, initialization and consent-change behavior for a vendor without a helper.
|
|
30
|
+
- [Clearbit](./docs/integrations/clearbit.md): Configure Clearbit with c15t v3, understand marketing permission and verify loading and revocation.
|
|
31
|
+
- [Cloudflare Web Analytics](./docs/integrations/cloudflare-web-analytics.md): Configure Cloudflare Web Analytics with c15t v3, understand measurement permission and verify loading and revocation.
|
|
32
|
+
- [Crisp](./docs/integrations/crisp.md): Configure Crisp with c15t v3, understand functionality permission and verify loading and revocation.
|
|
33
|
+
- [Databuddy](./docs/integrations/databuddy.md): Configure Databuddy's initial and updated consent state with c15t v3.
|
|
34
|
+
- [Fathom Analytics](./docs/integrations/fathom-analytics.md): Configure Fathom Analytics with c15t v3, understand measurement permission and verify loading and revocation.
|
|
35
|
+
- [Google Maps](./docs/integrations/google-maps.md): Prevent a map iframe from mounting before the required permission.
|
|
36
|
+
- [Google Tag](./docs/integrations/google-tag.md): Configure gtag with c15t Consent Mode signals and understand its loading behavior.
|
|
37
|
+
- [Google Tag Manager](./docs/integrations/google-tag-manager.md): Load GTM with c15t consent signals and verify the tags inside your container.
|
|
38
|
+
- [Heap](./docs/integrations/heap.md): Configure Heap with c15t v3, understand measurement permission and verify loading and revocation.
|
|
39
|
+
- [Hightouch](./docs/integrations/hightouch.md): Configure Hightouch with c15t v3, understand measurement permission and verify loading and revocation.
|
|
40
|
+
- [Hotjar](./docs/integrations/hotjar.md): Configure Hotjar with c15t v3, understand measurement permission and verify loading and revocation.
|
|
41
|
+
- [Intercom](./docs/integrations/intercom.md): Load the Intercom messenger with functionality permission and configure its region.
|
|
42
|
+
- [LinkedIn Insight Tag](./docs/integrations/linkedin-insights.md): Configure LinkedIn Insight Tag with c15t v3, understand marketing permission and verify loading and revocation.
|
|
43
|
+
- [LogRocket](./docs/integrations/logrocket.md): Configure LogRocket with c15t v3, understand measurement permission and verify loading and revocation.
|
|
44
|
+
- [Matomo Analytics](./docs/integrations/matomo-analytics.md): Choose gated loading or Matomo consent signaling and configure the correct tracker endpoints.
|
|
45
|
+
- [Meta Pixel](./docs/integrations/meta-pixel.md): Register the Meta Pixel under marketing permission and verify event calls after revocation.
|
|
46
|
+
- [Microsoft Clarity](./docs/integrations/microsoft-clarity.md): Configure Microsoft Clarity with c15t v3, understand measurement permission and verify loading and revocation.
|
|
47
|
+
- [Microsoft UET](./docs/integrations/microsoft-uet.md): Configure Microsoft UET with c15t v3, understand marketing permission and verify loading and revocation.
|
|
48
|
+
- [Mixpanel](./docs/integrations/mixpanel-analytics.md): Configure Mixpanel with c15t v3, understand measurement permission and verify loading and revocation.
|
|
49
|
+
- [OpenAI Pixel](./docs/integrations/openai-pixel.md): Configure the OpenAI Measurement Pixel for ChatGPT Ads with c15t v3, manage marketing permission and verify conversion delivery.
|
|
50
|
+
- [Overview](./docs/integrations/overview.md): Find all c15t integrations for analytics, tag managers, advertising, chat and embedded content.
|
|
51
|
+
- [Pirsch](./docs/integrations/pirsch.md): Configure Pirsch with c15t v3, understand measurement permission and verify loading and revocation.
|
|
52
|
+
- [Plausible Analytics](./docs/integrations/plausible-analytics.md): Configure Plausible Analytics with c15t v3, understand measurement permission and verify loading and revocation.
|
|
53
|
+
- [PostHog](./docs/integrations/posthog.md): Choose PostHog loading and cookieless behavior, configure the region, and synchronize v3 permissions.
|
|
54
|
+
- [Promptwatch](./docs/integrations/promptwatch.md): Configure Promptwatch with c15t v3, understand measurement permission and verify loading and revocation.
|
|
55
|
+
- [Reddit Pixel](./docs/integrations/reddit-pixel.md): Configure Reddit Pixel with c15t v3, understand marketing permission and verify loading and revocation.
|
|
56
|
+
- [RudderStack](./docs/integrations/rudderstack.md): Gate the RudderStack browser SDK or map c15t categories to destination consent IDs.
|
|
57
|
+
- [Rybbit Analytics](./docs/integrations/rybbit-analytics.md): Configure Rybbit Analytics with c15t v3, understand measurement permission and verify loading and revocation.
|
|
58
|
+
- [Segment](./docs/integrations/segment.md): Configure Segment with c15t v3, understand measurement permission and verify loading and revocation.
|
|
59
|
+
- [Snapchat Pixel](./docs/integrations/snapchat-pixel.md): Configure Snapchat Pixel with c15t v3, understand marketing permission and verify loading and revocation.
|
|
60
|
+
- [TikTok Pixel](./docs/integrations/tiktok-pixel.md): Configure TikTok Pixel with c15t v3, understand marketing permission and verify loading and revocation.
|
|
61
|
+
- [Umami Analytics](./docs/integrations/umami-analytics.md): Configure Umami Analytics with c15t v3, understand measurement permission and verify loading and revocation.
|
|
62
|
+
- [Vercel Analytics](./docs/integrations/vercel-analytics.md): Configure Vercel Analytics with c15t v3, understand measurement permission and verify loading and revocation.
|
|
63
|
+
- [X Pixel](./docs/integrations/x-pixel.md): Configure X Pixel with c15t v3, understand marketing permission and verify loading and revocation.
|
|
64
|
+
- [YouTube](./docs/integrations/youtube.md): Gate YouTube embeds with c15t v3 in Next.js, TanStack Start, React, Nuxt, Vue, Astro, Svelte, SvelteKit or JavaScript.
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# @c15t/browser
|
|
2
|
+
|
|
3
|
+
## 3.0.0-alpha.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- 4460e3e: This v3 alpha is for internal use only. APIs are unstable, and breaking changes will occur between alpha releases.
|
|
8
|
+
|
|
9
|
+
Introduce the c15t umbrella package, shared consent runtime and policy rules, rewritten backend, and new framework and script-tag integrations. Update the CLI, IAB support, DevTools, and shared styles for v3.
|
|
10
|
+
|
|
11
|
+
Packages now ship ESM only. Keep related packages on compatible v3 alpha versions.
|
|
12
|
+
|
|
13
|
+
Export `defineTheme` and the `Theme` type from the React, Next.js, TanStack Start, and Vue entries so themes can use the same imports as their framework integration.
|
|
14
|
+
|
|
15
|
+
Restrict iframe-blocker URL activation to HTTP and HTTPS. Replace backtracking URL and theme parsing expressions, correct the PostHog hostname boundary, and fix CLI layout detection for nested route groups and locale directories.
|
|
16
|
+
|
|
17
|
+
Serve a stale consent manifest from the server adapters' in-process cache inside the backend's `stale-while-revalidate` window while one background request revalidates it, instead of blocking every request after `s-maxage` expires; a failed or timed-out revalidation keeps the stale manifest. The backend sends its manifest cache policy as `CDN-Cache-Control` too, so Vercel's CDN forwards it. Add `onBackgroundRevalidate` to the core cache and every server adapter for runtimes that stop detached work after the response.
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies [4460e3e]
|
|
22
|
+
- @c15t/core@3.0.0-alpha.0
|
|
23
|
+
- @c15t/dev-tools@3.0.0-alpha.0
|
|
24
|
+
- @c15t/iab@3.0.0-alpha.0
|
|
25
|
+
- @c15t/schema@3.0.0-alpha.0
|
|
26
|
+
- @c15t/translations@3.0.0-alpha.0
|
|
27
|
+
- @c15t/ui@3.0.0-alpha.0
|
package/README.md
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://c15t.com?utm_source=npm&utm_medium=readme&utm_campaign=oss_readme&utm_content=%40c15t%2Fbrowser" target="_blank" rel="noopener noreferrer">
|
|
3
|
+
<picture>
|
|
4
|
+
<source media="(prefers-color-scheme: dark)" srcset="../../docs/assets/c15t-banner-readme-dark.svg" type="image/svg+xml">
|
|
5
|
+
<img src="../../docs/assets/c15t-banner-readme-light.svg" alt="c15t Banner" type="image/svg+xml">
|
|
6
|
+
</picture>
|
|
7
|
+
</a>
|
|
8
|
+
</p>
|
|
9
|
+
|
|
10
|
+
# @c15t/browser: Script-Tag Consent Banner
|
|
11
|
+
|
|
12
|
+
<p>
|
|
13
|
+
<a href="https://www.npmjs.com/package/@c15t/browser"><picture><source media="(prefers-color-scheme: dark)" srcset="https://shieldcn.dev/npm/%40c15t%2Fbrowser.svg?variant=outline&mode=dark"><img src="https://shieldcn.dev/npm/%40c15t%2Fbrowser.svg?variant=outline&mode=light" alt="Latest NPM Version"></picture></a>
|
|
14
|
+
<a href="https://github.com/c15t/c15t"><picture><source media="(prefers-color-scheme: dark)" srcset="https://shieldcn.dev/github/c15t/c15t/stars.svg?variant=outline&mode=dark"><img src="https://shieldcn.dev/github/c15t/c15t/stars.svg?variant=outline&mode=light" alt="Stars"></picture></a>
|
|
15
|
+
<a href="https://github.com/c15t/c15t/blob/main/LICENSE.md"><picture><source media="(prefers-color-scheme: dark)" srcset="https://shieldcn.dev/github/c15t/c15t/license.svg?variant=outline&mode=dark"><img src="https://shieldcn.dev/github/c15t/c15t/license.svg?variant=outline&mode=light" alt="License"></picture></a>
|
|
16
|
+
<a href="https://c15t.link/discord"><picture><source media="(prefers-color-scheme: dark)" srcset="https://shieldcn.dev/discord/1312171102268690493.svg?variant=outline&mode=dark"><img src="https://shieldcn.dev/discord/1312171102268690493.svg?variant=outline&mode=light" alt="Discord"></picture></a>
|
|
17
|
+
<a href="https://skills.sh/c15t/skills/c15t"><picture><source media="(prefers-color-scheme: dark)" srcset="https://shieldcn.dev/skills/c15t/skills/c15t.svg?variant=outline&mode=dark"><img src="https://shieldcn.dev/skills/c15t/skills/c15t.svg?variant=outline&mode=light" alt="Skills"></picture></a>
|
|
18
|
+
<a href="https://inth.com?utm_source=npm&utm_medium=readme&utm_campaign=oss_readme&utm_content=%40c15t%2Fbrowser"><picture><source media="(prefers-color-scheme: dark)" srcset="https://shieldcn.dev/badge/Made%20By-Inth-ffc803.svg?color=ffc803&labelTextColor=000000&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAzOTMgNDAwIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNMTgyLjY2MiAwdjM2Ljg5NWgtNTkuMDMxdjgyLjczM2g1OS4wMzF2MzYuODkzSDI3LjQ4MnYtMzYuODkzaDU5LjAzVjM2Ljg5NWgtNTkuMDNWMHpNMzIxLjk0MSA4OS44NVYwaDM1LjM1NXYxNTYuNTIxaC0yNS43MTNsLTg2LjEzNy05MC4zNjR2OTAuMzY0aC0zNS4zNTVWMGgyNi4zNTV6Ii8%2BPHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzE4LjU3MSAxODUuNzE0aDc0LjI4NlY0MDBIMFYxODUuNzE0aDI3Mi44NTd2LTQ3LjE0M3ptLTI5MS4wOSAyOC45Njl2MzcuMTE4aDU4LjEzN3YxMTkuNjI4aDM2Ljg5NVYyNTEuODAxaDU4LjU4NHYtMzcuMTE4em0xODIuNjEuMjI0djE1Ni41MjJoMzYuODk0VjMxMy41OWg3My4zNDF2NTcuODM5aDM3LjExOFYyMTQuOTA3aC0zNy4xMTh2NjEuNzg4aC03My4zNDF2LTYxLjc4OHoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg%3D%3D&valueColor=000000&mode=dark"><img src="https://shieldcn.dev/badge/Made%20By-Inth-ffc803.svg?color=ffc803&labelTextColor=000000&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAzOTMgNDAwIj48cGF0aCBmaWxsPSIjMDAwIiBkPSJNMTgyLjY2MiAwdjM2Ljg5NWgtNTkuMDMxdjgyLjczM2g1OS4wMzF2MzYuODkzSDI3LjQ4MnYtMzYuODkzaDU5LjAzVjM2Ljg5NWgtNTkuMDNWMHpNMzIxLjk0MSA4OS44NVYwaDM1LjM1NXYxNTYuNTIxaC0yNS43MTNsLTg2LjEzNy05MC4zNjR2OTAuMzY0aC0zNS4zNTVWMGgyNi4zNTV6Ii8%2BPHBhdGggZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzE4LjU3MSAxODUuNzE0aDc0LjI4NlY0MDBIMFYxODUuNzE0aDI3Mi44NTd2LTQ3LjE0M3ptLTI5MS4wOSAyOC45Njl2MzcuMTE4aDU4LjEzN3YxMTkuNjI4aDM2Ljg5NVYyNTEuODAxaDU4LjU4NHYtMzcuMTE4em0xODIuNjEuMjI0djE1Ni41MjJoMzYuODk0VjMxMy41OWg3My4zNDF2NTcuODM5aDM3LjExOFYyMTQuOTA3aC0zNy4xMTh2NjEuNzg4aC03My4zNDF2LTYxLjc4OHoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg%3D%3D&valueColor=000000&mode=light" alt="Made by Inth"></picture></a>
|
|
19
|
+
</p>
|
|
20
|
+
|
|
21
|
+
Cookie banner, preference centre, and consent-gated script loading for sites without a build step: Framer, Webflow, WordPress, Squarespace, and plain HTML.
|
|
22
|
+
|
|
23
|
+
## Key Features
|
|
24
|
+
|
|
25
|
+
- One script tag from a CDN, configured with data attributes or calls queued on window.c15t
|
|
26
|
+
- Prebuilt banner and preference centre rendered in a shadow root, immune to theme CSS
|
|
27
|
+
- Headless build with the same runtime and window.c15t API for custom banners
|
|
28
|
+
- data-c15t-action buttons and #c15t-preferences links wired for you
|
|
29
|
+
- Hosted, self-hosted, offline, and manifest modes; an inlined manifest renders a location-independent policy with no request at all
|
|
30
|
+
- DevTools panel as a second tag (c15t.devtools.js) with a Location tab for trying geo-keyed policies
|
|
31
|
+
- Consent-gated script loading and Google Consent Mode through @c15t/scripts
|
|
32
|
+
- ES module entry points for bundler projects without a framework
|
|
33
|
+
|
|
34
|
+
## Prerequisites
|
|
35
|
+
|
|
36
|
+
- A page you can add a <script> tag to
|
|
37
|
+
- A hosted [c15t instance](https://inth.com) (free sign-up), [self-hosted deployment](https://c15t.com/docs/self-host/quickstart), or offline mode for browser-only storage
|
|
38
|
+
|
|
39
|
+
## Manual Installation
|
|
40
|
+
|
|
41
|
+
Paste before `</head>`:
|
|
42
|
+
|
|
43
|
+
```html
|
|
44
|
+
<script
|
|
45
|
+
src="https://cdn.jsdelivr.net/npm/@c15t/browser@0.2.0/dist/c15t.js"
|
|
46
|
+
data-backend-url="https://your-instance.c15t.dev"
|
|
47
|
+
defer
|
|
48
|
+
></script>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Drop `data-backend-url` for offline mode. Load `dist/c15t.headless.js` instead for the runtime without any UI.
|
|
52
|
+
|
|
53
|
+
For bundler projects:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
pnpm add @c15t/browser
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Usage
|
|
60
|
+
|
|
61
|
+
1. Add the tag and reload; the banner appears on the first visit
|
|
62
|
+
2. Put `data-c15t-action="customize"` on any button to open the preference centre
|
|
63
|
+
3. Read consent from `window.c15t` in your own code
|
|
64
|
+
4. For the full set of attributes and options, see the [script tag docs](https://c15t.com/docs/frameworks/javascript/script-tag)
|
|
65
|
+
|
|
66
|
+
```js
|
|
67
|
+
c15t.on('consent', () => {
|
|
68
|
+
if (c15t.has('measurement')) {
|
|
69
|
+
startAnalytics();
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
await c15t.ready();
|
|
74
|
+
c15t.openDialog();
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Documentation
|
|
78
|
+
|
|
79
|
+
For further information, guides, and examples visit the [reference documentation](https://c15t.com/docs/frameworks/javascript/script-tag).
|
|
80
|
+
|
|
81
|
+
## Deployment Modes
|
|
82
|
+
|
|
83
|
+
- **Hosted on inth.com**: Hosted c15t backend for policy storage, audit history, and hosted infrastructure
|
|
84
|
+
- **Self-hosted backend**: Use @c15t/backend when you need full infrastructure control
|
|
85
|
+
- **Manifest mode**: Inline or fetch the backend's cacheable `/manifest` and resolve the policy in the browser
|
|
86
|
+
- **Offline mode**: Browser-only consent storage for portfolios, docs sites, previews, and demos
|
|
87
|
+
|
|
88
|
+
## Optional IAB entry
|
|
89
|
+
|
|
90
|
+
Load `c15t.iab.js` instead of `c15t.js`, or import `init` from `@c15t/browser/iab`. Configure `iab` with your registered CMP ID and vendor list. This entry includes the CMP, TC codec, purpose/vendor preferences, and IAB styles. The ordinary and headless entries exclude that implementation. Use `client.saveIAB()` to confirm individual IAB choices. See the [IAB script example](https://c15t.com/docs/frameworks/javascript/script-tag#optional-iab-entry).
|
|
91
|
+
|
|
92
|
+
## Support
|
|
93
|
+
|
|
94
|
+
- Join our [Discord community](https://c15t.link/discord)
|
|
95
|
+
- Open an issue on our [GitHub repository](https://github.com/c15t/c15t/issues)
|
|
96
|
+
- Visit [inth.com](https://inth.com) and use the chat widget
|
|
97
|
+
- Contact our support team via email [support@inth.com](mailto:support@inth.com)
|
|
98
|
+
|
|
99
|
+
## Contributing
|
|
100
|
+
|
|
101
|
+
- We're open to all community contributions.
|
|
102
|
+
- Read our [Contribution Guidelines](https://c15t.com/docs/oss/contributing)
|
|
103
|
+
- Review our [Code of Conduct](https://c15t.com/docs/oss/code-of-conduct)
|
|
104
|
+
- Fork the repository
|
|
105
|
+
- Create a new branch for your feature
|
|
106
|
+
- Submit a pull request
|
|
107
|
+
- **All contributions, big or small, are welcome and appreciated.**
|
|
108
|
+
|
|
109
|
+
## Security
|
|
110
|
+
|
|
111
|
+
If you believe you have found a security vulnerability in c15t, we encourage you to **_responsibly disclose this and NOT open a public issue_**. We will investigate all legitimate reports.
|
|
112
|
+
|
|
113
|
+
Our preference is that you make use of GitHub's private vulnerability reporting feature to disclose potential security vulnerabilities in our open-source software. To do this, please visit [https://github.com/c15t/c15t/security](https://github.com/c15t/c15t/security) and click the "Report a vulnerability" button.
|
|
114
|
+
|
|
115
|
+
### Security Policy
|
|
116
|
+
|
|
117
|
+
- Please do not share security vulnerabilities in public forums, issues, or pull requests
|
|
118
|
+
- Provide detailed information about the potential vulnerability
|
|
119
|
+
- Allow reasonable time for us to address the issue before any public disclosure
|
|
120
|
+
- We are committed to addressing security concerns promptly and transparently
|
|
121
|
+
|
|
122
|
+
## License
|
|
123
|
+
|
|
124
|
+
[Apache License 2.0](https://github.com/c15t/c15t/blob/main/LICENSE.md)
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
**Built by [Inth](https://inth.com?utm_source=npm&utm_medium=readme&utm_campaign=oss_readme&utm_content=%40c15t%2Fbrowser)**
|