---
title: "Set Up PostHog Analytics | InboundSavvy"
url: "https://inboundsavvy.com/articles/set-up-posthog-analytics"
description: "Connect free PostHog analytics to your InboundSavvy site, keep your own visits out of the numbers, and build the one graph that shows whether real people are finding a new site."
---

PostHog shows what visitors do on your site: which pages they land on, where they click, and where they leave. It is free for up to a million events and 5,000 session recordings a month, with no credit card, and InboundSavvy has it built in, so there is no code to paste.

This guide connects it, keeps your own visits out of the numbers, and builds the one graph worth watching while a site is new.

## Before you start

Create a free account at [posthog.com](https://posthog.com). When you sign up it asks whether to store your data in the US or the EU. Note which you picked: you match it in step 2, and nothing arrives if the two differ.

## Step 1 - Copy your project key

1\. Log in to PostHog and open your project.  
2\. Go to Settings, then Project.  
3\. Copy the project API key. It starts with `phc_`.

![PostHog Settings screen with the Project section selected in the sidebar](/_astro/posthog-settings-token-inboundsavvy.DTIqRQik_Z2hioy1.png)![The Project API Token field in PostHog, showing a token that starts with phc\_](/_astro/posthog-project-token-inboundsavvy.CNSzwE2S_1CtjWL.png)

This one is a public write key. It is designed to sit in your website's HTML where anyone can read it, so copying it around is safe. The key in the MCP section further down is the opposite, and it is not safe to share.

## Step 2 - Paste it into InboundSavvy

1\. Open your website in the InboundSavvy Console and click Settings in the sidebar.  
2\. Open Global Settings and scroll to Third-party integrations.  
3\. Paste the key into PostHog Project API Key. The Paste button beside the field does it for you.  
4\. Set PostHog Data Region to the region you chose at signup.

![InboundSavvy Global Site Settings, with the PostHog token and data region filled in](/_astro/posthog-token-setup-inboundsavvy.YFSGJOdF_2wy9Ug.png)

There is no Save button. Changes save on their own within a minute, or as soon as you leave the page.

## Step 3 - Publish

Saving stores the setting. Visitors get it on the next build: on your site's Overview, under Changes and publish, click Build preview, then Publish live. Until the live build finishes, PostHog is set up and records nothing.

## Step 4 - Confirm it is working

1\. Open your live site and click Accept all on the cookie banner.  
2\. Click through a few pages.  
3\. In PostHog, open Activity. Your visit appears within a minute or so.

PostHog starts only after a visitor allows analytics cookies. Anyone who clicks Essential only is never recorded, and that includes you.

## Not seeing any data?

\- Check the key starts with `phc_` and has no stray spaces.  
\- Check the data region matches the one you chose at signup. This is the common one.  
\- Check you clicked Publish live after saving.  
\- Check you clicked Accept all on your own banner. Everybody misses this once.  
\- Check Cookie consent is switched on in Global Settings. PostHog waits for the banner, so with the banner off it never starts.

## Step 5 - Leave yourself out

On a new site you are often the busiest visitor. Every page you check counts as a visitor unless PostHog knows it is you. There are two parts: mark your own browser, then tell PostHog to leave marked visits out.

### Mark your own browser

1\. Open your live site in the browser you normally use and click Accept all.  
2\. Open the browser console: press F12, or Ctrl+Shift+J on Windows, or Cmd+Option+J on a Mac, and click the Console tab.  
3\. Paste this line and press Enter:

posthog.setPersonProperties({ internal\_user: true })

Chrome may ask you to type `allow pasting` first. Type it, press Enter, then paste the line again.

The mark lives in that browser's cookies. Repeat it on each computer and browser you use, and again if you clear your cookies. Visits from before the mark still count, so mark first and browse after. A phone has no console: on your phone, click Essential only on your own banner instead, and PostHog never records it.

### Tell PostHog to leave them out

1\. In PostHog, go to Settings, then Project, and find Filter out internal and test users.  
2\. Add a filter: pick the person property `internal_user` and the operator is not set.  
3\. Turn on Enable this filter on all new insights.  
4\. Save.

The filter describes who to keep: everyone without the mark. `internal_user` shows up in the property list once PostHog has seen one marked visit, so mark your browser first. Web analytics has its own switch for the same filter at the top of the page, Filter test accounts. Turn that on too.

## Step 6 - Build your first graph

While a site is new the question is simple: are real people arriving, and where from? One graph answers it.

1\. In PostHog, open Product analytics, click New insight, and choose Trends.  
2\. For the series, pick Pageview and change Total count to Unique users.  
3\. Set the date range to Last 90 days and the interval to Week.  
4\. Under Breakdown, pick the session property Entry referring domain.  
5\. Check that Filter out internal and test users is on.  
6\. Click Save, name it Real visitors per week, and add it to a dashboard.

### Read it each week

Each point is the number of different people who visited that week, with you left out. The breakdown shows where each visit started: `$direct` means they typed the address or used a bookmark, `www.google.com` means they searched. While Google is still indexing a new site, expect a few visitors a week, most of them direct.

The line to watch is search. When [www.google.com](http://www.google.com) shows up week after week, people are finding you on their own. If it has not appeared after a month or two, start with [how to get Google to index a new site](/articles/get-google-to-index-a-new-site/).

## Good to know

\- **It tracks automatically.** Page views and clicks are captured without you tagging anything by hand.  
\- **It respects consent.** PostHog sits behind the cookie banner, so visitors who decline analytics are not tracked.  
\- **It is the free tier of a category that usually is not.** Session replay, funnels, and heatmaps are what teams pay FullStory for. PostHog gives a small business the same instruments at a price a small business can reach.

## Ask questions in plain English

PostHog runs a hosted MCP server, so the AI assistant you already use can query your analytics directly. You ask "which pages did people leave from last week" and it answers. There is nothing to install: the server is PostHog's, and you point your assistant at it.

This needs a different key from the one above. The project key is a public write key. A personal API key can **read your data**, so it belongs on your own machine and never in your website.

### Get a personal API key

1\. In PostHog, click your avatar and open Settings.  
2\. Find Personal API keys and click Create personal API key.  
3\. Name it something you will recognize in six months, for example "Claude MCP".  
4\. Give it read scopes only, on the one project you want to query. You are handing an assistant a key to your data: make the key open as few doors as possible.  
5\. Copy it. PostHog shows it once and never again.

### Point your assistant at the server

Add this to your assistant's MCP configuration. For Claude Code that is `~/.claude.json`; other assistants use the same shape:

{  
"mcpServers": {  
"posthog": {  
"type": "http",  
"url": "[https://mcp.posthog.com/mcp](https://mcp.posthog.com/mcp)",  
"headers": { "Authorization": "Bearer YOUR\_PERSONAL\_API\_KEY" }  
}  
}  
}

Restart the assistant so it picks up the new server, then ask it something real: "what were my top ten pages last week". Numbers back means you are connected.

One caveat: the assistant can only see what PostHog has already recorded. If you added the key this morning, do not ask it about last quarter. The filter from step 5 applies here too, so ask it to filter out internal and test users.

> By Andre de Castro Zorzo

Join the Community

## Next in the series

All

[How to fix a website that breaks on a phone Your desktop rankings are computed from the phone rendering. Google indexes with Googlebot Smartphone, so what a phone cannot reach is not indexable. 2026-08-18By Jesper Jurcenoks](/articles/fix-a-website-that-breaks-on-mobile/)[Google picked a different version of your page: fixing duplicate URLs and canonicals Your page is indexed. Google just indexed a different URL of it than the one you promote and track. Pick one form, redirect the rest, make the signals agree. 2026-08-18By Jesper Jurcenoks](/articles/fix-duplicate-content-and-canonical-urls/)[How to find and remove a noindex tag or robots.txt block that keeps your site out of Google Your site is not missing from Google. It is being refused, on your own instruction. Three mechanisms can issue it, and two leave nothing in your HTML. 2026-08-18By Jesper Jurcenoks](/articles/fix-noindex-and-robots-blocking-google/)[Only your homepage is indexed: how to get Google to find the rest of your site Google indexes what it can reach. If only your homepage is indexed, your pages are not being outranked: they are not being found. Internal links come first. 2026-08-18By Jesper Jurcenoks](/articles/fix-orphan-pages-sitemaps-internal-links/)[How to get backlinks for a small business Of the nine reasons your site is missing from Google, links are the one you control least. Fix the other eight first, then claim the links you are owed. 2026-08-18By Jesper Jurcenoks](/articles/get-backlinks-for-a-small-business/)[How to get Google to index a new website If your site went live in the last few weeks, the likely explanation is the boring one: Google has not got to you yet. What shortens the wait, and what does not. 2026-08-18By Jesper Jurcenoks](/articles/get-google-to-index-a-new-site/)[How to make your website faster and pass Core Web Vitals Compressing your images will not fix this. Three numbers decide whether Google calls your site fast, and two are set by your architecture, not your assets. 2026-08-18By Jesper Jurcenoks](/articles/make-your-website-faster-core-web-vitals/)[My page is indexed but gets no traffic: how to make it answer the question Your page is not missing from Google. It is present and unwanted. Search Console tells you which problem you have: not being shown, or shown and not chosen. 2026-08-18By Jesper Jurcenoks](/articles/write-pages-that-answer-search-intent/)[How to show up in local Google search when you serve a town Your website is not your entry on the map. The map pack is fed by a Google Business Profile, a separate record you must claim and verify to compete on it. 2026-08-18By Jesper Jurcenoks](/articles/show-up-in-local-google-search/)[How to Get Your Small Business Found on Google in 2026 Getting found on Google changed with AI Overviews and AI Mode. Here's what actually moves the needle for a small business in 2026 - in plain English, no jargon. 2026-07-01By Santiago Valencia Leon](/articles/get-found-on-google-small-business/)[Why Isn't My Website Showing Up on Google? (9 Reasons + Fixes) Nine reasons a small-business site does not appear in Google, each with the exact check that identifies it and the actual repair. Including what Search Console and Lighthouse each tell you, and why they disagree. 2026-06-28By Jesper Jurcenoks](/articles/why-isnt-my-website-on-google/)[The Small-Business Website SEO Checklist for 2026 SEO for a small business comes down to a handful of things done well. Here's a practical 2026 checklist, grouped by what each item actually does for you. 2026-06-25By Santiago Valencia Leon](/articles/small-business-seo-checklist/)[Let Claude Edit Your Website: Connecting InboundSavvy to Claude Code A non-technical guide to setting up InboundSavvy's MCP integration with Claude Code - one prompt, a few clicks, and AI starts building your website. 2026-05-25By Andre de Castro Zorzo](/articles/connect-inboundsavvy-to-claude-code/)

No entries found.

## Other articles

All

[How to fix a website that breaks on a phone Your desktop rankings are computed from the phone rendering. Google indexes with Googlebot Smartphone, so what a phone cannot reach is not indexable. 2026-08-18By Jesper Jurcenoks](/articles/fix-a-website-that-breaks-on-mobile/)[Google picked a different version of your page: fixing duplicate URLs and canonicals Your page is indexed. Google just indexed a different URL of it than the one you promote and track. Pick one form, redirect the rest, make the signals agree. 2026-08-18By Jesper Jurcenoks](/articles/fix-duplicate-content-and-canonical-urls/)[How to find and remove a noindex tag or robots.txt block that keeps your site out of Google Your site is not missing from Google. It is being refused, on your own instruction. Three mechanisms can issue it, and two leave nothing in your HTML. 2026-08-18By Jesper Jurcenoks](/articles/fix-noindex-and-robots-blocking-google/)[Only your homepage is indexed: how to get Google to find the rest of your site Google indexes what it can reach. If only your homepage is indexed, your pages are not being outranked: they are not being found. Internal links come first. 2026-08-18By Jesper Jurcenoks](/articles/fix-orphan-pages-sitemaps-internal-links/)[How to get backlinks for a small business Of the nine reasons your site is missing from Google, links are the one you control least. Fix the other eight first, then claim the links you are owed. 2026-08-18By Jesper Jurcenoks](/articles/get-backlinks-for-a-small-business/)[How to get Google to index a new website If your site went live in the last few weeks, the likely explanation is the boring one: Google has not got to you yet. What shortens the wait, and what does not. 2026-08-18By Jesper Jurcenoks](/articles/get-google-to-index-a-new-site/)[How to make your website faster and pass Core Web Vitals Compressing your images will not fix this. Three numbers decide whether Google calls your site fast, and two are set by your architecture, not your assets. 2026-08-18By Jesper Jurcenoks](/articles/make-your-website-faster-core-web-vitals/)[My page is indexed but gets no traffic: how to make it answer the question Your page is not missing from Google. It is present and unwanted. Search Console tells you which problem you have: not being shown, or shown and not chosen. 2026-08-18By Jesper Jurcenoks](/articles/write-pages-that-answer-search-intent/)[How to show up in local Google search when you serve a town Your website is not your entry on the map. The map pack is fed by a Google Business Profile, a separate record you must claim and verify to compete on it. 2026-08-18By Jesper Jurcenoks](/articles/show-up-in-local-google-search/)[How to Get Your Small Business Found on Google in 2026 Getting found on Google changed with AI Overviews and AI Mode. Here's what actually moves the needle for a small business in 2026 - in plain English, no jargon. 2026-07-01By Santiago Valencia Leon](/articles/get-found-on-google-small-business/)[Why Isn't My Website Showing Up on Google? (9 Reasons + Fixes) Nine reasons a small-business site does not appear in Google, each with the exact check that identifies it and the actual repair. Including what Search Console and Lighthouse each tell you, and why they disagree. 2026-06-28By Jesper Jurcenoks](/articles/why-isnt-my-website-on-google/)[The Small-Business Website SEO Checklist for 2026 SEO for a small business comes down to a handful of things done well. Here's a practical 2026 checklist, grouped by what each item actually does for you. 2026-06-25By Santiago Valencia Leon](/articles/small-business-seo-checklist/)[Let Claude Edit Your Website: Connecting InboundSavvy to Claude Code A non-technical guide to setting up InboundSavvy's MCP integration with Claude Code - one prompt, a few clicks, and AI starts building your website. 2026-05-25By Andre de Castro Zorzo](/articles/connect-inboundsavvy-to-claude-code/)

No entries found.
