> ## Documentation Index
> Fetch the complete documentation index at: https://docs.devtune.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect PostHog

> Import AI referral sessions and selected conversions from PostHog Cloud.

Connect PostHog to see which AI engines send visitors to your site and which selected conversions happen during those visits. Reports appear in **AI Demand → Referrals**, by day, AI engine, and landing page.

<Note>
  PostHog is available to accounts with the integration enabled. If it does not
  appear in Integrations, contact DevTune. PostHog Cloud projects in the US and
  EU are supported.
</Note>

## Connect your project

1. Open **Project settings → Integrations** and select **Set up** beside PostHog.
2. Authorize DevTune to access your PostHog project.
3. Choose the PostHog project and the site you track in DevTune.
4. Select the events or existing PostHog actions you want to count as conversions. Leave this empty for session reporting only.
5. Select **Validate and connect**. Validation runs in the background and can take several minutes.

DevTune maintains its own reporting queries in PostHog as part of the connection. It does not change your events, actions, or existing dashboards.

Only one analytics provider supplies reports for each site. If GA4 already supplies that site's reports, it remains in use until PostHog validation succeeds. PostHog then replaces it. Reports use the selected provider's history; unavailable history stays unmeasured.

## History and freshness

DevTune imports up to **180 days of history**, starting with recent days and continuing in the background. Larger projects take longer. The integration shows import progress while this runs; available data can appear before the full import finishes.

After history is imported, DevTune syncs approximately **once a day**. Reports use complete UTC days, so today's activity is not included. Recent days are refreshed to pick up late-arriving data. This is not a real-time activity feed.

DevTune imports aggregate reports, not individual visitor or session records. Available history depends on what PostHog collected and retained.

## What conversions mean

A conversion counts when a selected event or action occurs **within an AI-referred session**. A visitor returning in a later session is not credited to the earlier AI referral. If an event matches several selected definitions, it counts once in the overall total.

PostHog session duration and bounce rate use PostHog's definitions. They are different from GA4 engagement metrics.

## If data is missing

* **Still importing:** check the available date range and import progress in Integrations.
* **Connection needs attention:** open **Manage** and follow the reconnect instructions.
* **Counts are incomplete:** some events may lack the session or page information needed to attribute them. Check that your PostHog website tracking captures page URLs and sessions, including on conversion events.

Missing measurements are not counted as zero. Comparisons depend on the data available in both periods.

PostHog does not replace your crawler sensor. Keep [Cloudflare or edge middleware](/ai-traffic/setup#connect-a-crawler-sensor) connected to measure AI crawls, answer fetches, and 404 demand.
