Skip to content

Commit

Permalink
My Jetpack: add tracks events to slider arrow buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
IanRamosC committed Oct 23, 2024
1 parent f94fe13 commit b57e9e9
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,18 @@ const EvaluationRecommendations: FC< Props > = ( { welcomeFlowExperimentVariatio

const handleNextSlide = useCallback( () => {
handleSlide( containerRef, 1 );
}, [ containerRef ] );

recordEvent( 'jetpack_myjetpack_recommendations_slide_arrow_click', {
direction: 'next',
} );
}, [ recordEvent, containerRef ] );

const handlePrevSlide = useCallback( () => {
handleSlide( containerRef, -1 );
}, [ containerRef ] );
recordEvent( 'jetpack_myjetpack_recommendations_slide_arrow_click', {
direction: 'previous',
} );
}, [ recordEvent, containerRef ] );

// We're defining each of these translations in separate variables here, otherwise optimizations in
// the build step end up breaking the translations and causing error.
Expand Down

0 comments on commit b57e9e9

Please sign in to comment.