---
title: Integrations
description: "Many of your tools may require consent to be given before they can be used. This is especially true for analytics and marketing tools. \nc15t has various ways to integrate with your tools, depending on the tool you are using."
lastModified: 2026-04-10

---
c15t supports two integration styles:

* use a prebuilt helper from `@c15t/scripts`
* build your own script or manifest-backed helper

If you are building something reusable or contributing to `@c15t/scripts`, start with the [custom integration guide](/docs/integrations/building-integrations).

## General Pattern

Every integration provides a script configuration function. Pass it to your framework's setup:

**JavaScript**

```ts
import { getOrCreateConsentRuntime } from 'c15t';
import { yourScript } from '@c15t/scripts/your-script';

getOrCreateConsentRuntime({
  mode: 'hosted',
  scripts: [
    yourScript({ /* options */ }),
  ],
});
```

**React**

```tsx
import { yourScript } from '@c15t/scripts/your-script';
import { ConsentManagerProvider } from '@c15t/react';

export function App({ children }: { children: React.ReactNode }) {
  return (
    <ConsentManagerProvider
      options={{
        scripts: [
          yourScript({ /* options */ }),
        ],
      }}
    >
      {children}
    </ConsentManagerProvider>
  );
}
```

**Next.js**

```tsx
import { yourScript } from '@c15t/scripts/your-script';
import { ConsentManagerProvider } from '@c15t/nextjs';

export function App({ children }: { children: React.ReactNode }) {
  return (
    <ConsentManagerProvider
      options={{
        scripts: [
          yourScript({ /* options */ }),
        ],
      }}
    >
      {children}
    </ConsentManagerProvider>
  );
}
```

## Script Loader

Many marketing and analytics tools are commonly loaded using a script tag, such as Google Tag Manager (GTM), Google Tag (gtag.js), Meta Pixel and TikTok Pixel.

c15t's script loader allows you to easily integrate your tools that require consent with c15t. The prebuilt integrations in `@c15t/scripts` are the recommended starting point, and the custom integration guide explains how to build your own when you need something more specialized.

* [JavaScript](/docs/frameworks/javascript/script-loader)
* [React](/docs/frameworks/react/script-loader)
* [Next.js](/docs/frameworks/next/script-loader)

## Building Your Own

If you need a vendor we do not ship yet:

* build a one-off `Script` directly in your app for simple cases
* build a reusable manifest-backed helper for shared or package-level integrations

Read the [custom integration guide](/docs/integrations/building-integrations) for the manifest phases, structured step model, testing checklist, and devtools debugging flow.

## has() method

The `has()` method allows you to check if the user has given consent for a specific purpose. You can learn more about the `has()` method [here](/docs/frameworks/javascript/store/checking-consent).

```ts


const hasAnalytics = has('measurement');

if (hasAnalytics) {
  myAnalyticsLibrary.track('checkout_completed');
}
```
