Add tracking for enable auto renew links (#49710)
* Add tracking for enable auto renew link. * Add UTM parameters to in-app enable auto-renew notice. * Add changefile(s) from automation for the following project(s): woocommerce --------- Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
parent
ad7a49df4c
commit
158930ef4d
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: update
|
||||
|
||||
Add tracking for enable auto renew links on notices
|
|
@ -725,7 +725,7 @@ class PluginsHelper {
|
|||
$hyperlink_url = add_query_arg(
|
||||
array(
|
||||
'utm_source' => 'pu',
|
||||
'utm_campaign' => 'pu_settings_screen_renew',
|
||||
'utm_campaign' => 'expired' === $type ? 'pu_settings_screen_renew' : 'pu_settings_screen_enable_autorenew',
|
||||
|
||||
),
|
||||
self::WOO_SUBSCRIPTION_PAGE_URL
|
||||
|
@ -769,7 +769,7 @@ class PluginsHelper {
|
|||
'product_id' => $product_id,
|
||||
'type' => $type,
|
||||
'utm_source' => 'pu',
|
||||
'utm_campaign' => 'pu_settings_screen_renew',
|
||||
'utm_campaign' => 'expired' === $type ? 'pu_settings_screen_renew' : 'pu_settings_screen_enable_autorenew',
|
||||
|
||||
),
|
||||
self::WOO_SUBSCRIPTION_PAGE_URL
|
||||
|
@ -861,14 +861,20 @@ class PluginsHelper {
|
|||
'expiring',
|
||||
);
|
||||
|
||||
$button_link = self::WOO_SUBSCRIPTION_PAGE_URL;
|
||||
$button_link = add_query_arg(
|
||||
array(
|
||||
'utm_source' => 'pu',
|
||||
'utm_campaign' => 'pu_in_apps_screen_enable_autorenew',
|
||||
),
|
||||
self::WOO_SUBSCRIPTION_PAGE_URL
|
||||
);
|
||||
if ( in_array( $notice_data['type'], array( 'single_manage', 'multiple_manage' ), true ) ) {
|
||||
$button_link = add_query_arg(
|
||||
array(
|
||||
'product_id' => $notice_data['product_id'],
|
||||
'type' => 'expiring',
|
||||
),
|
||||
self::WOO_SUBSCRIPTION_PAGE_URL
|
||||
$button_link
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue