Skip to main content

Overview

Send PostHog events to Unify to build audiences and plays around product usage. For example, find trial users who have tried a key feature, or identify existing customers who are using a feature associated with an upgrade. The integration receives pageviews, identify events, and custom events. It can also use the person and company data you send to create records and fill missing attributes in Unify. You need a PostHog project that already collects events and permission to configure its destinations. Choose one source for each event: forwarding the same pageview through PostHog and the Unify Intent client can double-count it.

Connect PostHog

1

Get your Unify write key

Open Settings → Integrations → PostHog. Click Setup if you haven’t generated a write key, then copy the key.
2

Add the destination

In PostHog, open CDP → Destinations, create a new destination, and select Unify. Paste the key into Unify Write Key.
3

Choose which events to forward

Add event matchers for the activity you want in Unify. Include pageviews and identify events alongside relevant custom events, such as completing onboarding or using a paid feature.Review Filter out internal and test users. It is selected by default and can prevent your own test activity from reaching the destination.
4

Map people and companies

In the Person mapping, map email to the property containing the person’s email address. Review the remaining mappings against the properties your project actually sends. In the Company mapping, map domain and any company details you want to supply.The default company mappings expect a PostHog group named company. Adjust them if your project stores company information elsewhere. See attribute mappings for examples.
PostHog's Unify destination with an example pageview filter and person and company attribute mappings.

This example forwards pageviews from example.com and maps person and company details. Add matchers for the activity your team needs.

5

Test and enable the destination

Click Start testing, prepare a representative test event, and click Test function. This sends the event to Unify. Review it in the event console, allowing a few minutes for processing.Once the event and its attributes are correct, click Create & enable. Future events matching your filters will be sent to Unify.

Map record attributes

Each mapping pairs a Unify attribute with the PostHog property supplying its value. These examples use PostHog’s default person and company group structure: For example, if your project stores email in email_address, change the value to {person.properties.email_address}. The value must match the format of the Unify attribute, such as a text email address or a number. Use Add entry to map a supported standard or custom attribute. For custom attributes, use its API name and the appropriate value type. Person identification requires an email address. Company association uses the supplied domain or, when possible, the person’s work email domain. Mapped record details fill empty attributes on existing records. Unify retains values already present in those attributes. Website activity continues to update as new events arrive. For PostHog’s configuration reference, see its Unify destination guide.

Use product activity

Combine event filters with company or person attributes to define an audience. For example, target people on a free plan who have used a specific feature in the last week. Use a play to act when someone enters the audience, or review matching records before starting outreach.

Troubleshooting

Check the write key, destination event matchers, and internal-user filter. Use a supported event type and allow a few minutes for processing before checking the event console again.
Inspect the test event’s property names and compare them with each mapping. Confirm that a person email is present and that the company domain is populated. A mapping to a missing property cannot supply a value.
Remove the Person or Company mappings you no longer want to send. Keeping the person email lets Unify associate activity with a known person.