# Add Pug to your stack

Add Pug product analytics to Next.js, React, Vue, Node.js, Go, Rails, Flutter, Android, or iOS, with the setup steps for each SDK. Open source and self-hostable.

Source: https://pug.sh/integrations

Pug ships seven SDKs: Web, Android, iOS, Flutter, Node, Go, and Ruby. The browser frameworks all use the same framework-agnostic Web SDK. Pick yours for the exact setup.

- [Pug for Next.js](https://pug.sh/integrations/nextjs): Add product analytics to a Next.js app with the framework-agnostic Web SDK, mounted from one client component.
- [Pug for React](https://pug.sh/integrations/react): Drop the Web SDK into any React app: call init() once at startup and autocapture records page views, clicks, scrolls, and forms.
- [Pug for Vue](https://pug.sh/integrations/vue): Initialise the Web SDK in main.ts and get autocapture across your Vue app, with no plugin to register.
- [Pug for Node.js](https://pug.sh/integrations/nodejs): Send authoritative server-side events from your backend with the Node SDK, and read profiles back.
- [Pug for Go](https://pug.sh/integrations/go): Send server-side events from Go services with typed properties, and read profiles and insights back.
- [Pug for Rails](https://pug.sh/integrations/rails): Send server-side events from Rails or plain Ruby, safe under Puma and Sidekiq, and read profiles back.
- [Pug for Flutter](https://pug.sh/integrations/flutter): Ship product analytics in your Flutter app with the Dart SDK: auto-tracking and typed events.
- [Pug for Android](https://pug.sh/integrations/android): Native Kotlin SDK for Android apps, callable from Java: automatic lifecycle, screen, and install events, plus typed well-known events.
- [Pug for iOS](https://pug.sh/integrations/ios): Native Swift SDK for iOS and iPadOS apps: automatic lifecycle, screen, and install events, plus typed well-known events.

## Seven SDKs cover every surface

A framework page tells you where to put the call. This tells you which SDK is making it: most products end up with two, a browser one and a server one, writing to the same profiles.

### Web SDK `@pug-sh/browser`

Anything that runs in a browser: Next.js, React, Vue, Svelte, or plain JavaScript. One init() call turns on six autocapture trackers, and a public key is safe to ship in client code.

### Android SDK `sh.pug:android`

Native Android apps in Kotlin or Java. App opens, activity screen views, and installs are tracked from Pug.init; Pug.screen names composables and fragments, and typed methods cover the well-known events.

### iOS SDK `github.com/pug-sh/sdk-ios`

Native iOS and iPadOS apps in Swift. App opens, view controller screen views, and installs are tracked from Pug.initialize; .pugScreen names SwiftUI screens, and typed methods cover the well-known events.

### Flutter SDK `pug_flutter`

Cross-platform apps on iOS, Android, web, and desktop. Lifecycle tracking starts at init(); a route observer adds screen views, and typed methods cover the well-known events.

### Node SDK `@pug-sh/node`

Events that must be true regardless of the browser: payments, webhooks, background jobs. Names the user explicitly, and the same private key reads profiles and insights back.

### Go SDK `github.com/pug-sh/sdk-go`

The same server-side role for Go services. Track and Identify never fail or wait on the network, background goroutines send the batches, and one client is safe for concurrent use. Properties are typed fields, and well-known events can be checked at compile time.

### Ruby SDK `pug-sh`

The same server-side role for Rails and plain Ruby. Tracking never raises or waits on the network, background threads send the batches, and one client serves every thread and is safe to create before Puma or Unicorn fork their workers.

- [See all SDKs](https://pug.sh/sdks)
- [Read the SDK reference](https://docs.pug.sh/sdks/)
- [Browse use cases](https://pug.sh/use-cases/saas)
