code: function initStackdriverErrorReporter() {
    if (typeof window.StackdriverErrorReporter === 'function') {
      window.addEventListener('DOMContentLoaded', () => {
        const errorHandler = new window.StackdriverErrorReporter()
        errorHandler.start({
          key: firebase.apiKey,
          projectId: firebase.projectId,
          service: 'react-firebase-redux-site',
          version
        })
      })
    }
    return errorHandler
  }
docs: Initialize Stackdriver Error Reporter only if api key exists