Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/llms-txt-hub / packages/analytics/index.tsx |
| Date | Not specified in source |
| Repository | Janady13/llms-txt-hub |
| Revision | e0f4bf978d4df168369c7601d9c5f5ea89e84377 |
| Branch | main |
| Path or archive member | packages/analytics/index.tsx |
| Original SHA-256 | 212970eec4c3e5065c0509874a0ddeea675a3bc2c6b7f2e2ab84429fe66604b6 |
| Git blob SHA | 365f4eb242b26151e1e251e0f9f271f66f85d90e |
| Reading-copy SHA-256 | 212970eec4c3e5065c0509874a0ddeea675a3bc2c6b7f2e2ab84429fe66604b6 |
Recovered source transcript
Download complete source text ↓32 lines · 0.9 KB
/// <reference types="@openpanel/web" />
import { OpenPanelAnalyticsComponent } from './providers/openpanel'
interface AnalyticsProviderProps {
readonly openPanelClientId?: string
readonly nonce?: string
}
/**
* Provider component that injects analytics tracking scripts for all configured providers.
*
* @param props - Component properties
* @param props.openPanelClientId - Client ID for OpenPanel Analytics
* @param props.nonce - CSP nonce for inline scripts
*
* @returns Analytics script components
*
* @example
* ```tsx
* <AnalyticsProvider openPanelClientId="op_abc123" />
* ```
*/
export function AnalyticsProvider({ openPanelClientId, nonce }: AnalyticsProviderProps) {
return (
<>
{openPanelClientId && process.env.NODE_ENV === 'production' && (
<OpenPanelAnalyticsComponent clientId={openPanelClientId} nonce={nonce} />
)}
</>
)
}