Make sure you have all options switched on in Google Analytics -> Backend Settings -> Additional Stats & Charts and that Editor is selected in Google Analytics -> Backend Settings -> General Settings. Don’t forget to update the options!
Hi @deconf I figured out the conflict. I have a function that adds classes to the body while in the admin. When I remove this function, the “Visits by Country”, Traffic Overview, Top Pages, Top Referrers, and Top Searches are all visible as expected. I see no errors in the DevTools console so I don’t have any more information on this. Is something that can be patched? I depend on these body classes to hide elements for certain post types and roles so I need them. I’m willing to test anything if you have any ideas. Thanks again!
// Add role class to body
function add_role_to_body($classes) {
global $current_user;
$user_role = array_shift($current_user->roles);
$classes .= 'role-'. $user_role;
return $classes;
}
//add_filter('body_class','add_role_to_body');
add_filter('admin_body_class', 'add_role_to_body');
Using array_shift on $current_user->roles, which is a global variable, is a huge issue (with possible security implications), because will result in shifting things inside the $current_user variable!
Have a look at PHP documentation: http://php.net/manual/en/function.array-shift.php.
Try this, and please remove that immediately from your blog!
// Add role class to body
function add_role_to_body($classes) {
global $current_user;
$user_role = $current_user->roles[0];
$classes .= 'role-'. $user_role;
return $classes;
}
//add_filter('body_class','add_role_to_body');
add_filter('admin_body_class', 'add_role_to_body');
Thanks @deconf that worked perfectly! Fantastic support!
Nice to hear that! Leaving a a review here would be great.