PostHog data pipeline
Set up a reliable and fully supported PostHog-to-Accoil event pipeline using the Accoil destination.
Use the Accoil not 'Accoil Analytics' data pipelinePostHog has released a built-in destination labeled “Accoil Analytics”, but this was created without direct consultation with our team. While well-intentioned, it didn't align with our API.
The Accoil data pipeline has been developed by us and works as expected.
⚙️ Setup Process
-
In PostHog, go to:
Data Pipelines → Destinations > New Destination → Accoil → Create -
API Key:
Enter your API key, which can be found within Accoil → Settings → General (Account Settings). -
Click "Create & enable":
✅ That’s it! Your PostHog events are now flowing into Accoil.
How Accoil Handles PostHog Events and Traits
When connecting PostHog to Accoil, only specific events and user/group traits are accepted by default. This helps keep your data focused, relevant, and privacy-compliant.
🎯 Events Accepted by Accoil
Event Filtering
Accoil only accepts a defined set of PostHog events. All other internal system events are ignored unless they are in the allowed list:
Allowed PostHog Events:
$identify$set$pageview$screen$groupidentify- Any custom event that doesn’t start with
$
Event Type Mapping
Incoming PostHog events are mapped to Accoil event types:
| PostHog Event | Accoil Type | Notes |
|---|---|---|
$identify, $set | identify | User identification + traits |
$groupidentify | group | Group/account identification + traits |
$pageview | page | Must include a name; treated as a track event in Accoil |
$screen | screen | Must include a name; also treated as a track event in Accoili |
| Custom Events | track | Generic event tracking |
📄 General trait handling
identifyevents: Accept user traits.groupevents: Accept group/account traits.track,page, andscreenevents: → Do not accept traits. Only the event name (or page/screen name) is captured.
👤 User Traits
By default: only key traits are sent
Accoil sends a minimal set of user traits by default, only if they're available:
userIdemailnamecreatedAt
No additional traits are included unless explicitly configured.
Optional: Include More Traits
If you'd like to send more traits from PostHog into Accoil:
1. Include All Properties from an Object
Use this option to send all traits from a given object (e.g., event.properties.user).
⚠️ Note: This can result in sending a large amount of data. Use with caution.
2. Add Entry Manually
You can define individual traits to send by:
- Setting a key (the trait name as it will appear in Accoil)
- Providing a value (the reference from PostHog, e.g.,
{event.properties.role})
This method gives you granular control over which traits are passed through.
🚫 Automatically Blocked Traits
Regardless of how traits are configured, Accoil always blocks any trait keys containing:
"geoip""ip""current_url"
This is to ensure user privacy and data hygiene.
🏢 Group Traits
Just like with users, only a small set of group traits are sent by default:
groupIdgroup_namegroup_createdAtgroup_statusgroup_plangroup_mrr
Optional Group Trait Configuration
As shown in the UI:
- Include properties from an entire object: Sends all available group properties.
- Add entry: Send specific key–value pairs where the key is the trait name in Accoil, and the value is the group property reference (e.g.,
{event.properties.$group_set.industry}).
Blocked traits (geoip, ip, current_url) still apply here.
🧪 Filtering Test & Internal Users
To ensure your engagement scores and analytics remain clean and reliable, it's important to filter out internal and test data. Accoil supports a few simple options to help you do this:
1: Filter in PostHog
These approaches approach keeps test data from ever reaching Accoil. You can configure filtering directly within your PostHog setup:
- Internal/Test Users: Use PostHog’s Data Pipeline filters to exclude users based on internal email domains, test flags, or environment-specific traits.
- Custom Filters: PostHog also allows advanced filtering based on traits or event properties.
2: Filter in Accoil
If data has already entered Accoil, you can still filter it out at the workspace level:
- Domain-Based Filtering: Exclude users from known test domains (e.g.,
@adobe.com). Go to:Workspace Settings → Engagement Score → Filter Users. - Trait-Based Filtering: Filter users or accounts using traits passed from PostHog (e.g.,
isTestUser,environment, etc.).
These filters prevent test data from influencing engagement scores or segment logic.
3: Sandbox Account
For complete separation of test and production data, you can request a dedicated sandbox account. This option is available for customers on our Scale plan:
- Comes with a separate API key
- Perfect for testing PostHog integrations or exploring Accoil features safely
- Keeps all test data out of your production workspace
- Ideal if you already use separate environments in PostHog
💡 Note: Sandbox data is:
- Excluded from billing
- Deleted after 60 days
- Not connected to third-party tools or integrations
Interested in a sandbox environment? Contact us from within Accoil and we’ll set it up for you.
Updated 23 days ago
