0.2.9 • Published 4 years ago

@dansmaculotte/vue-segment v0.2.9

Weekly downloads
1,234
License
MIT
Repository
github
Last release
4 years ago

vue-segment

npm version npm downloads Dependencies Standard JS

Vue.js plugin for Segment Analytics.js

Segment Analytics.js Documentation

Setup

  1. Add the @dansmaculotte/vue-segment dependency with yarn or npm to your project
  2. Configure it:
import Vue from 'vue'
import Segment from '@dansmaculotte/vue-segment'

Vue.use(Segment, {
  writeKey: 'YOUR_SEGMENT_WRITE_KEY',
  disabled: true,
  router,
  pageCategory: 'shop',
  settings: {
    ...
  }
})

Usage

See Segment Vue Quickstart Guide.

Options

writeKey

  • Type: String
    • Default: ''

disabled

Disable automatic script loading, if you need compliance with GDPR.

  • Type: Boolean
    • Default: false

router

Call analytics.page method on afterEach router method if provided.

  • Type: Object

pageCategory

In case you provided router, you can specify the category page of the page event. See segment page method reference.

  • Type: String,
    • Default: ''

settings

See Load options reference.

  • Type: Object

Development

  1. Clone this repository
  2. Install dependencies using yarn install or npm install
  3. Start development server using npm run dev

License

MIT License

0.2.9

4 years ago

0.2.8

4 years ago

0.2.7

5 years ago

0.2.6

5 years ago

0.2.5

5 years ago

0.2.4

5 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.0

5 years ago

0.0.1

5 years ago