Add tracking and reporting information

MAILPOET-4649
This commit is contained in:
Oluwaseun Olorunsola
2022-12-14 09:50:29 +01:00
committed by Aschepikov
parent 146e1c871f
commit f100ef72da
3 changed files with 7 additions and 1 deletions

View File

@@ -1,3 +1,5 @@
import { MailPoet } from 'mailpoet';
export function* openEmailCustomizer(newsletterId?: string) { export function* openEmailCustomizer(newsletterId?: string) {
let id = newsletterId; let id = newsletterId;
if (!id) { if (!id) {
@@ -11,7 +13,9 @@ export function* openEmailCustomizer(newsletterId?: string) {
return { type: 'SAVE_FAILED', error }; return { type: 'SAVE_FAILED', error };
} }
id = res.data.signup_confirmation.transactional_email_id; id = res.data.signup_confirmation.transactional_email_id;
MailPoet.trackEvent('Editor > Confirmation email customizer enabled');
} }
MailPoet.trackEvent('User Open confirmation email customizer');
window.location.href = `?page=mailpoet-newsletter-editor&id=${id}`; window.location.href = `?page=mailpoet-newsletter-editor&id=${id}`;
return null; return null;
} }

View File

@@ -31,6 +31,7 @@ use MailPoet\Services\AuthorizedEmailsController;
use MailPoet\Settings\Pages; use MailPoet\Settings\Pages;
use MailPoet\Settings\SettingsController; use MailPoet\Settings\SettingsController;
use MailPoet\Settings\TrackingConfig; use MailPoet\Settings\TrackingConfig;
use MailPoet\Subscribers\ConfirmationEmailCustomizer;
use MailPoet\Subscribers\NewSubscriberNotificationMailer; use MailPoet\Subscribers\NewSubscriberNotificationMailer;
use MailPoet\Subscribers\SubscriberListingRepository; use MailPoet\Subscribers\SubscriberListingRepository;
use MailPoet\Tags\TagRepository; use MailPoet\Tags\TagRepository;
@@ -204,6 +205,7 @@ class Reporter {
'Number of segments with multiple conditions' => $this->segmentsRepository->getSegmentCountWithMultipleFilters(), 'Number of segments with multiple conditions' => $this->segmentsRepository->getSegmentCountWithMultipleFilters(),
'Support tier' => $this->subscribersFeature->hasPremiumSupport() ? 'premium' : 'free', 'Support tier' => $this->subscribersFeature->hasPremiumSupport() ? 'premium' : 'free',
'Unauthorized email notice shown' => !empty($this->settings->get(AuthorizedEmailsController::AUTHORIZED_EMAIL_ADDRESSES_ERROR_SETTING)), 'Unauthorized email notice shown' => !empty($this->settings->get(AuthorizedEmailsController::AUTHORIZED_EMAIL_ADDRESSES_ERROR_SETTING)),
'Sign-up confirmation: Confirmation Template > using html email editor template' => (boolean)$this->settings->get(ConfirmationEmailCustomizer::SETTING_ENABLE_EMAIL_CUSTOMIZER, false),
]; ];
$result = array_merge( $result = array_merge(

View File

@@ -31,7 +31,7 @@
<div class="mailpoet_editor_last_saved"> <div class="mailpoet_editor_last_saved">
&nbsp; &nbsp;
<span class="mailpoet_autosaved_message mailpoet_hidden"><%= __('Autosaved') %></span> <span class="mailpoet_autosaved_message mailpoet_hidden"><%= __('Autosaved') %></span>
<span class="mailpoet_autosaved_at mailpoet_hidden"></span> <span class="mailpoet_autosaved_at"></span>
</div> </div>
</div> </div>
<div class="clearfix"></div> <div class="clearfix"></div>