Getting Started ​
attribution-kit tracks where every visitor to your app came from — Google Ads, Instagram, an organic search, a referral link, or a direct visit — and keeps a full history of those touches that you can send along with your API requests.
It ships in three layers so you can use exactly as much as you need:
- Core — framework-agnostic TypeScript. Runs anywhere.
- Vue — a reactive
useTrackingcomposable plus a plugin. - Nuxt — a zero-config module that auto-imports the composable and wires everything up.
Installation ​
bash
npm install attribution-kitvue and nuxt are optional peer dependencies — install only what your project already uses.
Quick start ​
ts
import { useTracking } from 'attribution-kit/vue'
const { tracking, getPayload } = useTracking({ ttlDays: 30 })ts
// nuxt.config.ts
export default defineNuxtConfig({
modules: ['attribution-kit/nuxt'],
attribution: { ttlDays: 30 },
})ts
import { createTracker } from 'attribution-kit'
const tracker = createTracker({ ttlDays: 30 })
tracker.init()