Fix/some outstanding CES bugs (https://github.com/woocommerce/woocommerce-admin/pull/5739)
* fix settings change enqueue params * Include comments in score record callback * send empty string for comments Co-authored-by: Rebecca Scott <me@becdetat.com>
This commit is contained in:
parent
b4e309f964
commit
cc5e500085
|
@ -98,10 +98,11 @@ function CustomerEffortScoreTracks( {
|
|||
} );
|
||||
};
|
||||
|
||||
const recordScore = ( score ) => {
|
||||
const recordScore = ( score, comments ) => {
|
||||
recordEvent( 'ces_feedback', {
|
||||
action,
|
||||
score,
|
||||
comments: comments || '',
|
||||
store_age: storeAge,
|
||||
...trackProps,
|
||||
} );
|
||||
|
@ -153,7 +154,6 @@ CustomerEffortScoreTracks.propTypes = {
|
|||
* Whether tracking is allowed or not.
|
||||
*/
|
||||
allowTracking: PropTypes.bool,
|
||||
|
||||
/**
|
||||
* Whether props are still being resolved.
|
||||
*/
|
||||
|
|
|
@ -364,14 +364,15 @@ class CustomerEffortScoreTracks {
|
|||
|
||||
$this->enqueue_to_ces_tracks(
|
||||
array(
|
||||
'action' => self::SETTINGS_CHANGE_ACTION_NAME,
|
||||
'label' => __(
|
||||
'action' => self::SETTINGS_CHANGE_ACTION_NAME,
|
||||
'label' => __(
|
||||
'How easy was it to update your settings?',
|
||||
'woocommerce-admin'
|
||||
),
|
||||
'pagenow' => 'woocommerce_page_wc-settings',
|
||||
'adminpage' => 'woocommerce_page_wc-settings',
|
||||
'props' => array(),
|
||||
'onsubmit_label' => $this->onsubmit_label,
|
||||
'pagenow' => 'woocommerce_page_wc-settings',
|
||||
'adminpage' => 'woocommerce_page_wc-settings',
|
||||
'props' => (object) array(),
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue