ingenuity
function get_user_role() { global $current_user; $user_roles = $current_user->roles; $user_role = array_shift($user_roles); return $user_role; } add_action('wp_footer','add_user_tracking_code'); function add_user_tracking_code(){ if(is_user_logged_in()){ echo ""; } }