diff --git a/src/index.js b/src/index.js index 67ee54d..8e3aa5c 100644 --- a/src/index.js +++ b/src/index.js @@ -1,24 +1,37 @@ import bootstrap from './bootstrap' import lib from './lib' import { update } from './config' -import { onAnalyticsReady } from './helpers' +import * as helpers from './helpers' import ga from 'directives/ga' -import * as exception from 'lib/exception' -import analyticsMiddleware from './vuex-middleware' +import { autotracking as expectionAutotracking } from 'lib/exception' +import vuexMiddleware from './vuex-middleware' export default function install (Vue, options = {}) { update({ ...options, $vue: Vue }) Vue.directive('ga', ga) - Vue.prototype.$ga = Vue.$ga = lib - exception.autotracking(Vue) - + expectionAutotracking(Vue) bootstrap() } -export { - onAnalyticsReady, - analyticsMiddleware -} +// Vuex middleware +export const analyticsMiddleware = vuexMiddleware + +// Helpers +export const onAnalyticsReady = helpers.onAnalyticsReady + +// Event library +export const event = lib.event +export const ecommerce = lib.ecommerce +export const set = lib.set +export const page = lib.page +export const query = lib.query +export const screenview = lib.screenview +export const time = lib.time +export const require = lib.require +export const exception = lib.exception +export const social = lib.social + +