Browse the docs
Overview
Start here
Websites
CMS
Forms and integrations
Analytics
Experiments
Proactive improvements
SEO and AI search
Team and account
Migrating
For agents and developers
Troubleshooting

DocsForms and integrations

PostHog and Google Analytics

Connect the analytics tools you already use so your agent can answer questions from them too.

You probably have years of history in Google Analytics, or product events in PostHog. You do not have to give either up. Connect them and your agent can answer from all three sources in one chat, and tell you where they disagree.

See it in action

Ask your agent this.

Using our Google Analytics data, which landing pages brought the most visitors last month? Then answer the same question from Sherpa's own analytics and tell me where the two disagree.

It answers with something like this.

The order is the same in both.

Landing pageGoogle AnalyticsSherpa
/pricing212,400228,100
/templates141,900150,300
Homepage96,200119,400

Sherpa counts a little higher, mostly on the homepage. That is common when some visitors block Google Analytics.

Using our Google Analytics data, which landing pages brought the most visitors last month? Then answer the same question from Sherpa's own analytics and tell me where the two disagree.

  1. Read the analytics tablesget_analytics_schema
  2. Queried your analyticsquery_analytics
  3. Queried your analyticsquery_analytics

The order is the same in both.

Landing pageGoogle AnalyticsSherpa
/pricing212,400228,100
/templates141,900150,300
Homepage96,200119,400

Sherpa counts a little higher, mostly on the homepage. That is common when some visitors block Google Analytics.

What happens

  1. In Sherpa, open Connections and connect PostHog or Google Analytics.
  2. Ask your agent a question and name the source you want it to use.
  3. Your agent runs the query and explains the answer in plain words.

What to check

  • The numbers are close to what you see in the tool itself for the same dates.

Three sources, one chat

SourceBest for
SherpaEverything on the website. Clicks, scrolling, bookings, experiments and AI agents. See Read your analytics
PostHogWhat people do in your product after they sign up
Google AnalyticsHistory from before you moved to Sherpa, and numbers that match your ad platforms

When a tool is connected, your agent can query it the same way it queries Sherpa. If you do not name a source, it uses Sherpa.

Good to know

Numbers will differ a little

Each tool counts visitors and sessions its own way and filters bots differently. Compare trends and rankings, not exact totals.

Use their events as goals

A funnel step can be an event from PostHog or Google Analytics, such as a signup. That lets an experiment on your website be judged by what happened in your product.

Common questions

Do I have to give up Google Analytics or PostHog to use Sherpa?

No. Connect either one under Connections and your agent can answer from it in the same chat as Sherpa's own analytics.

Which source should I ask about?

Sherpa for everything on the website, PostHog for what people do in your product after they sign up, and Google Analytics for history from before you moved.

Can a PostHog event be the goal of an experiment?

Yes. A PostHog or Google Analytics event can be a step in a funnel, and a funnel can be the goal of an A/B test. See Funnels.

Example prompts

Each one works as written in Claude or ChatGPT once Sherpa is connected. Swap in your own pages and dates.

The request from the example

Using our Google Analytics data, which landing pages brought the most visitors last month? Then answer the same question from Sherpa's own analytics and tell me where the two disagree.

Naming the source tells your agent which data to use. Asking both shows you how far to trust either number.

The pricing to signup count

From PostHog, how many visitors who landed on /pricing last month went on to sign up?

It joins the website to the product, which is the number most teams care about and rarely have.

The long view

Using Google Analytics, chart organic search visitors by month for the last year.

Google Analytics holds the history from before your website moved, so name it for anything older.

For agents

Sherpa MCP tools for this job, in the order they are usually called. get_analytics_schema, query_analytics. Work inside a change, and only call submit_change when the person asks to publish. A person presses Publish. Every tool is described in the MCP reference.

Next

See your own site on Sherpa.

  1. TodayPick a timePick a time
  2. Before the callWe copy your site over, freeWe copy it, free
  3. On the callYou take it for a spinTry it live
You'll talk to Ethan, Sherpa's founder.

Loading times…

Open the booking page in a new tab ↗