Hi Lisa --
The code (and specifically line 3) is looking for a CSS class on the <body> tag that's in the format "context-course_###" where ### is the actual course code. If you view the page source and look at the body tag on the pages where this code does work, you'll see something like:
<body class="with-left-side course-menu-expanded with-right-side padless-content pages home primary-nav-transitions context-course_5 lato-font-not-loaded-yet">
but when I browse to the Analytics page, here's what the body tag looks like:
<body class="full-width primary-nav-transitions lato-font-not-loaded-yet">
Since that tag doesn't contain anything that looks like "context-course_###", the function isn't going to do anything on the Analytics page. I haven't inspected the user detail page, but the same thing could be happening there, or the markup for the breadcrumbs could be different there which could have the same effect.
--Colin
This discussion post is outdated and has been archived. Please use the Community question forums and official documentation for the most current and accurate information.