1.5.5 • Published 4 months ago

@usermaven/vue v1.5.5

Weekly downloads
-
License
-
Repository
-
Last release
4 months ago

@usermaven/vue

Vue.js SDK for Usermaven Analytics

Installation

npm install @usermaven/vue
# or
yarn add @usermaven/vue

Usage

Setup the Plugin

import { createApp } from 'vue'
import { UsermavenPlugin } from '@usermaven/vue'
import App from './App.vue'

const app = createApp(App)

app.use(UsermavenPlugin, {
    key: 'your-api-key',
    trackingHost: 'https://events.usermaven.com',
    autocapture: true,
    // Additional options

})

app.mount('#app')

Using the Composables

useUsermaven

<script setup>
import { useUsermaven } from '@usermaven/vue'

const usermaven = useUsermaven()

// Track an event
usermaven.track('button_click', {
  buttonId: 'submit-button'
})

// Identify a user
usermaven.identify({
  id: 'user_123_456',
  email: 'user@example.com',
  name: 'John Doe',
  // ... more fields
})
</script>

usePageView

<script setup>
import { usePageView } from '@usermaven/vue'

// Automatically tracks page views when route changes
const { track } = usePageView()

// Manually track a page view if needed
// track('pageview')
</script>

License

MIT

1.5.3-rc.95

4 months ago

1.5.5

4 months ago

1.5.4

4 months ago

1.5.4-rc.96

4 months ago

1.5.3

6 months ago

1.5.2-rc.92

6 months ago

1.5.2

6 months ago

1.5.1-rc.91

6 months ago

1.5.1

6 months ago

1.5.0-rc.90

6 months ago

1.4.3-rc.89

6 months ago

1.4.3-rc.88

6 months ago

1.4.2-rc.87

6 months ago

1.4.1-rc.86

6 months ago

1.4.1-rc.84

6 months ago

1.4.1-rc.72

6 months ago

1.4.1-rc.71

6 months ago

1.4.1-rc.70

6 months ago

1.4.1-rc.69

6 months ago