@skyanalytics/nuxt
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

SkyAnalytics Nuxt

SkyAnalytics Nuxt is an adapter for SkyAnalytics that allows you to track your website's traffic and user behavior.

npm version

Installation

npm install @skyanalytics/nuxt
// `nuxt.config.ts`
export default defineNuxtConfig({
  modules: ['@skyanalytics/nuxt'],
  skyanalytics: {
    key: 'source_key',
    host: 'http://localhost:3000',
  },
});

Module options

  • key - The source key of your SkyAnalytics instance.
  • host - The host of your SkyAnalytics instance.
  • captureNavigation - Capture navigation events automatically. Default: true.
  • enabled - Enable or disable tracking. Default: true.

Usage

Directives

<button v-sk-analytics="{ event: 'click', data: { key: 'value' } }">Click me</button>

Composable

const analytics = useAnalytics()

function send() {
  analytics.event('event_name', { key: 'value' })
}

Readme

Keywords

none

Package Sidebar

Install

npm i @skyanalytics/nuxt

Weekly Downloads

0

Version

1.0.5

License

MIT

Unpacked Size

7.16 kB

Total Files

17

Last publish

Collaborators

  • carum98