# sellkit/2.3.6/includes/admin/components/analytics/class.php

SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster, version 2.3.6. 51 lines.

- Page: https://pluginprobe.com/plugins/sellkit/2.3.6/code/includes/admin/components/analytics/class.php
- Raw: https://pluginprobe.com/plugins/sellkit/2.3.6/raw/includes/admin/components/analytics/class.php
- Modified: 2025-10-06T16:06:30+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/sellkit/2.3.6/code/includes/admin/components/analytics/class.php#L10-L20`.

```php
<?php

namespace Sellkit\Admin\Components\Analytics;

use Sellkit\Admin\Components\Analytics;

defined( 'ABSPATH' ) || die();

/**
 * Components class.
 *
 * @since 1.1.0
 */
abstract class Analytics_Base {

	/**
	 * Output data.
	 *
	 * @var $output array Analytics data.
	 */
	public $output;

	/**
	 * Target id.
	 *
	 * @var $target_id int Target id.
	 */
	public $target_id;

	/**
	 * Getting chart data.
	 *
	 * @since 1.1.0
	 */
	public function get_data() {
		$chart_data = [];

		for ( $i = Analytics::$date_range; $i >= 0; $i-- ) {
			$time = strtotime( "-{$i} days" );
			$date = date( 'M_d', $time );

			$chart_data[] = [
				'date' => str_replace( '_', ' ', $date ),
				'value' => ! empty( $this->output[ $date ] ) ? floatval( $this->output[ $date ] ) : 0,
			];
		}

		return $chart_data;
	}
}

```
