// sdks

Official libraries for the languages you ship in

Every Alitycs library sends the same event payload, batches in the background, and retries with backoff. Pick the one that matches your runtime — the code samples in the docs follow along.

6 official librariesSDK v1.0.3 · API v1Plus the REST API for everything else

Pick a library

Each one wraps the same HTTP API. Install it, pass a key, and call track — the rest is batching, retries, and session handling you do not have to write.

v1.0.0

JavaScript

Browser tracking with optional autocapture

Installbun add @alitycs/browser
JavaScript quickstart
v1.0.0

Node.js

Universal server-side TypeScript tracking

Installbun add @alitycs/core
Node.js quickstart
v1.0.0

JVM

Kotlin and Java server-side tracking

Installimplementation("com.alitycs:alitycs-sdk-jvm:1.0.0")
JVM quickstart
v1.0.0

Python

Server-side Python tracking with batching, sessions, and retries

Installpip install alitycs
Python quickstart
v1.0.0

Go

Concurrency-safe server-side tracking

Installgo get github.com/alitycs/alitycs-sdk-go
Go quickstart
v1.0.0

PHP

Server-side tracking for PHP 8.1+ applications

Installcomposer require alitycs/alitycs-sdk-php
PHP quickstart
v1

REST API

Any language, over HTTPS

Install# Nothing to install — use any HTTPS client.
REST API reference

Which library do I need

The short answer: one browser library for anything a user touches, one server library per backend language, and the REST API when neither fits.

Alitycs libraries compared by runtime, typical use, autocapture support, and the kind of API key each one takes.
LibraryRuntimeTypical useAutocaptureKey typeDocs
JavaScriptBrowsers and webviewsClient-side product analytics: page views, clicks, form submitsYespk_live_…Publishable — ingest onlyJavaScript quickstart
Node.jsServer-side JavaScript and TypeScriptEvents from an API, a worker, or a background jobNosk_live_…Secret — read it from the environmentNode.js quickstart
JVMJVM — Kotlin and JavaBackend services and batch jobs on the JVMNosk_live_…Secret — read it from the environmentJVM quickstart
PythonPythonBackends, scheduled jobs, and data pipelinesNosk_live_…Secret — read it from the environmentPython quickstart
GoGoHigh-throughput services; the client is safe across goroutinesNosk_live_…Secret — read it from the environmentGo quickstart
PHPPHP 8.1 and newerServer-rendered applications and web endpointsNosk_live_…Secret — read it from the environmentPHP quickstart
REST APIAnything that speaks HTTPSLanguages without an official library, curl, CI jobsNopk_live_… / sk_live_…Publishable to ingest, secret to readREST API reference

Autocapture is browser-only. In the browser it records page views, clicks, and form submits as soon as you initialize; server libraries only send what you track explicitly. Never ship a secret key to a client — keys and authentication covers where each one belongs and how to rotate it.

// install and initialize

Two steps, then you are tracking

Install the package, initialize once near the top of your app, and call track wherever something happens. This is the JavaScript library; every other library takes the same shape with its own package manager.

  • Publishable key. Browser code uses a pk_live_… key, which can only write events.
  • One initialization. Call it once per process or page load; the client is a singleton after that.
  • Batched delivery. Events queue in memory, flush on an interval, and retry with backoff if a request fails.
Full quickstart, language by language
JavaScriptv1.0.0
Install
bun add @alitycs/browser
Initialize
import { init } from "@alitycs/browser";

const analytics = init({
  apiKey: "pk_live_4Kd9xTz2",
  autoCapture: true,
});

Versions and support

What we commit to when a library changes, so you can plan an upgrade rather than discover one.

Semantic versioning

Every library follows semver. A patch release fixes behavior, a minor release adds surface without changing what already works, and a major release is the only kind that may change or remove an existing call.

What a major bump means

A major version can change a method signature, drop a configuration option, or raise the minimum runtime version. Each one ships with a migration note listing every break and the call that replaces it.

How long the previous major lasts

The previous major stays supported for twelve months after its successor ships — security and correctness fixes, no new features. After that it keeps talking to API v1, but stops receiving releases.

Where changes are published

Releases are tagged in each package registry — npm, Maven Central, PyPI, Packagist, and Go modules — with the changelog in the library's repository. The wire format is versioned separately as API v1.

Send your first event in five minutes

Create a workspace and the publishable key is ready with it. Install a library, track one event, and watch it land.

No credit card required. SDK v1.0.3 · API v1.