WC_Site_Tracking
in package
This class adds actions to track usage of WooCommerce.
Table of Contents
- add_enable_tracking_function() : mixed
- Adds a function to load tracking scripts and enable them client-side on the fly.
- add_tracking_function() : mixed
- Adds the tracking function to the admin footer.
- enqueue_scripts() : mixed
- Add scripts required to record events from javascript.
- init() : mixed
- Init tracking.
- is_tracking_enabled() : bool
- Check if tracking is enabled.
- register_scripts() : mixed
- Register scripts required to record events from javascript.
Methods
add_enable_tracking_function()
Adds a function to load tracking scripts and enable them client-side on the fly.
public
static add_enable_tracking_function() : mixed
Note that this function does not update woocommerce_allow_tracking
in the database
and will not persist enabled tracking across page loads.
Return values
mixed —add_tracking_function()
Adds the tracking function to the admin footer.
public
static add_tracking_function() : mixed
Return values
mixed —enqueue_scripts()
Add scripts required to record events from javascript.
public
static enqueue_scripts() : mixed
Return values
mixed —init()
Init tracking.
public
static init() : mixed
Return values
mixed —is_tracking_enabled()
Check if tracking is enabled.
public
static is_tracking_enabled() : bool
Return values
bool —register_scripts()
Register scripts required to record events from javascript.
public
static register_scripts() : mixed