Client-side SDKs
Client-side SDKs run in the browser or mobile app and automatically capture user interactions, pageviews, and session data.JavaScript
Browser-based analytics with autocapture for web applications
React
React-specific integration with hooks and components
Mobile SDKs
Native SDKs for iOS, Android, React Native, and Flutter
Next.js
Full-stack Next.js integration with SSR support
Web Frameworks
- Vue.js - Vue 3 and Composition API support
- Angular - Angular integration with dependency injection
- Svelte - Lightweight Svelte integration
- Remix - Full-stack Remix framework support
No-code & CMS
- WordPress - Plugin for WordPress sites
- Webflow - No-code Webflow integration
- Shopify - E-commerce analytics for Shopify stores
- HTML Snippet - Simple script tag for any website
Server-side SDKs
Server-side SDKs are ideal for backend services, APIs, and server-rendered applications where you need to track events, evaluate feature flags, or identify users from your server.Python
Python SDK for Django, Flask, FastAPI, and more
Node.js
Node.js SDK for server-side JavaScript and TypeScript
Ruby
Ruby SDK with Rails integration
PHP
PHP SDK for Laravel and other frameworks
Additional Server SDKs
Mobile SDKs
For detailed mobile integration guides, see Mobile SDKs.
- iOS - Swift and Objective-C support
- Android - Kotlin and Java support
- React Native - Cross-platform React Native
- Flutter - Dart and Flutter integration
Integration Platforms
PostHog integrates with popular analytics and data platforms:- Segment - Send events via Segment CDP
- RudderStack - Customer data pipeline integration
- Google Tag Manager - Deploy via GTM
- Sentry - Error tracking integration
API
For complete control or custom integrations, use the PostHog API directly:Choosing the Right SDK
Client-side vs Server-side
Use client-side SDKs (JavaScript, React, Mobile) for user-facing applications where you want autocapture, session replay, and real-time user tracking.Use server-side SDKs (Python, Node, Ruby) for backend services, API endpoints, scheduled jobs, or when you need more control over what data is sent.
Framework-specific vs Generic
Choose framework-specific SDKs (React, Next.js, Django) when available for better integration with your framework’s patterns and conventions.Use generic SDKs (JavaScript, Python, Node) for vanilla applications or when a framework-specific option doesn’t exist.
Getting Help
If you need help choosing an SDK or have integration questions:- Check the SDK-specific documentation
- Visit the PostHog Community
- Review example implementations
Next Steps
JavaScript SDK
Get started with the JavaScript SDK
Python SDK
Install the Python SDK
React Integration
Add PostHog to your React app
Mobile SDKs
Integrate with iOS, Android, or Flutter