Метод | Описание | |
---|---|---|
build_pixel_url ( array $event ) : string | Build an event and return its tracking URL | |
build_timestamp ( ) | Milliseconds since 1970-01-01 | |
get_anon_id ( ) : string | Grabs the user's anon id from cookies, or generates and sets a new one | |
get_connected_user_tracks_identity ( ) : array | boolean | Gets the WordPress.com user's Tracks identity, if connected. | |
get_user_agent ( ) | ||
record_event ( mixed $event ) : mixed | record_event | |
record_pixel ( $pixel ) | Synchronously request the pixel |
Метод | Описание | |
---|---|---|
validate_and_sanitize ( array $event ) : mixed | Validate input for a tracks event. |
static public build_pixel_url ( array $event ) : string | ||
$event | array | Event keys and values |
Результат | string | URL of a tracking pixel |
static public build_timestamp ( ) |
static public get_anon_id ( ) : string | ||
Результат | string | An anon id for the user |
static public get_connected_user_tracks_identity ( ) : array | boolean | ||
Результат | array | boolean |
static public record_event ( mixed $event ) : mixed | ||
$event | mixed | Event object to send to Tracks. An array will be cast to object. Required. Properties are included directly in the pixel query string after light validation. |
Результат | mixed | True on success, WP_Error on failure |
static public record_pixel ( $pixel ) |