Tracking new events
This commit is contained in:
@ -513,6 +513,10 @@
|
||||
});
|
||||
}
|
||||
|
||||
MailPoet.trackEvent('Forms > Add New', {
|
||||
'MailPoet Free version': window.mailpoet_version
|
||||
});
|
||||
|
||||
// if there is a callback, call it!
|
||||
if(callback !== undefined) {
|
||||
callback();
|
||||
@ -566,8 +570,13 @@
|
||||
mailpoet_form_export();
|
||||
|
||||
$(document).on('click', '.mailpoet_form_export_toggle', function() {
|
||||
var type = $(this).data('type');
|
||||
$('.mailpoet_form_export_output').hide();
|
||||
$('#mailpoet_form_export_'+$(this).data('type')).show();
|
||||
$('#mailpoet_form_export_' + type).show();
|
||||
MailPoet.trackEvent('Forms > Embed', {
|
||||
'Embed type': type,
|
||||
'MailPoet Free version': window.mailpoet_version
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
@ -614,6 +623,7 @@
|
||||
var id = $(this).data('id');
|
||||
var item = $(this).parent();
|
||||
var name = $(this).siblings('.mailpoet_form_field').attr('wysija_name');
|
||||
var type = $(this).siblings('.mailpoet_form_field').attr('wysija_type');
|
||||
|
||||
if(window.confirm(
|
||||
"<%= __('This field will be deleted for all your subscribers. Are you sure?') %>"
|
||||
@ -636,6 +646,12 @@
|
||||
MailPoet.Notice.success(
|
||||
"<%= __('Removed custom field %$1s') | escape('js') %>".replace('%$1s', '"' + name + '"')
|
||||
);
|
||||
|
||||
MailPoet.trackEvent('Forms > Delete custom field', {
|
||||
'Field type': type,
|
||||
'MailPoet Free version': window.mailpoet_version
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
});
|
||||
|
@ -82,6 +82,11 @@
|
||||
// close popup
|
||||
MailPoet.Modal.close();
|
||||
|
||||
MailPoet.trackEvent('Forms > Add new custom field', {
|
||||
'Field type': data.type,
|
||||
'MailPoet Free version': window.mailpoet_version
|
||||
});
|
||||
|
||||
if(WysijaForm.updateBlock(response.data) === true) {
|
||||
// trigger save, if a block has been updated
|
||||
mailpoet_form_save(false);
|
||||
|
@ -6,7 +6,7 @@
|
||||
<div>
|
||||
<p class="mailpoet_sending_methods_help help">
|
||||
<%= __('<strong>Tip:</strong> we have a [link]list of plugins[/link] that work with MailPoet if you need fancier forms.')
|
||||
|replaceLinkTags('http://beta.docs.mailpoet.com/article/198-list-of-forms-plugins-that-work-with-mailpoet?utm_source=plugin&utm_medium=settings&utm_campaign=helpdocs', {'target' : '_blank'})
|
||||
|replaceLinkTags('http://beta.docs.mailpoet.com/article/198-list-of-forms-plugins-that-work-with-mailpoet?utm_source=plugin&utm_medium=settings&utm_campaign=helpdocs', {'target' : '_blank', id: 'mailpoet_helper_link'})
|
||||
|raw
|
||||
%>
|
||||
</p>
|
||||
@ -68,3 +68,13 @@
|
||||
'new': __('Add New'),
|
||||
}) %>
|
||||
<% endblock %>
|
||||
|
||||
<% block after_javascript %>
|
||||
<script type="text/javascript">
|
||||
jQuery('#mailpoet_helper_link').on('click', function() {
|
||||
MailPoet.trackEvent('Forms page > link to doc page', {
|
||||
'MailPoet Free version': window.mailpoet_version
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<% endblock %>
|
||||
|
@ -148,3 +148,11 @@
|
||||
</div>
|
||||
|
||||
<% endblock %>
|
||||
|
||||
<% block after_javascript %>
|
||||
<script type="text/javascript">
|
||||
MailPoet.trackEvent('Premium page viewed', {
|
||||
'MailPoet Free version': window.mailpoet_version
|
||||
});
|
||||
</script>
|
||||
<% endblock %>
|
||||
|
Reference in New Issue
Block a user