CYS: Improve tracking survey (#50196)

* CYS: Improve tracking survey

* Add changefile(s) from automation for the following project(s): woocommerce

---------

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Luigi Teschio 2024-08-02 17:38:25 +02:00 committed by GitHub
parent dbc3056845
commit 5e78db0585
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 26 additions and 12 deletions

View File

@ -85,18 +85,28 @@ export const SurveyForm = ( {
! isOtherChecked );
const sendData = () => {
const surveyCompleteEvent = showAISurvey
? 'customize_your_store_transitional_survey_complete'
: 'customize_your_store_on_core_transitional_survey_complete';
trackEvent( surveyCompleteEvent, {
rating,
choose_streamline: isStreamlineChecked,
choose_dislike_themes: isDislikeThemesChecked,
choose_themes_not_match: isThemeNoMatchChecked,
choose_other: isOtherChecked,
feedback: feedbackText,
spill_beans: spillBeansText,
} );
if ( showAISurvey ) {
trackEvent( 'customize_your_store_transitional_survey_complete', {
rating,
choose_streamline: isStreamlineChecked,
choose_dislike_themes: isDislikeThemesChecked,
choose_themes_not_match: isThemeNoMatchChecked,
choose_other: isOtherChecked,
feedback: feedbackText,
spill_beans: spillBeansText,
} );
} else {
trackEvent( 'ces_feedback', {
action: 'customize_your_store_on_core_transitional_survey_complete',
rating,
choose_design_my_own_theme: isStreamlineChecked,
choose_dislike_themes: isDislikeThemesChecked,
choose_themes_not_match: isThemeNoMatchChecked,
choose_other: isOtherChecked,
feedback: feedbackText,
spill_beans: spillBeansText,
} );
}
onSend();
createSuccessNotice(

View File

@ -0,0 +1,4 @@
Significance: patch
Type: update
CYS: Improve tracking survey