v1.2.0

Janus Client SDK

A lightweight JavaScript library for tracking events from web applications. Automatically handles batching, retries, rate limiting, and persistence.

Lightweight (~3KB)Auto RetryBatchingPersistence

Quick Start

1. Get Your API Key#

1. Register an account at addjanus.ca/register 2. Verify your email — this is required before you can generate API keys 3. Go to Settings > API Keys and click "Generate New Key" 4. Enter a name (e.g., "Production Website") and leave the scope on **Ingest** 5. Optionally add allowed origins 6. Copy the key immediately — it is shown only once and cannot be retrieved later Keys start with `jns_` (e.g., `jns_a1b2c3d4e5f6...`). An **Ingest** key can only send events. It cannot read your data or create keys, so it is safe in browser code where anyone can view it. Use **Full access** only for the MCP server or server-side calls, and keep those keys out of anything a browser downloads.

2. Include the SDK#

Add the script to your HTML. The SDK is hosted on our CDN:
html
<script src="https://addjanus.ca/janus.js"></script>

3. Initialize with your API Key#

Initialize the SDK with your API key. The endpoint is configured automatically.
javascript
Janus.init('jns_your_api_key_here');

4. Start Tracking Events#

Page views are tracked automatically on initialization and during SPA navigation. Track custom events and identify users:
javascript
// Track a custom event
Janus.track('button_click', {
buttonId: 'signup-cta',
page: 'homepage'
});
// Identify a user
Janus.identify('user_123', {
email: 'user@example.com',
plan: 'pro'
});

Need Help?

If you have questions or run into issues, check out our troubleshooting guide or reach out to our support team.

Troubleshooting Guide