diff --git a/airbyte-webapp/src/pages/DestinationPage/pages/CreateDestinationPage/components/DestinationForm.tsx b/airbyte-webapp/src/pages/DestinationPage/pages/CreateDestinationPage/components/DestinationForm.tsx index fce89f9ee2df..3ed793080431 100644 --- a/airbyte-webapp/src/pages/DestinationPage/pages/CreateDestinationPage/components/DestinationForm.tsx +++ b/airbyte-webapp/src/pages/DestinationPage/pages/CreateDestinationPage/components/DestinationForm.tsx @@ -52,7 +52,10 @@ export const DestinationForm: React.FC = ({ isLoading, } = useGetDestinationDefinitionSpecificationAsync(destinationDefinitionId); - const onDropDownSelect = (destinationDefinitionId: string) => { + const onDropDownSelect = ( + destinationDefinitionId: string, + trackParams?: { actionDescription: string; connector_destination_suggested: boolean } + ) => { setDestinationDefinitionId(destinationDefinitionId); const connector = destinationDefinitions.find((item) => item.destinationDefinitionId === destinationDefinitionId); @@ -65,6 +68,7 @@ export const DestinationForm: React.FC = ({ actionDescription: "Destination connector type selected", connector_destination: connector?.name, connector_destination_definition_id: destinationDefinitionId, + ...trackParams, }); }; diff --git a/airbyte-webapp/src/views/Connector/ServiceForm/ServiceForm.tsx b/airbyte-webapp/src/views/Connector/ServiceForm/ServiceForm.tsx index 9fcf4b519a74..ea16cc1cb406 100644 --- a/airbyte-webapp/src/views/Connector/ServiceForm/ServiceForm.tsx +++ b/airbyte-webapp/src/views/Connector/ServiceForm/ServiceForm.tsx @@ -121,7 +121,10 @@ export interface ServiceFormProps { formId?: string; availableServices: ConnectorDefinition[]; selectedConnectorDefinitionSpecification?: ConnectorDefinitionSpecification; - onServiceSelect?: (id: string) => void; + onServiceSelect?: ( + id: string, + trackParams?: { actionDescription: string; connector_destination_suggested: boolean } + ) => void; onSubmit: (values: ServiceFormValues) => void; isLoading?: boolean; isEditMode?: boolean; diff --git a/airbyte-webapp/src/views/Connector/ServiceForm/components/FrequentlyUsedDestinations/FrequentlyUsedDestinations.test.tsx b/airbyte-webapp/src/views/Connector/ServiceForm/components/FrequentlyUsedDestinations/FrequentlyUsedDestinations.test.tsx index 55395fc6a52e..49dcddeb19c3 100644 --- a/airbyte-webapp/src/views/Connector/ServiceForm/components/FrequentlyUsedDestinations/FrequentlyUsedDestinations.test.tsx +++ b/airbyte-webapp/src/views/Connector/ServiceForm/components/FrequentlyUsedDestinations/FrequentlyUsedDestinations.test.tsx @@ -38,7 +38,10 @@ describe("", () => { await waitFor(() => { expect(handler).toHaveBeenCalledTimes(1); - expect(handler).toHaveBeenCalledWith("2"); + expect(handler).toHaveBeenCalledWith("2", { + actionDescription: "Suggested destination connector type selected", + connector_destination_suggested: true, + }); }); }); }); diff --git a/airbyte-webapp/src/views/Connector/ServiceForm/components/FrequentlyUsedDestinations/FrequentlyUsedDestinations.tsx b/airbyte-webapp/src/views/Connector/ServiceForm/components/FrequentlyUsedDestinations/FrequentlyUsedDestinations.tsx index df35d639de82..07cf7b352ebf 100644 --- a/airbyte-webapp/src/views/Connector/ServiceForm/components/FrequentlyUsedDestinations/FrequentlyUsedDestinations.tsx +++ b/airbyte-webapp/src/views/Connector/ServiceForm/components/FrequentlyUsedDestinations/FrequentlyUsedDestinations.tsx @@ -12,7 +12,10 @@ import styles from "./FrequentlyUsedDestinations.module.scss"; export interface FrequentlyUsedDestinationsProps { propertyPath: string; destinations: DestinationConnectorCard[]; - onDestinationSelect?: (id: string) => void; + onDestinationSelect?: ( + id: string, + trackParams?: { actionDescription: string; connector_destination_suggested: boolean } + ) => void; isLoading?: boolean; } @@ -30,7 +33,10 @@ export const FrequentlyUsedDestinations: React.FC { setValue(id); - onDestinationSelect?.(id); + onDestinationSelect?.(id, { + actionDescription: "Suggested destination connector type selected", + connector_destination_suggested: true, + }); }; return (