plugin updates
This commit is contained in:
@@ -34,7 +34,7 @@ class WC_Extensions_Tracking {
|
||||
'section' => empty( $_REQUEST['section'] ) ? '_featured' : wc_clean( wp_unslash( $_REQUEST['section'] ) ),
|
||||
);
|
||||
|
||||
$event = 'extensions_view';
|
||||
$event = 'extensions_view';
|
||||
if ( 'helper' === $properties['section'] ) {
|
||||
$event = 'subscriptions_view';
|
||||
}
|
||||
@@ -52,7 +52,7 @@ class WC_Extensions_Tracking {
|
||||
* Send a Tracks event when the Extensions page gets a bad response or no response
|
||||
* from the WCCOM extensions API.
|
||||
*
|
||||
* @param string $error
|
||||
* @param string $error Error message.
|
||||
*/
|
||||
public function track_extensions_page_connection_error( string $error = '' ) {
|
||||
// phpcs:disable WordPress.Security.NonceVerification.Recommended
|
||||
@@ -89,7 +89,17 @@ class WC_Extensions_Tracking {
|
||||
* Send a Tracks even when a Helper connection process completed successfully.
|
||||
*/
|
||||
public function track_helper_connection_complete() {
|
||||
WC_Tracks::record_event( 'extensions_subscriptions_connected' );
|
||||
$properties = array();
|
||||
|
||||
if ( ! empty( $_GET['utm_source'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
||||
$properties['utm_source'] = wc_clean( wp_unslash( $_GET['utm_source'] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
||||
}
|
||||
|
||||
if ( ! empty( $_GET['utm_campaign'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
||||
$properties['utm_campaign'] = wc_clean( wp_unslash( $_GET['utm_campaign'] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
||||
}
|
||||
|
||||
WC_Tracks::record_event( 'extensions_subscriptions_connected', $properties );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user