summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack/vendor/automattic/jetpack-compat/lib/tracks/client.php')
-rw-r--r--plugins/jetpack/vendor/automattic/jetpack-compat/lib/tracks/client.php41
1 files changed, 41 insertions, 0 deletions
diff --git a/plugins/jetpack/vendor/automattic/jetpack-compat/lib/tracks/client.php b/plugins/jetpack/vendor/automattic/jetpack-compat/lib/tracks/client.php
new file mode 100644
index 00000000..41056897
--- /dev/null
+++ b/plugins/jetpack/vendor/automattic/jetpack-compat/lib/tracks/client.php
@@ -0,0 +1,41 @@
+<?php
+/**
+ * Deprecated Tracks client.
+ *
+ * @package automattic/jetpack-compat
+ */
+
+/**
+ * Get tracks identity for an user.
+ *
+ * @deprecated 7.5.0 use Automattic\Jetpack\Tracking->tracks_get_identity instead
+ *
+ * @param int $user_id User id.
+ *
+ * @return mixed tracks identity.
+ */
+function jetpack_tracks_get_identity( $user_id ) {
+ _deprecated_function( __METHOD__, 'jetpack-7.5', 'Automattic\Jetpack\Tracking->tracks_get_identity' );
+
+ $tracking = new Automattic\Jetpack\Tracking( 'jetpack', Jetpack::connection() );
+ return $tracking->tracks_get_identity( $user_id );
+}
+
+/**
+ * Record Jetpack Tracks Event
+ *
+ * @deprecated 7.5.0 use Automattic\Jetpack\Tracking->tracks_record_event instead
+ *
+ * @param object $user User acting.
+ * @param string $event_name Event name.
+ * @param array $properties Properties.
+ * @param string|bool $event_timestamp_millis Timestamp.
+ *
+ * @return bool
+ */
+function jetpack_tracks_record_event( $user, $event_name, $properties = array(), $event_timestamp_millis = false ) {
+ _deprecated_function( __METHOD__, 'jetpack-7.5', 'Automattic\Jetpack\Tracking->tracks_record_event' );
+
+ $tracking = new Automattic\Jetpack\Tracking( 'jetpack', Jetpack::connection() );
+ return $tracking->tracks_record_event( $user, $event_name, $properties, $event_timestamp_millis );
+}