How to connect PostHog to Zendesk and see user activity on tickets
By Jake Marsh · Updated
To connect PostHog to Zendesk, create a personal API key in PostHog under Settings > User > Personal API keys, limit it to your project with the read scopes person, query, cohort and feature flag, and note your project id. Install Trailwell, set Analytics tool to posthog, choose the region (US Cloud, EU Cloud or self-hosted) and paste the key. The requester's PostHog person appears on every ticket, with cohorts and feature flags.
Steps
- Create the key. In PostHog, open Settings > User > Personal API keys and click Create. Name it "Trailwell for Zendesk".
- Limit it to your project, with the read scopes person, query, cohort and feature flag. Trailwell needs nothing else.
- Copy the key and note the project id (Settings > Project > General).
- Install Trailwell from the Zendesk Marketplace and choose Team (up to 12 agents and admins) or Scale (13 or more).
- Fill in the settings in Admin Center > Apps and integrations > Zendesk Support apps > Trailwell:
| Setting | What to enter |
|---|---|
| Analytics tool | posthog |
| PostHog region | us, eu or custom |
| PostHog project id | From Settings > Project > General |
| PostHog personal API key | From step 3. Stored as a Zendesk secure setting |
| Self-hosted address | Only for custom: a host name like posthog.example.com |
- Open a ticket from someone who uses your product.
How people are found
PostHog finds persons by the email property or by distinct id. Match by decides which Trailwell tries:
email(default): the requester's email addresses, primary first, at most 4.external_id: the Zendesk user's External ID holds your product's distinct id.both: external id first, then emails.
Several people match? Pick one. Nobody? Use Find another person.
What PostHog adds to the panel
| Part | What you see |
|---|---|
| Last seen | Active today, Active this week, Quiet (7 to 30 days) or Dormant (over 30 days) |
| Sessions and events | Counted on PostHog's side, exactly, for 7 days and your history window |
| Key events | Up to 12 you name, with 7 and 30 day counts |
| Errors | Counts and the latest ones, from your error events (default $exception, error*) |
| Timeline | The latest events, with the 24 hours before the ticket shaded |
| Cohorts and feature flags | PostHog only, on by default (Show cohorts and feature flags) |
PostHog links to the person itself, so you don't need a Profile link.
Self-hosted PostHog
Set PostHog region to custom and enter your instance's host name in the self-hosted address setting, without https:// or a path. Zendesk sends the key only to that host.
Limits
PostHog allows 2,400 queries an hour on its query endpoint, and personal API keys also draw from an hourly read budget. Trailwell uses 2 queries per ticket, each limited to one person and your history window. Turn off Load usage automatically if you'd rather agents press Load only when they need usage.
What it costs
Trailwell is $100 per month for Zendesk accounts with up to 12 agents and admins (Team), or $9 per agent per month from 13 (Scale), billed monthly by Zendesk with a 14-day free trial and a card at install. See the Trailwell documentation and PostHog's API overview for personal API keys.
Trailwell
Mixpanel, Amplitude or PostHog usage on every ticket: last seen, key events, errors. From $100/mo. From $100 a month per Zendesk account.
Questions
Which PostHog scopes does the key need?
Read access for person, query, cohort and feature flag, limited to your project.
Does it work with PostHog EU Cloud?
Yes. Set PostHog region to eu.
Can agents see which feature flags a customer has?
Yes. With Show cohorts and feature flags on, the panel lists the person's cohorts and feature flags, which helps when a customer sees something others don't.
Does Trailwell send ticket data to PostHog?
It sends only the requester's email addresses or external id to your own project to find them. It writes nothing to PostHog.
More Trailwell guides
- How to connect Amplitude to Zendesk and see user activity on tickets
- How to connect Mixpanel to Zendesk and see user activity on tickets
More Zendesk guides
- How to create a BigCommerce API account for Zendesk (Trolleywell for BigCommerce)
- How to add a Save as PDF button to Zendesk help center articles (Tomewell)
- How to split a ticket in Zendesk (Twigwell)
- How to cancel or pause a Stripe subscription from Zendesk (Tillwell)