npm install --save vue-tracker-teko
import Vue from "vue";
import VueTrackerTeko from "vue-tracker-teko";
Vue.use(VueTrackerTeko, {
// Configure your tracker server and site by providing
host: "https://dev-tracking.teko.vn",
urlServeJsFile: "https://dev-tracking.teko.vn/track/libs/tracker-v1.0.0.full.min.js",
appId: "chat-tool"
// Enables automatically registering pageviews on the router
router: router,
// Whether or not to log debug information
// Default: false
debug: false
});
// or
window.track();
{
path: '/page-2',
name: 'Page2',
component: Page2,
meta: {
pageCode: 'detailPage',
getSku: (route) => {
// do something to get sku
return sku
}
}
}
It is possible to ignore routes using the route meta:
{
path: '/page-2',
name: 'Page2',
component: Page2,
meta: {
analyticsIgnore: true
}
}