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
| Attribute | Required | Description |
|---|---|---|
data-id | Yes | Your project API key (e.g. vp_abc123) |
data-api-url | No | Custom API endpoint. Defaults to https://app.vibeping.dev |
data-debug | No | Set 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/sdkThen 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/sdkon 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,
});| Option | Type | Required | Default | Description |
|---|---|---|---|---|
id | string | Yes | — | Your project API key |
debug | boolean | No | false | Log events to console |
Verify Installation
Open your app in a browser, then check:
- Browser console — if
debug: true, you'll see[VibePing] Initialized with config: ... - Network tab — look for requests to
app.vibeping.dev/api/v1/event - Dashboard — pageview events should appear within seconds at app.vibeping.dev↗
Size
The SDK is under 5KB gzipped. It has zero dependencies.