Most of the people in your PostHog are anonymous. You can see what they clicked and watch their session replays, but not who they are or which company they work for. Knock2 fills that in. It identifies the people and companies behind your website traffic and ties each one to their PostHog session, so the sessions you're already watching finally have a name attached.
Connecting PostHog takes it a step further. Knock2 checks its results against the people your own PostHog already knows, confirms the matches, and fills in the visitors it hadn't identified yet.
Put names on your PostHog sessions
If PostHog runs on your website, Knock2 picks up each visitor's PostHog session automatically. You don't need to connect anything for this part.
Every identified contact carries their PostHog session ID, so you can go from a name in Knock2 straight to that person's session and replay in PostHog.
Your webhooks include it too. Contact webhooks, from a Play's webhook output or the contact.identified event, include
posthog_session_id. Use it to send names and companies back into PostHog, or to join Knock2 contacts to your PostHog events in your own warehouse.See who's behind the behavior. The funnel drop-off, the pricing-page revisit, the demo replay you watched twice: now you know which person and which account it was.
Confirm your Knock2 results
When someone signs up, logs in or fills in a form, your PostHog knows exactly who they are. Once PostHog is connected, Knock2 checks its identifications against those people.
Contacts your PostHog confirms get a Verified by PostHog label on the contact drawer.
You can filter on it, and add it as a column in the Contacts table, to focus on the contacts you know are right.
Contact webhooks include
posthog_verified_at, the date your PostHog confirmed the contact, so your other tools can see it too.
Fill in the gaps
New contacts. A visitor your PostHog knows but Knock2 hadn't identified yet becomes a Knock2 contact, with their visit history attached.
Complete history. When someone is already a Knock2 contact, the visits they made from other browsers are added to their timeline.
These contacts work like any other in Knock2: lead scoring, Slack alerts, Plays and CRM syncs all pick them up.
What you'll need
PostHog Cloud (US or EU) running on the same website as the Knock2 script
The Knock2 script installed and collecting visits for a little while, so Knock2 can see which PostHog project your site uses
Admin access in Knock2 to connect a workspace integration
Step 1: Create a personal API key in PostHog
In PostHog, go to Settings → Personal API keys (use eu.posthog.com if you're on EU cloud).
Click Create personal API key and give it a name like "Knock2".
Choose its scopes:
Easiest: give it Read access to all scopes.
Minimum: Project, Query and Person, each set to Read.
Make sure the key can access the project your website sends data to.
Create the key and copy it. It starts with
phx_.
The key is read-only. Knock2 never changes anything in your PostHog project.
Step 2: Connect PostHog in Knock2
In the Knock2 dashboard, open the App Marketplace.
Find PostHog in the Analytics category and click Connect.
Paste your personal API key and save.
You don't need to pick a project. Knock2 finds the one running on your website automatically and checks the key before saving it. If something is missing, such as a scope or access to the right project, you'll see a message saying exactly what to change.
Troubleshooting
"We haven't seen PostHog running on your website yet." The Knock2 script needs to have recorded some visits on a page where PostHog is running. Give it a little time after installing the script, then try again.
"None of them is the one running on your website." The key belongs to a different PostHog organization or can't access your website's project. Create the key in the organization that owns your website's project and make sure it has access to that project.
The key is missing a scope. Edit the key in PostHog, give it the scopes listed in Step 1, and reconnect.
"PostHog didn't accept this key." Make sure you pasted a personal API key (it starts with
phx_), not your project key.PostHog stopped accepting the key. Personal API keys stop working when they're deleted or when the person who created them leaves your PostHog organization. Create a new key and click Reconnect on the PostHog card.
The session ID is empty on a contact. That visit had no PostHog session, for example because the visitor opted out of tracking or PostHog didn't load on that page.
Need help?
If you have questions about PostHog and Knock2, reach out via the chat bubble in the dashboard or at support@knock2.ai.