Web analytics installation
Contents
AI wizard
Install PostHog in minutes with our wizard by running this command in your project directory:
Wait for it to finish and test the setup once the wizard is complete.
Frameworks and languages
The wizard supports the following frameworks and languages:
Android (Kotlin)
Angular
Astro
Django
FastAPI
Flask
Laravel
Next.js
Nuxt
Python
React Native
React
Ruby
Ruby on Rails
React Router
SvelteKit
Swift (iOS/macOS)
TanStack StartVue
ElixirComing soon
FlutterComing soon
GoComing soon
JavaComing soon
RustComing soon
We've got more on the way.
Check out the wizard's GitHub repo for more details.
We recommend setting up a reverse proxy, so that events are less likely to be intercepted by tracking blockers. We have our own managed reverse proxy service, which is free for all PostHog Cloud users, routes through our infrastructure, and makes setting up your proxy easy. If you don't want to use our managed service then there are several other options for creating a reverse proxy, including using Cloudflare, AWS Cloudfront, and Vercel.Set up a reverse proxy (recommended)
If you have multiple customer-facing products (e.g. a marketing website + mobile app + web app), it's best to install PostHog on them all and group them in one project. This makes it possible to track users across their entire journey (e.g. from visiting your marketing website to signing up for your product), or how they use your product across multiple platforms.Grouping products in one project (recommended)
For certain features like heatmaps, your Web Application Firewall (WAF) may be blocking PostHog’s requests to your site. Add these IP addresses to your WAF allowlist or rules to let PostHog access your site. EU: US: These are public, stable IPs used by PostHog services (e.g., Celery tasks for snapshots).Add IPs to Firewall/WAF allowlists (recommended)
3.75.65.221, 18.197.246.42, 3.120.223.25344.205.89.55, 52.4.194.122, 44.208.188.173
Platforms
Angular
Android
Astro
Bubble
Docusaurus
Framer
Flutter
Google Tag Manager
HTML snippetiOS
Nuxt
Next.js
Remix
Phoenix
React Native
Svelte
TanStack StartVue
JavaScript
WordPress
Webflow
Shopify
React
After installing PostHog and ensuring autocapture is enabled, head to your web analytics dashboard to see your data. And then check out our getting started guide.
PostHog tip: Web analytics works with anonymous events. This means if you are primarily using PostHog for web analytics, it can be significantly cheaper for you.