Skip to main content

Ads and growth

Clay

The clay helper waits for marketing consent before loading Clay web intent. Clay resolves visitors' IP addresses to companies and can use device fingerprints and identifiers from other vendors for sales profiling.

Configure Clay

Copy the id from Settings > Web intent > JavaScript Snippet. Remove any direct Clay snippet or GTM copy so it cannot bypass c15t.

npm install @c15t/integrations
src/consent-scripts.ts
import { clay } from '@c15t/integrations/clay';

export const scripts = [clay({ siteId: 'YOUR_SITE_ID' })];

Register the scripts

Complete your framework quickstart first. Keep its Inth endpoint, policy, styles and consent UI. Remove the vendor's original script, SDK initializer or tag-manager entry, so the vendor loads only through c15t.

The vendor pages put the helper in src/consent-scripts.ts. If your framework quickstart already has a scripts array, such as the one in c15t.config.ts in the Next.js guide, add the helper to that array instead of creating a second file. The scripts export is a configuration, not an initializer. Add it to the c15t provider you already have, at the registration point for your framework below. These are edits to that provider, not a second provider.

Add the configuration to scripts in c15t.config.ts, next to next.config.ts:

import { defineConsentConfig } from 'c15t/next';
import { scripts } from './src/consent-scripts';

export default defineConsentConfig({ scripts });

Keep the rest of your config, such as mode and routePrefix, in the same call. ConsentRoot reads the config in the browser, so the layout keeps passing only state. App Router, Pages Router and static export all read the same file. See Next.js scripts and embeds.

Options

OptionDefaultBehavior
siteIdRequiredPublic ID from Clay's snippet. Trimmed and URL-encoded. Non-string, blank or invalid IDs log an error and skip loading.
scriptUrlhttps://static.claydar.com/init.v1.js?id=<siteId>Override for a proxy or pinned loader. Keep the id query parameter because Clay reads document.currentScript.src. A blank override uses the default.

Loading and revocation

The loader runs from a real script element in the body after marketing consent. It loads cdn.claydar.com/releases/latest/radar.min.js, which sends data to api.claydar.com. Include those hosts in the matching CSP directives. Measurement consent alone loads nothing. Clay's own CMP detection does not cover c15t.

On load, the helper queues giveCookieConsent. On withdrawal it calls denyCookieConsent when available. These methods were verified in the served tracker, but Clay does not document them. Denial moves identifiers from persistent storage into session storage. It does not stop requests. Keep c15t's default reloadOnConsentRevoked behavior enabled. With reload disabled, the tracker can continue sending events until navigation. Removing its loader cannot unload the tracker or its child scripts.

The served tracker uses claydar_* cookies and local storage, including a device ID cookie with a one-year lifetime. It also uses radar_sn_* session keys for fingerprints, spotter_data for company lookup and a temporary __sn_tld_probe cookie. Account settings and future vendor versions can change this inventory.

Verify Clay

Filter Network by claydar.com. Denial and measurement-only consent must show no requests, no Claydar global and no vendor storage. Grant marketing and confirm one init.v1.js?id=<siteId> loader plus the tracker. Withdraw consent and confirm the page reloads, then confirm Clay stays blocked on the new page.

The monitor uses a placeholder site ID. Successful loader and tracker execution does not establish account configuration or successful company identification.

Sources: Clay Web intent, Clay's Web intent announcement, loader, and served tracker.

Test in a private window with an opt-in policy. Open DevTools Network, disable the cache and filter by the vendor's domain:

  1. Load the page. No request goes to the vendor before you choose.
  2. Click Reject, then reload. There is still no vendor request.
  3. Open Privacy settings and allow the helper's category. The vendor script loads without a page reload.
  4. Turn the category off again and save. c15t reloads the page, and the new page makes no vendor request.

c15t reloads on revocation because removing a script element does not stop code that already ran. The vendor's listeners, timers and queued events stay alive until the page unloads. If you set reloadOnConsentRevoked: false, stop the vendor yourself. Register a callback-only script whose onConsentChange calls the vendor's opt-out API, as shown in custom integrations, and check the permission before each of your own event calls. The reload does not delete cookies the vendor already set; see clear on revocation for your framework.

The helper lists its vendor by name in the preference dialog, so a visitor can turn it off inside an allowed category. See vendor consent for your framework. The consent verification guide covers navigation, expiry and hosting checks.