nuxt-segment-analytics

0.0.1 • Public • Published

nuxt-segment-analytics

David-DM Standard JS Circle CI Codecov npm version npm downloads

NuxtJS module for Stripe.js

📖 Release Notes

This module uses vue-segment-analytics to add Segment Analytics to a Nuxt.js app. You can make called with this.$analytics.track()

Setup

  • Add nuxt-segment-analytics dependency using yarn or npm to your project
  • Add nuxt-segment-analytics to modules section of nuxt.config.js

Usage

nuxt.config.js

{
  modules: [
    // Simple usage
    'nuxt-segment-analytics',
 
    // With options
    ['nuxt-segment-analytics', { id: "SEGMENT_KEY", useRouter: true }],
 ]
}

YourComponent.vue

export default {
  mounted () {
    this.$analytics.identify('f4ca124298', {
      name: 'Michael Bolton',
      email: 'mbolton@initech.com'
    })
    this.$analytics.track('Signed Up', { plan: 'Enterprise' })
    this.$analytics.page('Pricing');
  }
}

Development

  • Clone this repository
  • Install dependencies using yarn install or npm install
  • Start development server using npm run dev

License

MIT License

Copyright (c) Dylan Wight dylan@otechie.com

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.1
    12
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.1
    12

Package Sidebar

Install

npm i nuxt-segment-analytics

Weekly Downloads

6

Version

0.0.1

License

MIT

Unpacked Size

5.94 kB

Total Files

6

Last publish

Collaborators

  • dgwight