New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

nuxt-segment-analytics

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nuxt-segment-analytics

NuxtJS module for Segment Analytics.js

latest
Source
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

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

FAQs

Package last updated on 17 Nov 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts