Get started with web analytics

Install PostHog on your site

Web analytics runs on the $pageview events the PostHog SDK sends, so the only real setup step is getting PostHog onto your site. There are one-click options for Webflow, Framer, Shopify, WordPress, and GTM, and snippets for every major framework.

In a hurry? The AI wizard installs and configures PostHog for you in one command.

Install PostHog

Read your dashboard

Once events arrive, open Web analytics. The dashboard gives you visitors, pageviews, sessions, average session duration, and bounce rate, each compared to the previous period, plus your top paths, channels, referrers, UTMs, countries, and devices.

Click any row to filter the whole dashboard to it – then jump into the session replays behind that number.

Explore the dashboard

Add a conversion goal

Visitor counts only tell you half the story. A conversion goal is the action you want people to take – a signup, a demo booking, a subscribe – and adding one puts conversions and conversion rate right next to your traffic numbers.

For signups, capture an explicit user_signed_up event rather than relying on autocapture, so the goal survives your next UI change.

Set up a goal

Clean up your traffic

Two things make early numbers look messier than they are. Path cleaning collapses URLs with IDs in them, so /users/123 and /users/456 stop competing for space in your top pages list. And bot and traffic detection classifies crawlers, AI agents, and automation at query time, so you can measure them, exclude them, or break them out separately.

Path cleaning

Group dynamic URLs into one readable path

Bot traffic

Decide what to keep, per type of bot

Manage bot traffic

Tag your campaigns

PostHog derives each session's channel type at ingestion from its entry referrer, UTM tags, and ad click IDs. Tag your campaign links properly and paid, organic, social, and referral traffic separate themselves automatically. Skip it and that traffic quietly lands in Direct or Unknown.

Running paid ads? Marketing analytics (beta) pulls cost, clicks, and impressions from Google, Meta, LinkedIn, TikTok, Reddit, and Bing so you can see CPC and ROAS per campaign next to real conversions.

Connect ad platforms

Query traffic from your editor

You don't have to open the app to answer a traffic question. PostHog AI investigates spikes and drops and builds dashboards from a plain-language question inside the web app, and the MCP server gives your coding agent the same data in Cursor, Claude Code, or VS Code – handy for checking whether a deploy moved a page's traffic.

Set up MCP

Let Self-driving watch it for you

Nobody checks a dashboard every day. Your traffic is a signal source for Self-driving: a scout compares each channel, entry path, and referrer against its own seasonality-matched baseline and files a report when one steps out of line – an SEO drop, a paused ad account, broken UTM tagging – even when the site-wide total looks fine. The report goes to a human reviewer, not to a coding agent, because the fix usually lives in your site or campaign tooling rather than a repository.

SessionsSelf-driving reportHuman review

Web analytics and Self-driving

Community questions

Was this page useful?