Install

Install the package. Let the CLI retrieve the pixel ID.

API keys stay in terminal, server, or agent workflows. Browser code receives only the public pixel ID.

View API docs

Terminal setup

Run this yourself or ask your coding agent to run it.

npm install @splitlaunch/ab
npx splitlaunch init

Paste your SplitLaunch API key: sl_live_...
Pixel ID: px_7H4K92

1. Install package

npm install @splitlaunch/ab

2. Run setup

npx splitlaunch init

3. Paste API key

Paste your SplitLaunch API key:

Track custom conversions

Your app or agent fires events for the actions that matter.

window.splitlaunch("track", "Lead", {
  value: 100
});

Manual pixel snippet

Use this when the CLI cannot safely edit framework files.

<script>
  window.splitlaunch = window.splitlaunch || function(){(window.splitlaunch.q=window.splitlaunch.q||[]).push(arguments)};
</script>
<script async src="https://splitlaunch.dev/pixel/px_your_pixel_id.js"></script>

API key never goes in browser code

Pixel ID is public and safe to embed

Agent docs are hosted at /api/skills

Conversion events use window.splitlaunch