diff --git a/classes/integrations/google-analytics/class-wc-google-analytics.php b/classes/integrations/google-analytics/class-wc-google-analytics.php index 123fb76ac72..157a62a89ac 100644 --- a/classes/integrations/google-analytics/class-wc-google-analytics.php +++ b/classes/integrations/google-analytics/class-wc-google-analytics.php @@ -62,137 +62,137 @@ class WC_Google_Analytics extends WC_Integration { ) ); - /** - * Google Analytics standard tracking - **/ - function google_tracking_code() { - global $woocommerce; - - if ( is_admin() || current_user_can('manage_options') || get_option('woocommerce_ga_standard_tracking_enabled') == "no" ) return; - - $tracking_id = get_option('woocommerce_ga_id'); - - if ( ! $tracking_id ) return; - - $loggedin = ( is_user_logged_in() ) ? 'yes' : 'no'; - if ( is_user_logged_in() ) { - $user_id = get_current_user_id(); - $current_user = get_user_by('id', $user_id); - $username = $current_user->user_login; - } else { - $user_id = ''; - $username = __('Guest', 'woocommerce'); - } - ?> - - user_login; - } else { - $user_id = ''; - $username = __('Guest', 'woocommerce'); - } - ?> - - user_login; + } else { + $user_id = ''; + $username = __('Guest', 'woocommerce'); + } + ?> + + user_login; + } else { + $user_id = ''; + $username = __('Guest', 'woocommerce'); + } + ?> + +