# Heap

After sending Freshpaint data to Heap, teams can harness the power of product analytics to drive better, data-driven business outcomes.

## Destination Info

* Accepts [Track](https://documentation.freshpaint.io/developer/freshpaint-sdk-reference#track) and [Identify](https://documentation.freshpaint.io/developer/freshpaint-sdk-reference#identify) calls
* Supports [HIPAA mode](https://documentation.freshpaint.io/hipaa-mode)
* Connection Modes:

<table><thead><tr><th align="right"> </th><th data-type="checkbox">Client-side</th><th data-type="checkbox">Server-side</th></tr></thead><tbody><tr><td align="right">Web</td><td>true</td><td>true</td></tr><tr><td align="right">Mobile</td><td>false</td><td>true</td></tr><tr><td align="right">Server</td><td>false</td><td>true</td></tr></tbody></table>

## Getting Started

To set up the Heap integration, follow these steps:

1. Go to the [Heap configuration page](https://app.freshpaint.io/destinations/apps/heap) in Freshpaint and click *Configure* for `App ID`.
2. In Heap, go to your Account Projects page and copy/paste the ID for the Environment you want to use into the App ID setting in Freshpaint:

<figure><img src="/files/xEeyPFxpU4R1nbcP70J6" alt=""><figcaption></figcaption></figure>

## Identify

It is important to first [Identify ](https://documentation.freshpaint.io/developer/freshpaint-sdk-reference#identify)your users so Heap knows who they are and associates events to their [User Identity](https://developers.heap.io/docs/using-identify) in Heap.

When you call [freshpaint.identify](https://documentation.freshpaint.io/developer/freshpaint-sdk-reference#identify), Freshpaint will create or update a Heap User Identity by calling Heap's [identify API](https://developers.heap.io/docs/using-identify). Any user properties you pass in will be forwarded directly to Heap.

Here is an example of an identify call:

```javascript
freshpaint.identify("ada.lovelace@example.com", {
    /* user properties */
    "email": "ada.lovelace@example.com",
    "name": "Ada Lovelace",
    "role": "mathematician",
    "specialty": "computer languages"
});
```

This creates the following User in Heap:

<figure><img src="/files/QakZSBjtOIoUEC2fBpQO" alt=""><figcaption></figcaption></figure>

## Events

### Seeing Freshpaint Events in Heap

Once the Heap integration [is enabled](https://app.gitbook.com/o/-MA7b_ezO9UcpNU5sTg_/s/-MA7aDqsXMFbUsWVqonF/~/changes/1124/readme/setting-up-your-destinations/enabling-and-disabling-a-destination), you can now set it as an event destination:

<figure><img src="/files/GtwWKv2UNLZBqY2XM1tZ" alt=""><figcaption></figcaption></figure>

Events sent from Freshpaint will show up as Heap events:

<figure><img src="/files/GYmV7WkAjAHd8JyuVnl8" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
You should make sure [Identify](https://documentation.freshpaint.io/developer/freshpaint-sdk-reference#identify) occurs before any Tracked events, so they are associated with the Identified user. The Heap API does not support merging anonymous users with Identified users.
{% endhint %}

### Event Transformations

Set up transformations to modify your data before it's sent to your destination:

<figure><img src="/files/aOKkpLvEjEmGXuzLhTCA" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.freshpaint.io/integrations/destinations/apps/heap.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
