WooCommerce Code Reference

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