# PostHog

Connecting PostHog to Zero maps your product analytics to the right customers, so you can see adoption at a glance. It also helps you spot active prospects during trials and flag potential churn risks early.

With this integration, you can:

* See all analytics events tracked for companies in your workspace.
* Monitor product activity in real time alongside deal and account progress.

***

## How to connect PostHog to Zero

To connect PostHog with Zero, you will need an API Key with Read-Permissions. Note that project-level API keys are write-only. They will not work. Use a personal API key instead.&#x20;

{% stepper %}
{% step %}
In PostHog, open your **Settings**. Under **Account → Personal API keys**, create a new key. Create the key with all "Read" permissions enabled.&#x20;

<figure><img src="https://2426440268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMzaYbOuCLt8zV0pNIILp%2Fuploads%2Few9i02BjJffclpoU1GPe%2Fimage.png?alt=media&#x26;token=1e39fe13-8552-4ef3-a93b-98f56251f5ab" alt=""><figcaption></figcaption></figure>

Alternatively, use this link and replace `{PROJECTID}` with your actual PostHog project ID:\
[`https://eu.posthog.com/project`](https://eu.posthog.com/project/35629/settings/user-api-keys#personal-api-keys)`{PROJECTID}`[`/settings/user-api-keys#personal-api-keys`](https://eu.posthog.com/project/35629/settings/user-api-keys#personal-api-keys)
{% endstep %}

{% step %}
In Zero, go to your **Workspace Settings → Integrations**. Scroll to **Analytics Integrations** and create a new connection.

<figure><img src="https://2426440268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMzaYbOuCLt8zV0pNIILp%2Fuploads%2FluR6wIEiPOdcYnQjrMHT%2Fimage.png?alt=media&#x26;token=fec77b4c-b1c9-410d-852e-3a38640eccf2" alt="" width="563"><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Select **PostHog**, paste the details you noted above, and click **Connect Integration**.

<figure><img src="https://2426440268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMzaYbOuCLt8zV0pNIILp%2Fuploads%2F63Bs7dhKzln25xZbl1yb%2Fimage.png?alt=media&#x26;token=ee15f165-8d9a-4b64-ad28-a38e0efd624c" alt="" width="563"><figcaption></figcaption></figure>
{% endstep %}

{% step %}
If you followed all the steps correctly, you should see the following view.

<figure><img src="https://2426440268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMzaYbOuCLt8zV0pNIILp%2Fuploads%2FyABPk3eLJe7cwloF0O69%2Fimage.png?alt=media&#x26;token=746a823c-35f4-4d08-9b30-8366c5f47ee7" alt="" width="563"><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

***

## How the integration works

* Zero maps data at the **company** level and does **not** pull user-level data.
* Companies are matched using the email domain on the PostHog event and the domain on the company record in Zero.
* On first connect, Zero pulls **90 days** of data by default. You can extend the sync window in the integration settings.
* Data gets refreshed four times a day.&#x20;

**If you don’t see data yet, check:**

* The initial sync may still be running—new connections can take a bit to complete.
* The events you’re looking for might be **outside** the synced date range.
* The company’s domain in Zero doesn’t match the email/domain on the PostHog event.\
  \&#xNAN;*Coming soon:* a troubleshooting view in Zero to list unmatched emails/domains from PostHog.

***

## Where the data appears in Zero

* In any list, add the **Analytics events** column.

<figure><img src="https://2426440268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMzaYbOuCLt8zV0pNIILp%2Fuploads%2F867ft7kHZNZXHrtA8Ijh%2Fimage.png?alt=media&#x26;token=07a0a854-a06d-4f70-bd1d-0dbc78c31cd5" alt="" width="360"><figcaption></figcaption></figure>

* Hover over the bubbles to see a breakdown of events.

<figure><img src="https://2426440268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMzaYbOuCLt8zV0pNIILp%2Fuploads%2F1woqHbdKgHQMGHrEoGlT%2Fimage.png?alt=media&#x26;token=a53e2d8a-e5a7-4888-906d-b4cb52d62dc9" alt="" width="563"><figcaption></figcaption></figure>

* Configure the column from its header:
  * **Event types**: choose which events to include.
  * **Max value**: set the bubble scale; counts above this show at the maximum size.
  * **Date range**: choose how many days to include.
  * **Summary**: pick how events are aggregated.

<figure><img src="https://2426440268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMzaYbOuCLt8zV0pNIILp%2Fuploads%2FiCstZ7yNlSTaIEAa5ich%2Fimage.png?alt=media&#x26;token=953cb026-7d67-4cee-87ef-6e86c2635844" alt="" width="563"><figcaption></figcaption></figure>

* You can also use **“Analytics Events”** as an entity in the [**“Reports”**](https://docs.zero.inc/features/reports) section to add the data as a chart to your dashboards.

<figure><img src="https://2426440268-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMzaYbOuCLt8zV0pNIILp%2Fuploads%2Fn0hHN1KZ2tR6rx8a5LyE%2Fimage.png?alt=media&#x26;token=3a1afc72-2578-403c-b646-a241d88907b1" alt="" width="563"><figcaption></figcaption></figure>
