芝麻web文件管理V1.00
编辑当前文件:/home/ezdajrnh/public_html/wp-content/plugins/google-listings-and-ads/src/Tracking/Tracks.php
tracks = $tracks; } /** * Record an event in Tracks - this is the preferred way to record events from PHP. * * @param string $event_name The name of the event. * @param array $properties Custom properties to send with the event. */ public function record_event( $event_name, $properties = [] ) { // Include base properties. $base_properties = [ "{$this->get_slug()}_version" => $this->get_version(), ]; // Include connected accounts (if connected). if ( $this->options->get_ads_id() ) { $base_properties[ "{$this->get_slug()}_ads_id" ] = $this->options->get_ads_id(); } if ( $this->options->get_merchant_id() ) { $base_properties[ "{$this->get_slug()}_mc_id" ] = $this->options->get_merchant_id(); } $properties = array_merge( $base_properties, $properties ); $full_event_name = "{$this->get_slug()}_{$event_name}"; $this->tracks->record_event( $full_event_name, $properties ); } }