function originalSourcePlugin(pluginConfig = {}) {
  return {
    name: 'original-source',
    EVENTS: events,
    config: {
      ...CONFIG,
      ...pluginConfig
    },
    // Run function on `analyticsInit` event
    bootstrap: ({ instance, config }) => {
      instance.dispatch({
        type: events.SET_ORIGINAL_SOURCE,
        originalSource: getOriginalSource(config),
        originalLandingPage: getOriginalLandingPage(config)
      })
    },
    reset: ({ instance }) => {
      instance.storage.removeItem(CONFIG.originalSourceKey)
      instance.storage.removeItem(CONFIG.originalLandingPageKey)
    }
  }
}
Track original source of visitors.
@param  {Object} [pluginConfig] - settings for referral source tracking
@param  {String} [pluginConfig.storage] - overide the location of storage. 'localStorage', 'cookie', or 'window'
@param  {String} [pluginConfig.originalSourceKey] - overide the storage key. Default '__user_original_source'
@param  {String} [pluginConfig.originalLandingPageKey] - overide the storage key. Default '__user_original_landing_page'
@return {Object} - plugin for `analytics` package