diff --git a/mailpoet/assets/js/src/newsletters/newsletters.jsx b/mailpoet/assets/js/src/newsletters/newsletters.jsx index 111440476a..103165f0ab 100644 --- a/mailpoet/assets/js/src/newsletters/newsletters.jsx +++ b/mailpoet/assets/js/src/newsletters/newsletters.jsx @@ -195,11 +195,11 @@ const routes = [ }, /* New newsletter: types */ { - path: '/new/standard/(.*)?', + path: '/new/standard', render: withBoundary(NewsletterTypeStandard), }, { - path: '/new/notification/(.*)?', + path: '/new/notification', render: withBoundary(NewsletterNotification), }, { diff --git a/mailpoet/assets/js/src/newsletters/types/notification/notification.jsx b/mailpoet/assets/js/src/newsletters/types/notification/notification.jsx index ded77b5619..98cbe0aae7 100644 --- a/mailpoet/assets/js/src/newsletters/types/notification/notification.jsx +++ b/mailpoet/assets/js/src/newsletters/types/notification/notification.jsx @@ -34,7 +34,9 @@ class NewsletterNotificationComponent extends Component { } componentDidMount() { - if (window.location.hash.includes('loadedvia=woo_multichannel_dashboard')) { + if ( + window.location.search.includes('loadedvia=woo_multichannel_dashboard') + ) { window.MailPoet.trackEvent( 'MailPoet - WooCommerce Multichannel Marketing dashboard > Create post notification page', { diff --git a/mailpoet/assets/js/src/newsletters/types/standard.jsx b/mailpoet/assets/js/src/newsletters/types/standard.jsx index a8a4ab2288..ecef3e6a3a 100644 --- a/mailpoet/assets/js/src/newsletters/types/standard.jsx +++ b/mailpoet/assets/js/src/newsletters/types/standard.jsx @@ -21,7 +21,9 @@ class NewsletterStandardComponent extends Component { }) .done((response) => { if ( - window.location.hash.includes('loadedvia=woo_multichannel_dashboard') + window.location.search.includes( + 'loadedvia=woo_multichannel_dashboard', + ) ) { window.MailPoet.trackEvent( 'MailPoet - WooCommerce Multichannel Marketing dashboard > Newsletter template selection page', diff --git a/mailpoet/lib/WooCommerce/MultichannelMarketing/MPMarketingChannel.php b/mailpoet/lib/WooCommerce/MultichannelMarketing/MPMarketingChannel.php index eb28c799da..bd2bdd4507 100644 --- a/mailpoet/lib/WooCommerce/MultichannelMarketing/MPMarketingChannel.php +++ b/mailpoet/lib/WooCommerce/MultichannelMarketing/MPMarketingChannel.php @@ -157,7 +157,7 @@ class MPMarketingChannel implements MarketingChannelInterface { 'Send a newsletter with images, buttons, dividers, and social bookmarks. Or, just send a basic text email.', 'mailpoet', ), - admin_url('admin.php?page=' . Menu::EMAILS_PAGE_SLUG . '#/new/standard/loadedvia=woo_multichannel_dashboard'), + admin_url('admin.php?loadedvia=woo_multichannel_dashboard&page=' . Menu::EMAILS_PAGE_SLUG . '#/new/standard'), $this->get_icon_url() ), self::CAMPAIGN_TYPE_POST_NOTIFICATIONS => new MarketingCampaignType( @@ -168,7 +168,7 @@ class MPMarketingChannel implements MarketingChannelInterface { 'Let MailPoet email your subscribers with your latest content. You can send daily, weekly, monthly, or even immediately after publication.', 'mailpoet', ), - admin_url('admin.php?page=' . Menu::EMAILS_PAGE_SLUG . '#/new/notification/loadedvia=woo_multichannel_dashboard'), + admin_url('admin.php?loadedvia=woo_multichannel_dashboard&page=' . Menu::EMAILS_PAGE_SLUG . '#/new/notification'), $this->get_icon_url() ), self::CAMPAIGN_TYPE_AUTOMATIONS => new MarketingCampaignType( @@ -176,7 +176,7 @@ class MPMarketingChannel implements MarketingChannelInterface { $this, __('MailPoet Automations', 'mailpoet'), __('Set up automations to send abandoned cart reminders, welcome new subscribers, celebrate first-time buyers, and much more.', 'mailpoet'), - admin_url('admin.php?page=' . Menu::AUTOMATION_TEMPLATES_PAGE_SLUG . '&loadedvia=woo_multichannel_dashboard'), + admin_url('admin.php?loadedvia=woo_multichannel_dashboard&page=' . Menu::AUTOMATION_TEMPLATES_PAGE_SLUG), $this->get_icon_url() ), ];