Get RetainPixel running in 5 minutes.
Follow these steps to install RetainPixel, send your first event, and verify it arrives in your dashboard.
Create your account at /login. You will receive a magic link via email.
After signing in, the onboarding flow walks you through creating your organization and first app. This generates your API key automatically.
Your live API key is shown once during onboarding. Copy it immediately -- you will not be able to see it again. You can always rotate keys from the API Keys settings page.
Install the browser SDK via npm:
npm install @retainpixel/sdk-browserimport { RetainPixel } from '@retainpixel/sdk-browser';
const rp = RetainPixel.init({
writeKey: 'rpx_live_YOUR_KEY_HERE',
});Call identify after your user logs in to link events to their profile:
rp.identify('user-123', {
email: 'user@example.com',
plan: 'pro',
});Track custom events whenever users perform meaningful actions:
rp.track('feature_used', {
feature: 'export',
format: 'csv',
});Open your browser console on any page where the SDK is loaded and paste:
rp.track('test_event', { source: 'quickstart_verify' });Then visit your dashboard Events page to see the event arrive. It should appear within a few seconds.
If you are not using a bundler, you can load the SDK via a script tag:
<script src="https://cdn.retainpixel.com/v1/rp.min.js" data-write-key="rpx_live_YOUR_KEY_HERE"></script>The SDK will initialize automatically and expose window.rp for tracking calls.