← Back to insights
Guide · #733

How to Connect PostHog With Google Search Console

Connect PostHog to Google Search Console in minutes. Import GSC query data, track search performance, and build custom dashboards. Step-by-step guide for founders.

Filed
May 10, 2026
Read
18 min
Author
The Seoable Team

Why Connect PostHog With Google Search Console?

You've shipped your product. Traffic exists. But you're flying blind on one critical metric: what are people actually searching for when they find you?

Google Search Console tells you the story. It shows queries, impressions, click-through rates, and average position for every search that lands on your site. PostHog tells you what those visitors do once they arrive. Connecting them is the missing link between search visibility and user behavior.

When you pull GSC data into PostHog, you stop guessing. You see which search queries drive conversions. You identify high-impression, low-CTR keywords worth optimizing. You catch indexing issues before they tank your organic visibility. You track search performance alongside product events in one unified dashboard.

For founders and indie hackers without agency budgets, this integration is a force multiplier. You get the visibility of expensive SEO tools without the $200/month subscription.

Prerequisites: What You Need Before Starting

Before you connect PostHog to Google Search Console, make sure you have:

Google Search Console access. You need to own or have admin access to the GSC property you want to monitor. If you haven't set up Google Search Console yet, follow the 10-minute setup guide to get your domain verified and ready to go. You'll need to verify your domain and submit your sitemap if you haven't already.

A PostHog account. You need an active PostHog workspace with admin or owner permissions. PostHog offers a free tier that works fine for this integration. If you're new to PostHog, create a free account at PostHog.

A Google Cloud project. This is where the integration lives. You'll create a service account and generate credentials that PostHog uses to read your GSC data. This requires a Google Cloud account (free tier works). You don't need to enable billing, though Google gives you $300 in free credits if you do.

API access enabled. You'll enable the Google Search Console API in your Google Cloud project. This is a one-click process.

Basic familiarity with your GSC property URL. You'll need the exact URL of your GSC property (e.g., https://example.com or sc-domain:example.com for domain properties). You can find this in your GSC account under Settings > Owners.

If you're already tracking GA4 in PostHog, this process is similar. If you've connected GA4 with Google Search Console before, you already understand how these tools talk to each other.

Step 1: Create a Google Cloud Project

The integration happens through Google Cloud. PostHog needs credentials to read your GSC data, and those credentials live in a Google Cloud project.

Go to the Google Cloud Console. Open Google Cloud Console in your browser. You'll see a dashboard with your existing projects (if any).

Create a new project. In the top-left corner, click the project dropdown. Select "Create a new project." Name it something clear like "PostHog SEO Integration" or "GSC Analytics." Leave the organization field blank unless you're using Google Workspace. Click "Create."

Google takes 30 seconds to spin up your project. You'll see a notification when it's ready.

Select your new project. Once created, click the project dropdown again and select your new project. The console now shows your empty project dashboard.

Enable the Google Search Console API. Click the search bar at the top and search for "Google Search Console API." Click the result. On the API page, click the blue "Enable" button. PostHog needs this API to read your search data.

Wait 10-15 seconds for the API to enable. You'll see a confirmation message.

Step 2: Create a Service Account and Generate Credentials

A service account is a special Google account that PostHog uses to access your GSC data. It's not your personal account—it's a machine account with limited permissions.

Navigate to Service Accounts. In the Google Cloud Console, go to the menu (three horizontal lines, top-left) and select "APIs & Services" > "Credentials." You're now in the credentials section.

Create a new service account. Click "Create Credentials" at the top. A dropdown appears. Select "Service Account." Google shows you a form.

Fill in the service account details. Give it a name like "PostHog GSC Reader." Add a description: "Service account for PostHog to read Google Search Console data." Click "Create and Continue."

Grant permissions. Google asks you to select a role. Search for "Viewer" in the role dropdown. Select "Viewer." This gives the service account read-only access to your GSC data. You don't want to give it edit permissions. Click "Continue."

