Add MixPanel events
[MAILPOET-2549]
This commit is contained in:
committed by
Jack Kitterhing
parent
20fdea408e
commit
139b3691bf
@@ -20,6 +20,10 @@ const FormPlacementPanel = ({ onToggle, isOpened }) => {
|
||||
|
||||
const exportLinkClicked = curry((type, event) => {
|
||||
event.preventDefault();
|
||||
MailPoet.trackEvent('Forms > Embed', {
|
||||
'Embed type': type,
|
||||
'MailPoet Free version': window.mailpoet_version,
|
||||
});
|
||||
if (type === 'php') {
|
||||
return setCopyAreaContent(formExports.php);
|
||||
}
|
||||
|
@@ -84,6 +84,10 @@ export default {
|
||||
})
|
||||
.then((response) => {
|
||||
const customField = response.data;
|
||||
MailPoet.trackEvent('Forms > Add new custom field', {
|
||||
'Field type': customField.type,
|
||||
'MailPoet Free version': window.mailpoet_version,
|
||||
});
|
||||
const blockName = registerCustomFieldBlock(customField);
|
||||
const customFieldBlock = createBlock(blockName);
|
||||
dispatch('core/block-editor').replaceBlock(action.clientId, customFieldBlock);
|
||||
@@ -108,6 +112,10 @@ export default {
|
||||
},
|
||||
})
|
||||
.then(() => {
|
||||
MailPoet.trackEvent('Forms > Delete custom field', {
|
||||
'Field type': customField.type,
|
||||
'MailPoet Free version': window.mailpoet_version,
|
||||
});
|
||||
dispatch('mailpoet-form-editor').deleteCustomFieldDone(actionData.customFieldId, actionData.clientId);
|
||||
dispatch('core/block-editor').removeBlock(actionData.clientId);
|
||||
unregisterBlockType(
|
||||
|
@@ -131,7 +131,12 @@ class FormList extends React.Component {
|
||||
endpoint: 'forms',
|
||||
action: 'create',
|
||||
}).done((response) => {
|
||||
window.location = window.mailpoet_form_edit_url + response.data.id;
|
||||
MailPoet.trackEvent('Forms > Add New', {
|
||||
'MailPoet Free version': window.mailpoet_version,
|
||||
});
|
||||
setTimeout(() => {
|
||||
window.location = window.mailpoet_form_edit_url + response.data.id;
|
||||
}, 200);
|
||||
}).fail((response) => {
|
||||
if (response.errors.length > 0) {
|
||||
MailPoet.Notice.error(
|
||||
|
Reference in New Issue
Block a user