Files
ipal-kit/dist/modules/analytics/Analytics.d.ts
T

23 lines
1.0 KiB
TypeScript

import type { AnalyticsConfig } from './types.js';
declare global {
interface Window {
dataLayer?: unknown[];
}
}
/**
* Loads every configured analytics / marketing tag, each respecting consent:
*
* - **Google (GA4 / GTM)** — loaded immediately with Consent Mode: the visitor's
* stored choice is set as the default BEFORE the tag loads, and useConsent
* pushes an update the moment they decide. GTM wins if both IDs are set.
* - **Non-Google (Meta Pixel, Clarity, LinkedIn, TikTok)** — these vendors have
* no Consent Mode, so they load ONLY after the matching category is granted
* (marketing for Pixel/LinkedIn/TikTok, analytics for Clarity). Reacts live to
* the consent banner: accept → the tag loads immediately, no reload.
*
* All IDs are public and come from SiteIntegrations (getAnalyticsConfig), passed
* in as props. Renders nothing. Mount once, high in the tree, INSIDE
* <ConsentProvider> (required — it reads live consent state).
*/
export declare function Analytics(props: AnalyticsConfig): null;