> AI agents: this is one page from PostHog's docs. Full index of Markdown docs for LLMs: https://posthog.com/llms.txt # Get started with web analytics Canonical URL: https://posthog.com/docs/web-analytics/start-here > **Cloud region:** This page uses US Cloud hosts. For an EU Cloud project, use `https://eu.posthog.com` instead of `https://app.posthog.com` (app host for links). ## On this page - [Install PostHog on your site](#install-posthog-on-your-site) - [Read your dashboard](#read-your-dashboard) - [Add a conversion goal](#add-a-conversion-goal) - [Clean up your traffic](#clean-up-your-traffic) - [Tag your campaigns](#tag-your-campaigns) - [Query traffic from your editor](#query-traffic-from-your-editor) - [Let Self-driving watch it for you](#let-self-driving-watch-it-for-you) ## 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](https://posthog.com/docs/web-analytics/installation/ai-wizard.md) installs and configures PostHog for you in one command. [Install PostHog](https://posthog.com/docs/web-analytics/installation.md) ## Read your dashboard Once events arrive, open [Web analytics](https://app.posthog.com/web). The [dashboard](https://posthog.com/docs/web-analytics/dashboard.md) gives you visitors, pageviews, [sessions](https://posthog.com/docs/data/sessions.md), 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](https://posthog.com/docs/session-replay.md) behind that number. [Explore the dashboard](https://posthog.com/docs/web-analytics/dashboard.md) ## Add a conversion goal Visitor counts only tell you half the story. A [conversion goal](https://posthog.com/docs/web-analytics/conversion-goals.md) 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](https://posthog.com/docs/web-analytics/conversion-goals.md) ## Clean up your traffic Two things make early numbers look messier than they are. [Path cleaning](https://posthog.com/docs/web-analytics/path-cleaning.md) 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](https://posthog.com/docs/web-analytics/bot-detection.md) 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](https://posthog.com/docs/web-analytics/managing-bot-traffic.md) ## Tag your campaigns PostHog derives each session's [channel type](https://posthog.com/docs/data/channel-type.md) at ingestion from its entry referrer, [UTM tags](https://posthog.com/docs/data/utm-segmentation.md), 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](https://posthog.com/docs/web-analytics/marketing-analytics.md) (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](https://posthog.com/docs/web-analytics/marketing-analytics.md) ## Query traffic from your editor You don't have to open the app to answer a traffic question. [PostHog AI](https://posthog.com/docs/web-analytics/investigate-traffic-ai.md) investigates spikes and drops and builds dashboards from a plain-language question inside the web app, and the [MCP server](https://posthog.com/docs/web-analytics/surfaces/mcp.md) 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](https://posthog.com/docs/web-analytics/surfaces/mcp.md) ## Let Self-driving watch it for you Nobody checks a dashboard every day. Your traffic is a signal source for [Self-driving](https://posthog.com/docs/self-driving.md): 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. Sessions→Self-driving report→Human review [Web analytics and Self-driving](https://posthog.com/docs/web-analytics/surfaces/web-app.md#self-driving-reports) 1/7 [**Install PostHog on your site** ***Where the data starts***](#quest-item-install-posthog-on-your-site)[**Read your dashboard** ***Visitors, pages, and sources***](#quest-item-read-your-dashboard)[**Add a conversion goal** ***Traffic that actually matters***](#quest-item-add-a-conversion-goal)[**Clean up your traffic** ***Paths and bots***](#quest-item-clean-up-your-traffic)[**Tag your campaigns** ***So channels are right***](#quest-item-tag-your-campaigns)[**Query traffic from your editor** ***MCP and PostHog AI***](#quest-item-query-traffic-from-your-editor)[**Let Self-driving watch it for you** ***Traffic feeds the inbox***](#quest-item-let-self-driving-watch-it-for-you) **Install PostHog on your site** ***Where the data starts***