Segment
Send Segment events to Accoil using the native Accoil Analytics destination.
Accoil provides a native Segment destination that receives events directly from your Segment workspace. No middleware or third-party routing is required.
Setup
- In Segment, go to Connections > Catalog and search for Accoil Analytics.
- Select Accoil Analytics and click Add Destination.
- Choose the Segment source you want to connect to Accoil.
- Enter your Accoil API key (found in Accoil under Settings > Account Settings > General).
- Enable the destination.
Initial data processing
Allow 8-24 hours for data to begin appearing in Accoil. Engagement metrics are calculated once at least one full day of event data has been received.
Supported Actions
The Accoil Analytics destination supports the following Segment event types:
| Action | Default Trigger | Description |
|---|---|---|
| Identify | type = "identify" | Creates or updates a user and their traits |
| Group | type = "group" | Creates or updates an account and its traits |
| Track | type = "track" | Records a product event |
| Page | type = "page" | Sent to Accoil as a track event |
| Screen | type = "screen" | Sent to Accoil as a track event |
Each action mapping can be customized in Segment's destination settings. A maximum of 50 mappings per destination instance is supported.
Event Examples
Identify
analytics.identify("usr_12345", {
email: "alex@example.com",
name: "Alex Keener",
createdAt: "2023-05-12T08:00:00Z",
role: "admin"
});Group
analytics.group("acc_67890", {
name: "Acme Corp",
plan: "enterprise",
mrr: 99900,
industry: "technology",
status: "paid"
});Track
analytics.track("Report_Created");Event name only
Accoil's track call accepts only the event name. Event properties are not stored. Use identify and group calls to set user and account attributes.
Configuration in Accoil
Once events are flowing, configure how Accoil uses your data:
- Account display name -- Set which trait to use as the account name in the Accoil UI.
- Account creation date -- Map the trait that represents when the account was created.
- Features -- Group related events into features for engagement scoring. Each event can belong to one feature, and features can be weighted (1-10) to reflect their importance.
- Trait data types -- Set data types for your traits to enable proper filtering and segmentation.
Key Considerations
- Consistent identifiers are essential. Ensure
userIdandgroupIdvalues are stable and consistent across all event types. - Group calls are mandatory for B2B. Without group calls, Accoil cannot calculate account-level engagement scores. See B2B Tracking Patterns.
- Track event properties are not persisted. Only the event name and timestamp are used for engagement scoring. Context belongs on user traits (via identify) and account traits (via group).