Skip to content

tuanvm-teko/vue-tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VueTrackerTeko

npm vue2

Installation

npm install --save vue-tracker-teko

Usage

Bundler (Webpack, Rollup)

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();

Add more meta data for site

{
  path: '/page-2',
  name: 'Page2',
  component: Page2,
  meta: {
    pageCode: 'detailPage',
    getSku: (route) => {
      // do something to get sku
      return sku
    }
  }
}

Ignoring routes

It is possible to ignore routes using the route meta:

{
  path: '/page-2',
  name: 'Page2',
  component: Page2,
  meta: {
    analyticsIgnore: true
  }
}

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published