|
@@ -1,6 +1,7 @@
|
|
|
export default function (c, i) {
|
|
|
const { app, $auth, store } = c;
|
|
|
window._hmt = window._hmt || [];
|
|
|
+
|
|
|
window._hmt.push(['_setAutoPageview', false]);
|
|
|
window._hmt.push(['_setCustomVar', 1, 'MODE', process.env.MODE, 1]);
|
|
|
app.router.afterEach((to, from) => {
|
|
@@ -27,4 +28,11 @@ export default function (c, i) {
|
|
|
{},
|
|
|
);
|
|
|
setUserId();
|
|
|
+ i('tongji', {
|
|
|
+ // 上报pv
|
|
|
+ trackPageview: (path) => window._hmt.push(['_trackPageview', path]),
|
|
|
+ // 上报事件
|
|
|
+ trackEvent: (category, action, optLabel, optValue) =>
|
|
|
+ window._hmt.push(['_trackEvent', category, action, optLabel, optValue]),
|
|
|
+ });
|
|
|
}
|