Heap
This page describes how to set up Heap as a destination.
Set up
An example setup for Heap is shown below.
src/pages/api/syft.ts
// ...
const destinations = [
{
type: "heap",
settings: {
appId: "xxxx"
},
},
];
// ...
Configuration options
Name | Type | Description | Required | Default |
---|---|---|---|---|
appId | string | The app_id corresponding to one of your projects. | true |
Data Modeling
Track Calls
Track Event
Send an event to Heap.
Matched events
type = "track" or type = "page" or type = "screen"
Data Mapping
Destination Field | Type | Description | Source Field |
---|---|---|---|
message_id | string | Unique event ID generated by Syft. | $.messageId |
identity | string | a string that uniquely identifies a user, such as an email, handle, or username. This means no two users in one environment may share the same identity. More on identify: https://developers.heap.io/docs/using-identify | $.identity |
anonymous_id | string | The generated anonymous ID for the user. | $.anonymousId |
event | string | Name of the user action. This only exists on track events. Limited to 1024 characters. | $.event |
properties | object | An object with key-value properties you want associated with the event. Each key and property must either be a number or string with fewer than 1024 characters. | $.properties |
timestamp | datetime | Defaults to the current time if not provided. | $.timestamp |
type | string | The type of call. Can be track, page, or screen. | $.type |
name | string | The name of the page or screen being viewed. This only exists for page and screen events. | $.name |
traits | object | An object with key-value properties you want associated with the user. Each property must either be a number or string with fewer than 1024 characters. | $.context.traits |
Identify Calls
Identify User
Set the user ID for a particular device ID or update user properties.
Matched events
type = "identify"
Data Mapping
Destination Field | Type | Description | Source Field |
---|---|---|---|
user_id | string | REQUIRED: A string that uniquely identifies a user, such as an email, handle, or username. This means no two users in one environment may share the same identity. More on identify: https://developers.heap.io/docs/using-identify | $.userId |
anonymous_id | string | The generated anonymous ID for the user. | $.anonymousId |
traits | object | An object with key-value properties you want associated with the user. Each key and property must either be a number or string with fewer than 1024 characters. | $.traits |