From 28dbb3696ac61926c1764fed7b0bcd2e5611842e Mon Sep 17 00:00:00 2001 From: robertsreberski Date: Tue, 30 Jul 2024 22:13:01 +0200 Subject: [PATCH] Fix Tracks events code --- .../my-jetpack/_inc/components/product-card/index.tsx | 2 +- .../my-jetpack/_inc/components/welcome-flow/index.tsx | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/projects/packages/my-jetpack/_inc/components/product-card/index.tsx b/projects/packages/my-jetpack/_inc/components/product-card/index.tsx index 9cf3c0130443a..edcda8edc452d 100644 --- a/projects/packages/my-jetpack/_inc/components/product-card/index.tsx +++ b/projects/packages/my-jetpack/_inc/components/product-card/index.tsx @@ -142,7 +142,7 @@ const ProductCard: FC< ProductCardProps > = props => { * Sends an event when the card loads */ useEffect( () => { - recordEvent( 'jetpack_myjetpack_product_card_loaded', { + recordEvent( 'jetpack_myjetpack_product_card_load', { product: slug, status: status, } ); diff --git a/projects/packages/my-jetpack/_inc/components/welcome-flow/index.tsx b/projects/packages/my-jetpack/_inc/components/welcome-flow/index.tsx index 2b0168c93fd7c..7558827788ca3 100644 --- a/projects/packages/my-jetpack/_inc/components/welcome-flow/index.tsx +++ b/projects/packages/my-jetpack/_inc/components/welcome-flow/index.tsx @@ -47,16 +47,16 @@ const WelcomeFlow: FC< PropsWithChildren > = ( { children } ) => { useEffect( () => { if ( prevStep !== currentStep ) { - recordEvent( 'jetpack_myjetpack_welcome_banner_step_view', { currentStep } ); + recordEvent( 'jetpack_myjetpack_welcome_banner_step_view', { current_step: currentStep } ); setPrevStep( currentStep ); } }, [ currentStep, prevStep, recordEvent ] ); const onDismissClick = useCallback( () => { recordEvent( 'jetpack_myjetpack_welcome_banner_dismiss_click', { - currentStep, - isUserConnected, - isSiteConnected, + current_step: currentStep, + is_user_connected: isUserConnected, + is_site_connected: isSiteConnected, } ); dismissWelcomeBanner(); }, [ recordEvent, currentStep, isUserConnected, isSiteConnected, dismissWelcomeBanner ] );