Set up the analytics integration

In the Metrics settings dialog, you connect PostHog, maintain tracked events with surface assignment, separate Website and Web App by URL pattern, and choose which of the eight tabs are visible.

Prerequisites
  • You're signed in, have access to Metrics, and are an Owner or Admin of the organization.

Open settings

Click the gear icon at the top right. Only Owners and Admins can save the integration; other roles get an error when trying to save.

Connect the analytics integration

  1. Under Provider, currently choose PostHog — Google Analytics 4 can be selected, but the data fetching for it isn't implemented yet.
  2. Enter the Project ID and Host (default: eu.posthog.com, us.posthog.com for the US cloud).
  3. Enter the API key (prefix phx_). Learn more expands a short guide with the PostHog steps (Project Settings → API key, Project ID from the URL /project/[ID]).
  4. Click Save analytics.

A key already stored is never shown in plain text — leaving the field empty keeps the existing key, only an entry overwrites it.

Maintain tracked events

  1. Click + Event to add a row: the technical event name (e.g. signup_completed) and a display label.
  2. Optionally mark which surfaces (App/Website/Web App) the event should count for — with no marking, it counts everywhere.
  3. From the first row on, Auto-Detect appears: the button checks the last 30 days per surface and suggests matching surfaces.
  4. Then click Save analytics again — Auto-Detect only changes the view; without saving, the detected assignment is lost again once the dialog closes.

Separate Website and Web App by URL pattern

The Surface filters section only works with PostHog (locked with a "PostHog required" note for other providers).

  1. Under Website URL pattern and/or Web App URL pattern, enter a substring that must appear in the URL (e.g. marketing.example.com).
  2. If both patterns are set at once, a note points out that Website automatically excludes Web App URLs, to avoid overlap.
  3. Click Save filters.

Choose which tabs are visible

At the bottom of the dialog, you toggle each of the eight tabs visible or hidden individually via a checkbox. Replays, Surveys, and Live carry a "PH" badge and can only be enabled while PostHog is the chosen provider.

This selection is only stored locally in the browser, not in your profile — on a different device or in a different browser, you'll see the default selection again.

Common pitfalls

  • Google Analytics 4 isn't functional yet

    GA4 can be selected as a provider and saved, but the actual data fetching for it isn't implemented yet. Use PostHog exclusively for now.

  • Only Owners and Admins can save

    Members with other roles see the settings, but a save attempt fails. In that case, ask an Owner or Admin of the organization.

  • Auto-Detect only overwrites on save

    The button only updates the surface checkboxes in the form view. Without then clicking "Save analytics", the detected assignment is lost again once the dialog closes.

  • Visible tabs only apply locally

    The selection of visible tabs is stored in the browser (localStorage), not in the user profile — it has to be set individually on every device and in every browser.

Frequently asked questions

Who can set up the analytics integration?

Only Owners and Admins of the organization can create or change the integration, or save tracked events.

Will I see my saved API key again?

No, for security reasons a stored key is never shown in plain text. If you leave the field empty when saving, the existing key stays unchanged.

Why are Replays, Surveys, and Live grayed out in settings?

These three tabs carry the "PH" badge and can only be enabled while PostHog is the chosen provider.

Keep reading

Couldn't find your answer, or still stuck?

Go to support

Last reviewed on 2026-09-26