Skip to main content

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

NameTypeDescriptionRequiredDefault
appIdstringThe 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 FieldTypeDescriptionSource Field
message_idstringUnique event ID generated by Syft.$.messageId
identitystringa 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_idstringThe generated anonymous ID for the user.$.anonymousId
eventstringName of the user action. This only exists on track events. Limited to 1024 characters.$.event
propertiesobjectAn 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
timestampdatetimeDefaults to the current time if not provided.$.timestamp
typestringThe type of call. Can be track, page, or screen.$.type
namestringThe name of the page or screen being viewed. This only exists for page and screen events.$.name
traitsobjectAn 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 FieldTypeDescriptionSource Field
user_idstringREQUIRED: 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_idstringThe generated anonymous ID for the user.$.anonymousId
traitsobjectAn 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