Skip to content

Settings

Analytics platform settings

The manage pane for an ad-platform analytics integration, covering connection status, the linked ad account, an event-sync matrix, and the disconnect action.
Available
Ports as-is

Examples

Rendered live from the maintained Storybook story. Lantern stores only the story id and embeds Storybook rather than duplicating the component or its demo.

Analytics platform settings

Rendered live from Storybook

Storybook must be running for this to load — bun run start:storybook from the monorepo root, or set NEXT_PUBLIC_STORYBOOK_URL to a deployed instance.

Props

The component's public API, read from its TypeScript source. Descriptions come from TSDoc on the prop, so this table cannot drift from the component.

PropTypeDefaultDescription
platformName*string—Display name in the header and headings — "Meta", "Google Ads", "LinkedIn", "TikTok".
platformShortNamestring—Name used inside body copy, which is sometimes shorter than the header: the Google Ads pane says "sent to Google". Defaults to `platformName`.
logoSrcstring—Logo image source. Defaults to the neutral placeholder. Never remote.
logoAltstring—Undocumented — add TSDoc to the prop in the library.
logoClassNamestring—Mark sizing inside the header chip and on the connect button.
logoReact.ReactNode—A rendered mark (inline SVG) instead of an image — wins over `logoSrc`.
onBack() => void—Returns to the integrations list.
connectDescription*React.ReactNode—The pitch shown both on the disconnected card and inside the connect modal.
connectedAccountLabel*React.ReactNode—The authenticated login — `Meta Business Suite (123-***-456)`.
accountsAnalyticsAdAccount[][]Ad accounts under that login.
selectedAccountIdstring—Controlled account selection.
defaultSelectedAccountIdstring—Undocumented — add TSDoc to the prop in the library.
onSelectedAccountIdChange(id: string) => void—Undocumented — add TSDoc to the prop in the library.
connectedboolean—Controlled connection state. Pair with `onConnectedChange`.
defaultConnectedbooleantrueUncontrolled initial connection state — makes connected/disconnected static stories.
onConnectedChange(connected: boolean) => void—Undocumented — add TSDoc to the prop in the library.
onDisconnect() => void—Undocumented — add TSDoc to the prop in the library.
onReconnect() => void—Undocumented — add TSDoc to the prop in the library.
connectModalOpenboolean—Controlled connect-modal open state.
defaultConnectModalOpenbooleanfalseOpens the connect modal on mount — the shipped `autoConnect` deep link.
onConnectModalOpenChange(open: boolean) => void—Undocumented — add TSDoc to the prop in the library.
connectingboolean—Drives the connect modal's in-flight spinner.
sourceOptionsAnalyticsSyncOption[]ANALYTICS_SOURCE_OPTIONSRows of the "Synced events" card, in render order.
lifecycleEventsAnalyticsSyncOption[]ANALYTICS_LIFECYCLE_EVENTSUndocumented — add TSDoc to the prop in the library.
fieldGroupsAnalyticsSyncOption[]—Defaults to `buildAnalyticsFieldGroups(platformShortName)`.
enabledstring[]—Controlled set of enabled option ids across all three groups.
defaultEnabledstring[]ANALYTICS_DEFAULT_ENABLED_IDSUncontrolled initial enablement. Defaults to {@link ANALYTICS_DEFAULT_ENABLED_IDS}.
onEnabledChange(enabled: string[]) => void—Undocumented — add TSDoc to the prop in the library.
eventsExpandedboolean—Controlled disclosure of the per-event rows.
defaultEventsExpandedbooleanfalseUncontrolled initial disclosure — renders the expanded card as a static story.
onEventsExpandedChange(expanded: boolean) => void—Undocumented — add TSDoc to the prop in the library.
syncedEventsTitleReact.ReactNode"Synced events"Undocumented — add TSDoc to the prop in the library.
syncedEventsDescriptionReact.ReactNode—Undocumented — add TSDoc to the prop in the library.
allEventsLabelReact.ReactNode"All events"Undocumented — add TSDoc to the prop in the library.
allEventsDescriptionReact.ReactNode—Undocumented — add TSDoc to the prop in the library.
disconnectTitleReact.ReactNode—Undocumented — add TSDoc to the prop in the library.
disconnectDescriptionReact.ReactNode—What disconnecting destroys. Wording differs per platform (pixel vs conversion config).
disconnectActionLabelReact.ReactNode"Disconnect"Undocumented — add TSDoc to the prop in the library.
classNamestring—Undocumented — add TSDoc to the prop in the library.

Reference

Transcribed from the component audit. If this disagrees with the source, the source is right.

Source
src/components/settings/analytics/AnalyticsPlatformSettings.tsx
Portability
Copies across unchanged — only the utils import path moves.
Notes
Use it for any ad platform (Meta, Google Ads, LinkedIn, TikTok) whose settings follow the same connect-account-sync-events-disconnect shape; supply platformName, connectDescription, and accounts as props, and use platformShortName when body copy needs a shorter name than the header, as Google Ads does. It is not meant for GA4, whose body is a property form rather than an event matrix.