Skip to content

SDKs

Client and server libraries for sending events and managing identity - Web, Android, Flutter, Node, Go, Ruby, and the raw HTTP API.

Client and server libraries for sending events and managing identity from your apps. Every integration shares one mental model (initialize once, track events, identify users, reset on sign-out) whether you use a browser/app SDK, a server-side SDK (Node, Go or Ruby), or call the API directly. The one exception is reset: a server SDK has no ambient user or session to reset, so you name the user’s distinct ID on each call instead.

init(projectId, options)once at app startup
track(name, props)throughout the app
identify(id, traits)after sign-in
reset()on sign-out (client SDKs)

Choose your platform

Platform Use it when Package
Web Browser apps: React, Vue, Next.js, or plain JavaScript @pug-sh/browser
Android Native Android apps, in Kotlin or Java sh.pug:android
Flutter Cross-platform mobile & desktop apps pug_flutter
Node A Node.js backend that sends events and reads analytics @pug-sh/node
Go A Go backend that sends events and reads analytics github.com/pug-sh/sdk-go
Ruby A Ruby or Rails backend that sends events and reads analytics pug-sh
HTTP API Any other backend or language (anything that can POST JSON) -

Each SDK page follows the same outline: install, initialize, track events, identify users, auto-tracking, consent, and upgrade notes. Every page is also published as markdown for agents - append /index.md to its URL, as in /sdks/flutter/index.md.

Native iOS and React Native SDKs are on the roadmap - for now, use Flutter for cross-platform mobile, or the HTTP API from any runtime.

Client vs server keys. The Web, Android and Flutter SDKs run in untrusted environments and authenticate with your public key (pub_...) - write-scoped (events + identify) and safe to ship in client code. The Node, Go and Ruby SDKs run on your server and use your private key (prv_...), which additionally unlocks analytics reads (profiles, activity, insights); never embed it in client code. See Authentication.

Further reading

Navigation

Type to search...

↑↓ navigate↵ selectEsc close