Skip the optional step. The next screen offers optional settings. Skip it. Click "Done."

Your service account is created. You're back at the Credentials page.

Create a JSON key. You need to generate a credential file that PostHog will use. Click on your newly created service account. You'll see its details page. Click the "Keys" tab. Click "Add Key" > "Create new key." Select "JSON." Click "Create."

Google automatically downloads a JSON file to your computer. This file contains the credentials PostHog needs. Keep this file safe. Anyone with this file can read your GSC data. Don't commit it to GitHub. Don't email it. Store it securely.

Open the JSON file in a text editor. You'll see something like:

{
  "type": "service_account",
  "project_id": "your-project-id",
  "private_key_id": "...",
  "private_key": "...",
  "client_email": "[email protected]",
  "client_id": "...",
  "auth_uri": "https://accounts.google.com/o/oauth2/auth",
  "token_uri": "https://oauth2.googleapis.com/token"
}

Keep this file open. You'll paste its contents into PostHog in the next step.

Step 3: Grant Your Service Account Access to Google Search Console

Your service account exists, but it doesn't have permission to read your GSC data yet. You need to invite it to your GSC property.

Get your service account email. From the JSON file, copy the client_email value. It looks like [email protected].

Go to Google Search Console. Open Google Search Console and select the property you want to connect to PostHog.

Add the service account as a user. Click "Settings" in the left menu. Select "Users and permissions." Click "Add user." Paste your service account email address. For the role, select "Viewer." Click "Invite."

