Add tracking for unauthorized emails in settings

[MAILPOET-3881]
This commit is contained in:
Jan Lysý
2021-10-29 10:43:48 +02:00
committed by Veljko V
parent 7d04ea28ad
commit 73b18d9592
2 changed files with 10 additions and 0 deletions

View File

@@ -46,6 +46,7 @@ export function* saveSettings() {
});
yield setSettings(res.data);
yield setReEngagement(res.meta);
yield { type: 'TRACK_UNAUTHORIZED_EMAIL', meta: res.meta };
return { type: 'SAVE_DONE' };
}

View File

@@ -44,3 +44,12 @@ export function TRACK_TEST_EMAIL_SENT({ success, method }) {
}
);
}
export function TRACK_UNAUTHORIZED_EMAIL({ meta }) {
if (meta !== undefined && meta.invalid_sender_address) {
MailPoet.trackEvent(
'Unauthorized email used',
{ 'Unauthorized email source': 'settings' }
);
}
}