From 8112373338d5e317c339f81730e2ec17c2eec560 Mon Sep 17 00:00:00 2001 From: diDroid Date: Wed, 18 Oct 2023 14:07:03 +0530 Subject: [PATCH] isolate social media platforms into separate hiive events --- src/OnboardingSPA/components/App/index.js | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/OnboardingSPA/components/App/index.js b/src/OnboardingSPA/components/App/index.js index 9c2e693a0..0bd68d32d 100644 --- a/src/OnboardingSPA/components/App/index.js +++ b/src/OnboardingSPA/components/App/index.js @@ -225,16 +225,18 @@ const App = () => { const platforms = Object.keys( socialMediaStoreToState( socialData ) - ).join( ',' ); - if ( platforms ) { - trackOnboardingEvent( - new OnboardingEvent( - ACTION_SOCIAL_ADDED, - platforms, - {}, - previousStepURL - ) - ); + ); + if ( platforms.length ) { + platforms.forEach( ( platform ) => { + trackOnboardingEvent( + new OnboardingEvent( + ACTION_SOCIAL_ADDED, + platform, + {}, + previousStepURL + ) + ); + } ); } }