Promptwatch
Promptwatch provides analytics focused on AI-related traffic and usage. The official embed loads a single script with your data-project-id. By default, c15t loads this script when measurement consent is granted.
Integrate with c15t
import { type ReactNode } from 'react';
import { ConsentManagerProvider } from '@c15t/react';
import { promptwatch } from '@c15t/scripts/promptwatch';
const scripts = [
promptwatch({
projectId: '7d60345b-27bb-4779-a385-d4fc19ce732c',
}),
];
export function ConsentProvider({ children }: { children: ReactNode }) {
return (
<ConsentManagerProvider
options={{
mode: 'hosted',
backendURL: 'https://your-instance.c15t.dev',
scripts,
}}
>
{children}
</ConsentManagerProvider>
);
}How c15t loads it
- Category:
measurement(Analytics) - Loads when: measurement consent is granted
- On revocation: unloaded - c15t removes the script from the DOM and pauses Promptwatch data collection until consent is granted again.
To use a custom loader URL:
promptwatch({
projectId: '7d60345b-27bb-4779-a385-d4fc19ce732c',
scriptUrl: 'https://cdn.example.com/promptwatch.js',
});Types
PromptwatchOptions
Warning: ExtractedTypeTable: Could not extract "PromptwatchOptions" from "./packages/scripts/src/vendors/analytics/promptwatch.ts" using base path "/vercel/path0/apps/c15t-docs/.leadtype/c15t". Verify the path/name and that the file is included by your tsconfig.
Script
Warning: ExtractedTypeTable: Could not extract "Script" from "./packages/core/src/libs/script-loader/types.ts" using base path "/vercel/path0/apps/c15t-docs/.leadtype/c15t". Verify the path/name and that the file is included by your tsconfig.