Skip to main content
Use the Vue SDK when your app is built with Vue 3. It provides a plugin and composables (useKeverdVisitorData) so you can collect device/event data in components.

When to use this SDK

  • Vue 3 apps.
  • You want composables for login/checkout/registration flows.
  • You need get() or verifyLogin from Vue components.

Quick start

// vue

import { Keverd } from '@keverdjs/vue';

Keverd.init('YOUR_PUBLIC_API_KEY');

const result = await Keverd.get();

console.log(result.event_id, result.visitor_id);

1. Install

// bash

npm install @keverdjs/vue
# or: yarn add @keverdjs/vue

2. Register plugin

//javascript

import { createApp } from 'vue';
import KeverdVue from '@keverdjs/vue';
import App from './App.vue';

const app = createApp(App);
app.use(KeverdVue, { apiKey: 'YOUR_PUBLIC_API_KEY', endpoint: 'https://api.keverd.com' });
app.mount('#app');

3. Use composable in components

// vue

<script setup>
import { useKeverdVisitorData } from '@keverdjs/vue';
const { get } = useKeverdVisitorData();
</script>
Call get() on login/checkout; send result to backend. See Integration Guide for verifyLogin and signal details.