Move tracking code into a sepparate file

[MAILPOET-1539]
This commit is contained in:
Pavel Dohnal
2018-09-27 10:38:11 +02:00
parent fc5bba9f11
commit 94efc67658
4 changed files with 22 additions and 12 deletions

View File

@@ -0,0 +1,15 @@
function displayPoll() {
if (window.display_nps_poll && window.satismeter) {
window.satismeter({
writeKey: '6L479eVPXk7pBn6S',
userId: window.current_wp_user.ID + window.site_url,
traits: {
name: window.current_wp_user.user_nicename,
email: window.current_wp_user.user_email,
createdAt: window.mailpoet_settings.installed_at,
},
});
}
}
setImmediate(displayPoll);