WC_Extensions_Tracking::track_extensions_page()

Send a Tracks event when an Extensions page is viewed.


Description Description


Source Source

File: includes/tracks/events/class-wc-extensions-tracking.php

	public function track_extensions_page() {
		// phpcs:disable WordPress.Security.NonceVerification.Recommended
		$event      = 'extensions_view';
		$properties = array(
			'section' => empty( $_REQUEST['section'] ) ? '_featured' : wc_clean( wp_unslash( $_REQUEST['section'] ) ),
		);

		if ( ! empty( $_REQUEST['search'] ) ) {
			$event                     = 'extensions_view_search';
			$properties['search_term'] = wc_clean( wp_unslash( $_REQUEST['search'] ) );
		}
		// phpcs:enable

		WC_Tracks::record_event( $event, $properties );
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.