We don't use segment anymore for our website, I don't have an account on Segment to make this plugin evolve.
Please fill in an issue if you want to be a maintainer or if you want redirect people to you fork.
Vue.js plugin for Segment Analytics.js
Segment Analytics.js Documentation
@dansmaculotte/vue-segment
dependency with yarn
or npm
to your projectimport Vue from 'vue'
import Segment from '@dansmaculotte/vue-segment'
Vue.use(Segment, {
writeKey: 'YOUR_SEGMENT_WRITE_KEY',
disabled: true,
router,
pageCategory: 'shop',
settings: {
...
}
})
See Segment Vue Quickstart Guide.
String
''
Disable automatic script loading, if you need compliance with GDPR.
Boolean
false
Call analytics.page
method on afterEach
router method if provided.
Object
In case you provided router, you can specify the category page of the page
event. See segment page method reference.
String
,
''
See Load options reference.
Object
yarn install
or npm install
npm run dev