Getting started

Quickstart

Get your first event into GetFluxly in a few minutes. Install the browser SDK for client-side autocapture, or send events straight from any backend over the HTTP API. Both paths land in the same project.

1. Get an API key

Create a project in the dashboard, then copy its key from Settings. There are two kinds, and they are not interchangeable:

TypePrefixUse it in
Publishablegflux_pub_Browser code and public sites
Servergflux_secret_Backend services, never in a client bundle

Each key is bound to one project. See Authentication for the full rules.

2. Install the browser SDK

npm install @getfluxly/browser
import { initGFlux } from "@getfluxly/browser";

const gflux = initGFlux({
  apiKey: "gflux_pub_live_xxx",
  apiHost: "https://api.getfluxly.com",
});

gflux?.page();

That single call starts autocapture: page views, clicks, form submits, rage clicks, and uncaught errors, all through the same transport. The Browser SDK reference covers every option.

3. Identify and track

Tie activity to a known user, then record what they do:

gflux.identify("user_42", {
  email: "jane@example.com",
  plan: "pro",
});

gflux.track("pricing_viewed", { ref: "nav" });

identify stitches earlier anonymous activity to the user. track records a custom event with any properties you pass. Neither call ever throws, so a typo or a network blip will not crash your app.

Prefer your backend? Send over HTTP

No SDK required. Anything that can make an HTTPS request can post events. Use a server key for backend code:

curl -X POST https://api.getfluxly.com/v1/events \
  -H "Authorization: Bearer gflux_secret_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "event": "subscription_started",
    "external_id": "user_42",
    "properties": { "plan": "team", "value": 49 }
  }'

Event names are snake_case, up to 64 characters. Each event needs at least one of anonymous_id, external_id, or user_id. Full contract: POST /v1/events.

4. Confirm it arrived

A successful ingest returns 202 Accepted:

{
  "accepted": 1,
  "rejected": 0,
  "request_id": "req_b3a8c2d1e"
}

The response confirms intake, not delivery: the analytics and identity workers process events a moment later. Open the dashboard to watch them land.

Next steps