Skip to main content
This feature is currently in beta. Please reach out to our team if you want access to this feature.

Overview

You can forward PostHog events into Unify by configuring a PostHog destination to send events directly to the Unify Analytics API. This integration can create new Unify People and Companies and update existing Unify People and Companies with event data from your PostHog instance.

Prerequisites

Create a PostHog destination. You can filter out any event that you do not wish to forward into Unify.
1

Create a Unify destination

In PostHog, go to Data → Destinations → Create a new destination. Search for Unify and click Create.
2

Filter events to send to Unify

Add an event matcher to send the events you want to Unify. We recommend sending Pageview and Identify events in addition to any custom events of your choice.
In the example above, survey dismissed is a custom event.
3

Configure your destination

  1. Paste your write key under Unify Write Key
  2. Ensure your Unify Person attributes are correctly mapped to your PostHog properties
    Not sure what attributes are or why this mapping matters? See our FAQ for more details.
  3. Ensure your Unify Company attributes are correctly mapped to your PostHog properties
    Not sure what attributes are or why this mapping matters? See our FAQ for more details.
4

Test and create your destination

To test whether the integration is working, you can send a test event from PostHog. Select Start testing and Test function to send a test event to Unify.
Events may take up to 5 minutes to show up in the Unify event consoleOnce you’ve verified that the correct data has been sent, select Create and enable to activate the destination.

FAQ

The PostHog integration has the ability to create and update People and Companies in your Unify instance. An attribute mapping describes how PostHog should convert data into a format Unify understands. If this mapping is not correctly configured, some data may be missing when the Person or Company is created in Unify.
Consider the example attribute mapping below:
Unify attributePostHog property
email”{person.properties.email}”
There are three things to verify when checking that an attribute mapping is correct.
  1. Check that the left side of the mapping is the Unify property you want to populate with event data. In this case, we want to populate the email property of the Unify Person who will be associated with this event.
  2. Check that the right side of the mapping is the correct location of the data in the PostHog. If you have PostHog Person data that looks like
    {
      "person": {
        "properties": {
          "email": "person@acme.com"
        }
      }
    }
    
    then the value of this field in the data sent to Unify will be person@acme.com. If you have PostHog Person data that looks like
    {
      "person": {
        "properties": {
          "email_address": "person@acme.com"
        }
      }
    }
    
    on the other hand, then the value of this field in the data sent to Unify will be undefined since there is no email_address key. In this case, you would have to change the right side of the attribute mapping to {person.properties.email_address} to correct the mapping.
  3. Check that the format of the event data corresponds with the attribute’s value type. The Email address value type is a text field and person@acme.com is a valid email address, so the attribute mapping is correct here.
PostHog does not natively have the concept of a Company. To support this, we strongly recommend using PostHog’s group analytics feature. Please ensure a company group is a defined group type in your PostHog instance.Following that, please check your Company attribute mapping in your Unify destination is correct and that a domain is being sent.
Yes. In PostHog, navigate to your Unify destination and add a new entry to the Person or Company mapping. Add your custom attribute name on the left side and the corresponding field in PostHog on the right side.
No, only fields that are missing on an existing Person or Company will be updated with PostHog event data. For example, if the Company acme.com does not have an existing Corporate Phone Number in Unify and a PostHog event is sent with that data, then the Corporate Phone Number will be updated. If it has an existing Corporate Phone Number, however, it will not be updated.
We strongly recommend sending at least Person data with event data from PostHog since this can save credits if you have reveal enabled in Unify. However, if you still want to stop sending Person or Company data from PostHog to Unify, then go to PostHog, navigate to your Unify destination and remove all attribute mappings.