diff --git a/assets/js/src/nps_poll.jsx b/assets/js/src/nps_poll.jsx index 087e84ad3c..a26dea3b4c 100644 --- a/assets/js/src/nps_poll.jsx +++ b/assets/js/src/nps_poll.jsx @@ -25,26 +25,10 @@ function displayPoll() { && window.satismeter && window.mailpoet_installed_at_isoFormat ) { - // New users poll + const newUsersPollId = '6L479eVPXk7pBn6S'; + const oldUsersPollId = 'k0aJAsQAWI2ERyGv'; window.satismeter({ - writeKey: '6L479eVPXk7pBn6S', - userId: window.mailpoet_current_wp_user.ID + window.mailpoet_site_url, - traits: { - name: window.mailpoet_current_wp_user.user_nicename, - email: window.mailpoet_current_wp_user.user_email, - createdAt: window.mailpoet_installed_at_isoFormat, - }, - events: { - submit: (response) => { - if (response.rating >= 9 && response.completed) { - showReviewRequestModal(); - } - }, - }, - }); - // Old users poll - window.satismeter({ - writeKey: 'k0aJAsQAWI2ERyGv', + writeKey: window.mailpoet_is_new_user ? newUsersPollId : oldUsersPollId, userId: window.mailpoet_current_wp_user.ID + window.mailpoet_site_url, traits: { name: window.mailpoet_current_wp_user.user_nicename,