Fix date format for satismeter

[MAILPOET-1575]
This commit is contained in:
Pavel Dohnal
2018-10-18 08:44:24 +02:00
parent 9c8c89149b
commit debe9ea1ba
2 changed files with 7 additions and 2 deletions

View File

@@ -1,12 +1,16 @@
function displayPoll() {
if (window.mailpoet_display_nps_poll && window.satismeter) {
if (
window.mailpoet_display_nps_poll
&& window.satismeter
&& window.mailpoet_installed_at_isoFormat
) {
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_settings.installed_at,
createdAt: window.mailpoet_installed_at_isoFormat,
},
});
}