PHP 클래스 Jetpack_Tracks_Client, jetpack

파일 보기 프로젝트 열기: automattic/jetpack 1 사용 예제들

공개 메소드들

메소드 설명
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.

메소드 상세

build_pixel_url() 정적인 공개 메소드

Build an event and return its tracking URL
사용 중단: Call the `build_pixel_url` method on a Jetpack_Tracks_Event object instead.
static public build_pixel_url ( array $event ) : string
$event array Event keys and values
리턴 string URL of a tracking pixel

build_timestamp() 정적인 공개 메소드

Milliseconds since 1970-01-01
static public build_timestamp ( )

get_anon_id() 정적인 공개 메소드

Grabs the user's anon id from cookies, or generates and sets a new one
static public get_anon_id ( ) : string
리턴 string An anon id for the user

get_connected_user_tracks_identity() 정적인 공개 메소드

Gets the WordPress.com user's Tracks identity, if connected.

get_user_agent() 정적인 공개 메소드

static public get_user_agent ( )

record_event() 정적인 공개 메소드

record_event
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

record_pixel() 정적인 공개 메소드

Synchronously request the pixel
static public record_pixel ( $pixel )