summaryrefslogtreecommitdiff
blob: abfe4f627aa7b8efe64ce0073e7347d51b217e84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
/**
 * Legacy and deprecated Jetpack Tracking class.
 *
 * @package automattic/jetpack-compat
 */

use Automattic\Jetpack\Tracking;

/**
 * Legacy class JetpackTracking
 *
 * @deprecated See Automattic\Jetpack\Tracking
 */
class JetpackTracking {

	/**
	 * Enqueue tracks scripts.
	 *
	 * @deprecated See Automattic\Jetpack\Tracking
	 */
	public static function enqueue_tracks_scripts() {
		_deprecated_function( __METHOD__, 'jetpack-7.5', 'Automattic\Jetpack\Tracking' );

		$tracking = new Tracking();
		return $tracking->enqueue_tracks_scripts();
	}

	/**
	 * Record user event.
	 *
	 * @deprecated See Automattic\Jetpack\Tracking
	 *
	 * @param mixed $event_type Event type.
	 * @param array $data Event data.
	 * @param mixed $user User who did the event.
	 *
	 * @return bool
	 */
	public static function record_user_event( $event_type, $data = array(), $user = null ) {
		_deprecated_function( __METHOD__, 'jetpack-7.5', 'Automattic\Jetpack\Tracking' );

		$tracking = new Tracking();
		return $tracking->record_user_event( $event_type, $data, $user );
	}

}