18 lines
846 B
JavaScript
18 lines
846 B
JavaScript
import { getSiteIntegrations } from '../payload/index.js';
|
|
/**
|
|
* Reads the public analytics / marketing tag IDs from SiteIntegrations,
|
|
* server-side. All are public (exposed client-side), so safe to pass to the
|
|
* <Analytics> component. Does NOT expose any secret from SiteIntegrations.
|
|
*/ export async function getAnalyticsConfig(payload) {
|
|
const integrations = await getSiteIntegrations(payload);
|
|
return {
|
|
clarityProjectId: integrations.clarityProjectId ?? null,
|
|
ga4MeasurementId: integrations.ga4MeasurementId ?? null,
|
|
gtmContainerId: integrations.gtmContainerId ?? null,
|
|
linkedInPartnerId: integrations.linkedInPartnerId ?? null,
|
|
metaPixelId: integrations.metaPixelId ?? null,
|
|
tiktokPixelId: integrations.tiktokPixelId ?? null
|
|
};
|
|
}
|
|
|
|
//# sourceMappingURL=getAnalyticsConfig.js.map
|