Skip to content
All Docs

Installation

Add VibePing via script tag or npm. Both methods take under a minute.

Installation

Two ways to install VibePing: a script tag (easiest) or npm (if you want TypeScript types and tree-shaking).

Script Tag (Recommended)

Drop this in your HTML <head> or before </body>:

<script
  src="https://cdn.jsdelivr.net/npm/@vibeping/sdk@latest/dist/vibeping.umd.js"
  data-id="vp_your_api_key"
></script>

That's the whole setup. The SDK auto-initializes using the data-id attribute and starts tracking immediately.

Script Tag Attributes

AttributeRequiredDescription
data-idYesYour project API key (e.g. vp_abc123)
data-api-urlNoCustom API endpoint. Defaults to https://app.vibeping.dev
data-debugNoSet to "true" to enable console logging

Example with all options

<script
  src="https://cdn.jsdelivr.net/npm/@vibeping/sdk@latest/dist/vibeping.umd.js"
  data-id="vp_abc123"
  data-debug="true"
></script>

npm / pnpm / yarn

npm install @vibeping/sdk

Then initialize in your app entry point:

import { init } from '@vibeping/sdk';
 
const vibeping = init({
  id: 'vp_your_api_key',
});

Note: If the npm package isn't published yet, use the CDN script tag method above. The npm package will be available at @vibeping/sdk on npmjs.com.

Config Options (npm)

import { init } from '@vibeping/sdk';
 
const vibeping = init({
  // Required: your API key from the dashboard
  id: 'vp_abc123',
 
  // Optional: enable debug logging
  debug: false,
});
OptionTypeRequiredDefaultDescription
idstringYesYour project API key
debugbooleanNofalseLog events to console

Verify Installation

Open your app in a browser, then check:

  1. Browser console — if debug: true, you'll see [VibePing] Initialized with config: ...
  2. Network tab — look for requests to app.vibeping.dev/api/v1/event
  3. Dashboard — pageview events should appear within seconds at app.vibeping.dev

Size

The SDK is under 5KB gzipped. It has zero dependencies.