WooCommerce Code Reference

WC_Tracks_Footer_Pixel
in package

WC_Tracks_Footer_Pixel class.

Table of Contents

$events  : array
Events to send to Tracks.
$instance  : WC_Tracks_Footer_Pixel
Singleton instance.
__construct()  : mixed
Constructor - attach hooks to the singleton instance.
add_event()  : mixed
Add a Tracks event to the queue.
instance()  : WC_Tracks_Footer_Pixel
Instantiate the singleton.
record_event()  : bool|WP_Error
Record a Tracks event
render_tracking_pixels()  : mixed
Add events as tracking pixels to page footer.
send_tracks_requests()  : mixed
Fire off API calls for events that weren't converted to pixels.

Properties

Methods

record_event()

Record a Tracks event

public static record_event(array $event) : bool|WP_Error
Parameters
$event : array

Array of event properties.

Return values
bool|WP_ErrorTrue on success, WP_Error on failure.