Convert loadedvia
part to URL search param instead of URL hash
MAILPOET-5701
This commit is contained in:
committed by
Aschepikov
parent
ddde17f83a
commit
c957cc0c2b
@@ -195,11 +195,11 @@ const routes = [
|
|||||||
},
|
},
|
||||||
/* New newsletter: types */
|
/* New newsletter: types */
|
||||||
{
|
{
|
||||||
path: '/new/standard/(.*)?',
|
path: '/new/standard',
|
||||||
render: withBoundary(NewsletterTypeStandard),
|
render: withBoundary(NewsletterTypeStandard),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/new/notification/(.*)?',
|
path: '/new/notification',
|
||||||
render: withBoundary(NewsletterNotification),
|
render: withBoundary(NewsletterNotification),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@@ -34,7 +34,9 @@ class NewsletterNotificationComponent extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
if (window.location.hash.includes('loadedvia=woo_multichannel_dashboard')) {
|
if (
|
||||||
|
window.location.search.includes('loadedvia=woo_multichannel_dashboard')
|
||||||
|
) {
|
||||||
window.MailPoet.trackEvent(
|
window.MailPoet.trackEvent(
|
||||||
'MailPoet - WooCommerce Multichannel Marketing dashboard > Create post notification page',
|
'MailPoet - WooCommerce Multichannel Marketing dashboard > Create post notification page',
|
||||||
{
|
{
|
||||||
|
@@ -21,7 +21,9 @@ class NewsletterStandardComponent extends Component {
|
|||||||
})
|
})
|
||||||
.done((response) => {
|
.done((response) => {
|
||||||
if (
|
if (
|
||||||
window.location.hash.includes('loadedvia=woo_multichannel_dashboard')
|
window.location.search.includes(
|
||||||
|
'loadedvia=woo_multichannel_dashboard',
|
||||||
|
)
|
||||||
) {
|
) {
|
||||||
window.MailPoet.trackEvent(
|
window.MailPoet.trackEvent(
|
||||||
'MailPoet - WooCommerce Multichannel Marketing dashboard > Newsletter template selection page',
|
'MailPoet - WooCommerce Multichannel Marketing dashboard > Newsletter template selection page',
|
||||||
|
@@ -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.',
|
'Send a newsletter with images, buttons, dividers, and social bookmarks. Or, just send a basic text email.',
|
||||||
'mailpoet',
|
'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()
|
$this->get_icon_url()
|
||||||
),
|
),
|
||||||
self::CAMPAIGN_TYPE_POST_NOTIFICATIONS => new MarketingCampaignType(
|
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.',
|
'Let MailPoet email your subscribers with your latest content. You can send daily, weekly, monthly, or even immediately after publication.',
|
||||||
'mailpoet',
|
'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()
|
$this->get_icon_url()
|
||||||
),
|
),
|
||||||
self::CAMPAIGN_TYPE_AUTOMATIONS => new MarketingCampaignType(
|
self::CAMPAIGN_TYPE_AUTOMATIONS => new MarketingCampaignType(
|
||||||
@@ -176,7 +176,7 @@ class MPMarketingChannel implements MarketingChannelInterface {
|
|||||||
$this,
|
$this,
|
||||||
__('MailPoet Automations', 'mailpoet'),
|
__('MailPoet Automations', 'mailpoet'),
|
||||||
__('Set up automations to send abandoned cart reminders, welcome new subscribers, celebrate first-time buyers, and much more.', '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()
|
$this->get_icon_url()
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
|
Reference in New Issue
Block a user