code: function(options) {
          if (globalServer) {
              logDebug('error', 'Error: Opbeat has already been configured');
              return Opbeat;
          }
  
          if (!options) return Opbeat;
  
          // Merge in options
          each(options, function(key, value){
              globalOptions[key] = value;
          });
  
          // "Script error." is hard coded into browsers for errors that it can't read.
          // this is the result of a script being pulled in from an external domain and CORS.
          globalOptions.ignoreErrors.push('Script error.');
          globalOptions.ignoreErrors.push('Script error');
  
          // Other variants of external script errors:
          globalOptions.ignoreErrors.push('Javascript error: Script error on line 0');
          globalOptions.ignoreErrors.push('Javascript error: Script error. on line 0');
  
          // join regexp rules into one big rule
          globalOptions.ignoreErrors = joinRegExp(globalOptions.ignoreErrors);
          globalOptions.ignoreUrls = globalOptions.ignoreUrls.length ? joinRegExp(globalOptions.ignoreUrls) : false;
          globalOptions.whitelistUrls = globalOptions.whitelistUrls.length ? joinRegExp(globalOptions.whitelistUrls) : false;
          globalOptions.includePaths = joinRegExp(globalOptions.includePaths);
  
  
          // Assemble the API endpoint
          globalServer = globalOptions.api_host +
                         '/api/v1/organizations/' + 
                         globalOptions.orgId + '/apps/' + 
                         globalOptions.appId + '/errors.gif';
  
          if (globalOptions.fetchContext) {
              TraceKit.remoteFetching = true;
          }
  
          if (globalOptions.linesOfContext) {
              TraceKit.linesOfContext = globalOptions.linesOfContext;
          }
  
          TraceKit.collectWindowErrors = !!globalOptions.collectWindowErrors;
  
          // return for chaining
          return Opbeat;
      }
docs: /*
  Configure Opbeat with Opbeat.com credentials and other options
  
  @param {object} options Optional set of of global options
  @return {Opbeat}