|
1 | 1 | import bootstrap from './bootstrap' |
2 | 2 | import lib from './lib' |
3 | 3 | import { update } from './config' |
4 | | -import { onAnalyticsReady } from './helpers' |
| 4 | +import * as helpers from './helpers' |
5 | 5 | import ga from 'directives/ga' |
6 | | -import * as exception from 'lib/exception' |
7 | | -import analyticsMiddleware from './vuex-middleware' |
| 6 | +import { autotracking as expectionAutotracking } from 'lib/exception' |
| 7 | +import vuexMiddleware from './vuex-middleware' |
8 | 8 |
|
9 | 9 | export default function install (Vue, options = {}) { |
10 | 10 | update({ ...options, $vue: Vue }) |
11 | 11 |
|
12 | 12 | Vue.directive('ga', ga) |
13 | | - |
14 | 13 | Vue.prototype.$ga = Vue.$ga = lib |
15 | 14 |
|
16 | | - exception.autotracking(Vue) |
17 | | - |
| 15 | + expectionAutotracking(Vue) |
18 | 16 | bootstrap() |
19 | 17 | } |
20 | 18 |
|
21 | | -export { |
22 | | - onAnalyticsReady, |
23 | | - analyticsMiddleware |
24 | | -} |
| 19 | +// Vuex middleware |
| 20 | +export const analyticsMiddleware = vuexMiddleware |
| 21 | + |
| 22 | +// Helpers |
| 23 | +export const onAnalyticsReady = helpers.onAnalyticsReady |
| 24 | + |
| 25 | +// Event library |
| 26 | +export const event = lib.event |
| 27 | +export const ecommerce = lib.ecommerce |
| 28 | +export const set = lib.set |
| 29 | +export const page = lib.page |
| 30 | +export const query = lib.query |
| 31 | +export const screenview = lib.screenview |
| 32 | +export const time = lib.time |
| 33 | +export const require = lib.require |
| 34 | +export const exception = lib.exception |
| 35 | +export const social = lib.social |
| 36 | + |
| 37 | + |
0 commit comments