code: function(name, datasetId) {
              name = name || '$stateChangeSuccess';
              datasetId = datasetId || 'default';
              $rootScope.$on(name, function (event, args) {
                  visible.setActive(args.name, datasetId);
              });
          }
docs: allow the user to opt-in to listening for the ui-router $stateChangeSuccess event or any other event they want to specify (in case they're not using ui-router)