import { TextInput } from '@/components/inputs' import { Accordion, AccordionButton, AccordionIcon, AccordionItem, AccordionPanel, Box, FormLabel, Stack, Tag, } from '@chakra-ui/react' import { GoogleAnalyticsOptions } from '@typebot.io/schemas' import React from 'react' type Props = { options?: GoogleAnalyticsOptions onOptionsChange: (options: GoogleAnalyticsOptions) => void } export const GoogleAnalyticsSettings = ({ options, onOptionsChange, }: Props) => { const handleTrackingIdChange = (trackingId: string) => onOptionsChange({ ...options, trackingId }) const handleCategoryChange = (category: string) => onOptionsChange({ ...options, category }) const handleActionChange = (action: string) => onOptionsChange({ ...options, action }) const handleLabelChange = (label: string) => onOptionsChange({ ...options, label }) const handleValueChange = (value?: string) => onOptionsChange({ ...options, value: value ? parseFloat(value) : undefined, }) return (

Advanced

Event label Optional: } defaultValue={options?.label ?? ''} placeholder="Example: Campaign Z" onChange={handleLabelChange} /> Event value Optional: } defaultValue={options?.value?.toString() ?? ''} placeholder="Example: 0" onChange={handleValueChange} />
) }