The WooCommerce mobile apps is about to enable paid campaigns creation thru the app. The initial plan is to open a webview to wp-admin/admin.php?page=wc-admin&path=%2Fgoogle%2Fdashboard&subpath=%2Fcampaigns%2Fcreate, to start merchants on the wp-admin campaign creation flow.
Furthermore, the app needs to be able to track when a campaign is successfully created on mobile. This is to be done by listening to the currently opened page in the webview and checking if it's the redirect page after successful creation.
At the moment, a successful campaign creation redirects to the GLA plugin dashboard page, on page=wc-admin&path=%2Fgoogle%2Fdashboard. This URL unfortunately is not unique enough to be used for checking success state, since merchants can also navigate normally in the webview to this page, without completing a campaign creation.
A suggested solution will be to add an extra query parameter to the redirect URL after successful campaign, e.g: page=wc-admin&path=%2Fgoogle%2Fdashboard&campaign=saved
This will be a unique enough URL that can be used by the mobile apps to check for success state.
User story
The WooCommerce mobile apps is about to enable paid campaigns creation thru the app. The initial plan is to open a webview to
wp-admin/admin.php?page=wc-admin&path=%2Fgoogle%2Fdashboard&subpath=%2Fcampaigns%2Fcreate
, to start merchants on the wp-admin campaign creation flow.Furthermore, the app needs to be able to track when a campaign is successfully created on mobile. This is to be done by listening to the currently opened page in the webview and checking if it's the redirect page after successful creation.
At the moment, a successful campaign creation redirects to the GLA plugin dashboard page, on
page=wc-admin&path=%2Fgoogle%2Fdashboard
. This URL unfortunately is not unique enough to be used for checking success state, since merchants can also navigate normally in the webview to this page, without completing a campaign creation.A suggested solution will be to add an extra query parameter to the redirect URL after successful campaign, e.g:
page=wc-admin&path=%2Fgoogle%2Fdashboard&campaign=saved
This will be a unique enough URL that can be used by the mobile apps to check for success state.
Additional details:
pcTzPl-2mX-p2