diff --git a/googleanalytics.module b/googleanalytics.module index 370af49f8950cefc1066faa5ffe5b3026dc6da1b..a589a35ce1b8f8194edfd289799d7f8bfdac15b7 100644 --- a/googleanalytics.module +++ b/googleanalytics.module @@ -86,11 +86,9 @@ function googleanalytics_footer($main = 0) { // Add User profile segmentation values. $profile_fields = variable_get('googleanalytics_segmentation', array()); - if (!empty($profile_fields) && ($user->uid > 0)) { - // Invoke all modules having a hook_user_load() implemented. - // If the invoked modules extend the $user object, the additional - // data can be tracked. - module_invoke_all('load_profile', $user); + if (module_exists('profile') && !empty($profile_fields) && ($user->uid > 0)) { + // Extend the $user object with profile data. + profile_load_profile($user); $fields = array(); foreach ($profile_fields as $field => $title) {