Google sends an invitation to your service account (which it won't actually receive, but that's fine—service accounts don't need to accept invitations). The account is now granted access.

Verify access. Go back to your Google Cloud project. The service account now has permission to read your GSC data. You're ready to connect PostHog.

Step 4: Connect PostHog to Google Search Console

Now you'll tell PostHog about your Google Cloud credentials and which GSC property to monitor.

Log into PostHog. Go to PostHog and sign in to your workspace.

Navigate to Data Warehouse. In the left menu, click "Data Warehouse." PostHog's data warehouse feature lets you import external data sources.

Add a new source. Click "New source" or "Add source." PostHog shows you a list of available integrations. Look for "Google Search Console" in the list. If you don't see it immediately, search for it using the search bar.

Select Google Search Console. Click on the Google Search Console integration. PostHog opens a configuration form.

Paste your credentials. PostHog asks for your Google Cloud service account credentials. Open the JSON file you downloaded earlier. Copy the entire contents. Paste it into the "Credentials" field in PostHog. PostHog will parse the JSON automatically.

Enter your GSC property URL. PostHog asks for the URL of your GSC property. This is the exact property you added the service account to. If you're monitoring https://example.com, enter that. If you're monitoring a domain property (which covers all subdomains), enter sc-domain:example.com. You can find the exact property URL in GSC under Settings > Owners.

Choose your sync frequency. PostHog asks how often you want to sync data from GSC. For most founders, daily syncs are fine. You'll get fresh data every morning. If you need real-time data, select hourly, but know that this counts against your PostHog data limits. Daily is the sweet spot for most use cases.

Name your source. Give it a clear name like "GSC - My Site" or "Search Console Data." This helps you identify it later when you're building queries.

Test the connection. PostHog offers a "Test" button. Click it. PostHog will attempt to connect to your GSC property using the credentials you provided. If it works, you'll see a success message. If it fails, double-check that:

  • The JSON credentials are complete and not truncated
  • The service account email is invited to your GSC property
  • The GSC property URL is exact (including sc-domain: if it's a domain property)
  • The Google Search Console API is enabled in your Google Cloud project

Save the integration. Once the test passes, click "Save" or "Connect." PostHog creates the source and schedules your first sync. You'll see a confirmation message.

Your first sync will run within a few minutes. PostHog pulls the last 16 months of GSC data by default. Depending on how much search data you have, this can take a few minutes to a few hours.

Step 5: Query Your GSC Data in PostHog

Once the sync completes, your GSC data lives in PostHog's data warehouse. Now you can query it, filter it, and visualize it.

Check sync status. Go to Data Warehouse > Sources. Click your GSC source. You'll see a sync history. Once the first sync shows "Completed," your data is ready.

Create a new query. Click "SQL" in the left menu. PostHog opens a SQL editor. You can write custom queries against your GSC data. The table name is typically google_search_console_data or similar (PostHog will show you the exact name in the source details).

Write a simple query. Here's a basic query to see your top-performing queries:

SELECT
  query,
  SUM(clicks) as total_clicks,
  SUM(impressions) as total_impressions,
  AVG(position) as avg_position,
  ROUND(100.0 * SUM(clicks) / SUM(impressions), 2) as ctr_percent
FROM google_search_console_data
WHERE date >= DATE_SUB(CURRENT_DATE(), INTERVAL 30 DAY)
GROUP BY query
ORDER BY total_clicks DESC
LIMIT 20;

This query shows your top 20 search queries from the last 30 days, including clicks, impressions, average position, and click-through rate. Run it and you'll see exactly which searches drive traffic.

Create a dashboard. Instead of writing SQL every time, build a dashboard. Click "Dashboards" in the left menu. Create a new dashboard. Add cards that visualize your GSC data:

  • Total impressions over time
  • Total clicks over time
  • Average CTR by device (mobile vs. desktop)
  • Top queries by clicks
  • Top pages by impressions
  • Queries with high impressions but low CTR (optimization opportunities)

Each card runs a SQL query behind the scenes. PostHog updates them automatically as new data syncs in.

Combine GSC with product events. This is where the integration becomes powerful. You can join your GSC data with PostHog's event tracking to see which search queries drive conversions.

For example, if you track a signup event in PostHog, you can query:

SELECT
  gsc.query,
  COUNT(DISTINCT events.distinct_id) as users_from_search,
  COUNT(DISTINCT CASE WHEN events.event = 'signup' THEN events.distinct_id END) as signups,
  ROUND(100.0 * COUNT(DISTINCT CASE WHEN events.event = 'signup' THEN events.distinct_id END) / COUNT(DISTINCT events.distinct_id), 2) as conversion_rate
FROM google_search_console_data gsc
JOIN events ON events.properties['search_query'] = gsc.query
WHERE gsc.date >= DATE_SUB(CURRENT_DATE(), INTERVAL 30 DAY)
GROUP BY gsc.query
ORDER BY signups DESC;

This shows which search queries actually convert. Now you know which keywords to double down on.

Troubleshooting Common Connection Issues

"Invalid credentials" error. The JSON file is corrupt or incomplete. Re-download it from Google Cloud. Make sure you copy the entire file, including the opening and closing braces. Paste it fresh into PostHog.

"Service account not authorized" error. The service account email isn't invited to your GSC property. Go back to Google Search Console > Settings > Users and permissions. Verify that your service account email is listed with "Viewer" role. If it's not there, add it again.

"Property not found" error. The GSC property URL is wrong. In Google Search Console, go to Settings > Owners. Copy the exact property URL shown there. If it says sc-domain:example.com, use that exact format. If it says https://example.com, use that instead.

Sync is slow. If you have a lot of search data (millions of queries), the first sync can take several hours. Subsequent syncs are faster because PostHog only pulls new data. Let it run overnight if needed. Check back in the morning.

No data appears after sync completes. If your GSC property is brand new (less than a week old), Google might not have enough data yet. GSC typically shows data after 3-5 days of traffic. If your property is older, check that the service account has the right permissions. Run the test again.

Pro Tips: Getting More Value From the Integration

Sync multiple GSC properties. If you own multiple domains or subdomains, create separate PostHog sources for each. This keeps your data organized and lets you compare performance across properties.

Set up alerts. Create PostHog insights that alert you when something changes. For example, alert if your average CTR drops below 2% or if impressions fall 20% week-over-week. These early warnings catch ranking drops before they become disasters.

Track GSC data alongside user cohorts. If you segment users in PostHog (e.g., "mobile users," "enterprise customers"), you can see which search queries drive traffic to each segment. This helps you tailor your SEO strategy to your audience.

Export reports for stakeholders. PostHog lets you export dashboard data as CSV or PDF. Build a monthly GSC report and share it with your team or investors. This is far cheaper than hiring an SEO agency to do it.

Combine with Looker Studio for presentation. If you want a polished, client-ready dashboard, connect your GSC data to Looker Studio alongside PostHog. Looker Studio is better for presentations; PostHog is better for analysis.

Monitor indexing health. Use GSC's URL Inspection tool to check if your pages are indexed. Then track indexing rate over time in PostHog. A sudden drop in indexed pages often signals a crawl issue worth investigating.

Cross-reference with GA4. If you've linked GA4 to Google Search Console, you can pull both datasets into PostHog and compare. See which queries drive traffic and which drive conversions. This reveals your highest-ROI keywords.

Integration Limitations and When to Use Alternatives

PostHog's GSC integration is powerful, but it has limits. Understand them before you commit.

Data freshness. PostHog syncs on a schedule (daily, hourly, etc.). You won't see real-time GSC data. If you need to react to ranking changes within minutes, PostHog isn't the right tool. GSC itself is your real-time source.

Historical data. PostHog pulls up to 16 months of GSC history on the first sync. If you need data older than that, you'll need to export it from GSC manually.

API rate limits. Google Cloud has rate limits on API calls. If you're syncing data very frequently (every few minutes), you might hit those limits. Daily or hourly syncs are safe.

Complexity. Writing SQL queries requires some technical skill. If you're not comfortable with SQL, you'll need to learn or hire someone. PostHog has documentation, but it's not trivial.

For simple, real-time GSC monitoring, use Google Search Console directly. For advanced analysis and product integration, PostHog is your tool.

Alternative Integration Methods

If PostHog's native GSC integration doesn't work for you, there are alternatives.

Use Pabbly Connect. Pabbly Connect is a no-code integration platform that can sync GSC data to PostHog without writing code. It's slower than native integration but requires no technical setup.

Use Google Cloud Storage. PostHog can read data from Google Cloud Storage. If you export GSC data to a CSV and upload it to GCS, PostHog can import it. This is manual but works if you need a one-time import.

Use a GitHub integration. The PostHog Search Console Integration on GitHub is an open-source project that syncs GSC data to PostHog. If you're comfortable with GitHub and Node.js, you can fork it and run it yourself.

Use Google Tag Manager. If you want to track search queries as events in PostHog, you can use Google Tag Manager with PostHog. This requires adding code to your site, but it gives you real-time search tracking.

For most founders, the native PostHog integration is simplest. Use alternatives only if you have specific needs the native integration doesn't meet.

Building Your SEO Dashboard in PostHog

Once your GSC data is synced, build a dashboard that tells your SEO story. Here's what to include.

Impressions and clicks over time. A line chart showing impressions and clicks week-over-week. This shows your search visibility trend. Flat or declining? You need more content or better optimization. Growing? Keep doing what you're doing.

Top queries by clicks. A table showing your highest-traffic search queries. These are your money keywords. Are you ranking for them? Can you improve your CTR? Are they relevant to your product?

High-impression, low-CTR queries. A table showing queries with lots of impressions but few clicks. These are optimization opportunities. You're ranking for them, but your title or meta description isn't compelling. Fix these and watch clicks jump.

Average position by query. A scatter plot showing query position vs. clicks. Queries ranking at position 1-3 should drive most clicks. Queries at position 5-10 are on the edge. Queries at 11+ rarely drive traffic. Prioritize improving position 5-10 queries.

Device breakdown. A pie chart or bar chart showing impressions and clicks by device (mobile, desktop, tablet). Mobile usually dominates. If desktop is high, you might have a mobile UX problem.

Geographic breakdown. If you target specific countries, show impressions and clicks by geography. This helps you identify regional opportunities or problems.

Conversion funnel. If you track events in PostHog, show a funnel from search impression → page view → signup → paid customer. This reveals which search keywords drive the most valuable users.

PostHog's dashboard builder is drag-and-drop. You don't need SQL to build these visualizations. Click "Add card" and choose a visualization type. PostHog builds the query for you.

Monitoring and Maintaining Your Integration

Once it's running, don't forget about it. Check on it weekly.

Monitor sync health. Go to Data Warehouse > Sources. Click your GSC source. Check that syncs are completing successfully. If a sync fails, you'll see an error message. Common causes: expired credentials, API rate limits, or network issues. PostHog usually retries automatically.

Check data freshness. Look at the timestamp of your last sync. If it's older than your sync interval (e.g., older than 24 hours for daily syncs), something's wrong. Check the error log.

Review your dashboard weekly. Spend 10 minutes every Monday looking at your GSC dashboard in PostHog. Are impressions up? Are clicks up? Is CTR stable? Trends are more important than absolute numbers. A 10% week-over-week increase in impressions is worth celebrating.

Re-check the Performance Report in Google Search Console. PostHog is great for deep analysis, but GSC's native Performance Report is still the source of truth. Use PostHog to dive deep into specific questions, but check GSC regularly for the big picture.

Update your credentials if needed. Google Cloud service account keys are good for years, but if you regenerate them, you'll need to update PostHog. Keep track of when you created your key. Plan to rotate it every 12 months for security.

Key Takeaways

Connecting PostHog to Google Search Console takes about 30 minutes and gives you superpowers.

You now see which searches drive traffic and which drive conversions. You spot optimization opportunities (high impressions, low CTR) that agencies charge thousands to identify. You build dashboards that tell your SEO story without paying for expensive tools.

The setup is straightforward: create a Google Cloud project, generate service account credentials, invite the account to your GSC property, and connect it in PostHog. The tricky part is writing SQL queries, but PostHog's documentation is solid, and you can start simple.

Once it's running, check it weekly. Trends matter more than absolute numbers. A 10% week-over-week increase in impressions is your signal to double down on what's working.

This integration is especially valuable if you've already set up Google Search Console and verified your domain. If you haven't, start there first. Then come back and connect PostHog.

For founders shipping without agency budgets, this is the move. You get the visibility of tools that cost hundreds per month. You own your data. You build dashboards that actually answer your questions. Ship it, track it, optimize it.

Next Steps

Now that you're connected, here's what to do:

  1. Spend 30 minutes exploring your data. Run a few SQL queries. Build a basic dashboard. Get familiar with what your search traffic looks like.

  2. Identify your top 10 keywords. These are your money keywords. Are you optimizing for them? Can you improve your rankings or CTR?

  3. Find high-impression, low-CTR keywords. These are quick wins. Better title tags and meta descriptions can 2x your clicks without any new content.

  4. Track conversion rate by keyword. Which search queries drive the most valuable users? Double down on those.

  5. Set up alerts. If impressions or clicks drop 20% week-over-week, you want to know immediately. PostHog can send you notifications.

  6. Build a weekly reporting habit. Spend 10 minutes every Monday reviewing your dashboard. Trends compound. A 5% week-over-week improvement compounds to 160% annual growth.

You've now got the same visibility as companies with six-figure SEO budgets. Use it. Ship faster. Stay visible.

Free weekly newsletter

Get the next one on Sunday.

One short email a week. What is working in SEO right now. Unsubscribe in one click.

Subscribe on Substack →
Keep reading