# Heap Integration

Heap is a digital insights platform that gives you a complete understanding of your customers’ digital journeys, so you can quickly improve conversion, retention, and customer delight. You can integrate your CustomFit account with Heap to have your CustomFit experiences and behaviours pushed as custom events in Heap.

### Prerequisites

* A Heap account that is currently active
* Your webpage should have both the CustomFit code snippet and the Heap analytics code.

### Integrating CustomFit with Heap

* Log in to your CustomFit dashboard.
* From the dashboard sidebar, click on **Settings > 3rd Party Integrations.**
* On the integrations page, you can see the **Heap** section.

<figure><img src="https://1136256215-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUgAFLO61VraHX8jwLt%2Fuploads%2FR55PQ7LiSjSF8jIpksCS%2Fimage%20(11).png?alt=media&#x26;token=38214e02-635b-4ac4-b536-b9c0c3f04e2c" alt=""><figcaption></figcaption></figure>

* Click on the status field to enable Heap integration.

<figure><img src="https://1136256215-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUgAFLO61VraHX8jwLt%2Fuploads%2F5FgEFceBP0PGFGbbri6Y%2Fimage%20(12).png?alt=media&#x26;token=54332277-55d8-4924-be96-272435bbcbe4" alt=""><figcaption></figcaption></figure>

### Validating integration

Once the integration is configured, you can validate that your experience behavior data is being transmitted to Heap.

* Log in to your Heap account.
* Click on the **Data** option from the sidebar.

<figure><img src="https://1136256215-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUgAFLO61VraHX8jwLt%2Fuploads%2FM61IX4jNBKkxpfopQLf0%2FHeap1.png?alt=media&#x26;token=af41b4b2-555e-4a1a-98d3-467974e51480" alt=""><figcaption></figcaption></figure>

* Next, click on the **Live data feed** option.

<figure><img src="https://1136256215-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUgAFLO61VraHX8jwLt%2Fuploads%2FpXak8pKFxvpOVvcVq7tt%2FHeap2.png?alt=media&#x26;token=5260a2b3-068f-407a-a7f3-a50e180987ac" alt=""><figcaption></figcaption></figure>

* If you see the **CustomFit Experience Viewed** events then your Heap account is successfully receiving events from CustomFit.

<figure><img src="https://1136256215-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUgAFLO61VraHX8jwLt%2Fuploads%2FqTkDUX1OAMYUjArhbD6r%2FHeap2%20(1).png?alt=media&#x26;token=ed880db0-a3c8-4117-a6fe-366bf80cb7ed" alt=""><figcaption></figcaption></figure>

### Reports in Heap

To filter the reports, perform the below steps:

* Log in to your Heap account.
* Click on the **Data** option from the sidebar.

<figure><img src="https://1136256215-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUgAFLO61VraHX8jwLt%2Fuploads%2FM61IX4jNBKkxpfopQLf0%2FHeap1.png?alt=media&#x26;token=af41b4b2-555e-4a1a-98d3-467974e51480" alt=""><figcaption></figcaption></figure>

* Next, click on the **Labeled events** option.

<figure><img src="https://1136256215-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUgAFLO61VraHX8jwLt%2Fuploads%2FuWouWoAY9XJrmBjCAQVY%2Fimg1.png?alt=media&#x26;token=9c252b29-dc09-4f06-8e29-49cd33d507f8" alt=""><figcaption></figcaption></figure>

* Create a new label by clicking on the **Label event or property** button and then choosing the E**vent** option from the dropdown.

<figure><img src="https://1136256215-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUgAFLO61VraHX8jwLt%2Fuploads%2FIwQ5cMzyyMIciX32adMo%2Fimage%20(13).png?alt=media&#x26;token=06838895-8b05-45ad-85e8-7977573e0294" alt=""><figcaption></figcaption></figure>

* Select the **category** as **Custom Events**.

<figure><img src="https://1136256215-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUgAFLO61VraHX8jwLt%2Fuploads%2FMeq50TQwQ9KJLM9rFcuY%2Fimage%20(14).png?alt=media&#x26;token=e8c8527f-4e95-4513-84a0-4d30302f1a9d" alt=""><figcaption></figcaption></figure>

* Next, give the **name** as **CustomFit Experience**. Then, select the **source** as **Custom**. Finally choose the **CustomFit Experience Viewed** event and click on the **Label event** button. This will label all the CustomFit experiences irrespective of the experience behaviors.

<figure><img src="https://1136256215-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUgAFLO61VraHX8jwLt%2Fuploads%2FlHA8XIMYrDijiHDxHaqy%2Fimage%20(15).png?alt=media&#x26;token=c9bddcf2-03cf-44fb-ad94-12ffd8463c19" alt=""><figcaption></figcaption></figure>

* If you want to label events specific to a particular experience behavior then click on the **Add filter** option.&#x20;

<figure><img src="https://1136256215-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUgAFLO61VraHX8jwLt%2Fuploads%2FVhQEJll6PTyBi4ynjdyW%2Fimage%20(16).png?alt=media&#x26;token=330f013a-e8aa-4c11-8b06-3335c3a26dd8" alt=""><figcaption></figcaption></figure>

* Next, from the **property** dropdown choose the **expereince\_behavior** option.

<figure><img src="https://1136256215-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUgAFLO61VraHX8jwLt%2Fuploads%2FBbE8IbVIlaaskcqekZ2p%2Fimage%20(17).png?alt=media&#x26;token=653b14a2-7a2e-4835-9f3d-5d8b3b534178" alt=""><figcaption></figcaption></figure>

* Next, select the **operator** type as **equals** and select the required experience behavior value from the dropdown. Finally click on the **Label Event** button to create a label.&#x20;

<figure><img src="https://1136256215-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUgAFLO61VraHX8jwLt%2Fuploads%2Fc1Pzn7PaGttTu0gEkn0V%2Fimage%20(18).png?alt=media&#x26;token=67552373-6ecf-44ff-936a-a1e7e7d5c8a8" alt=""><figcaption></figcaption></figure>

* Once the label has been created you can see the summary of the labelled events.

<figure><img src="https://1136256215-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUgAFLO61VraHX8jwLt%2Fuploads%2F6BsAHDBy2eYJ2H4U84SO%2Fimage.png?alt=media&#x26;token=3a97cb24-1514-4360-b7a6-7dd84f783d86" alt=""><figcaption></figcaption></figure>

* If you want to create a Heap Segements then click on the **Segments** option.

<figure><img src="https://1136256215-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUgAFLO61VraHX8jwLt%2Fuploads%2FnjFfGcvRedNk2j3f0N8D%2Fimage%20(19).png?alt=media&#x26;token=b933954b-fca7-4285-8c18-ed4692046165" alt=""><figcaption></figcaption></figure>

* Next, click on the **Define segment** button.

<figure><img src="https://1136256215-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUgAFLO61VraHX8jwLt%2Fuploads%2FrNqePk8PZHaaQYXdpFkX%2Fimage%20(17).png?alt=media&#x26;token=6373fb5d-56ee-44ac-b6aa-f691fe592002" alt=""><figcaption></figcaption></figure>

* Select the **Category** as **Custom Events**.

<figure><img src="https://1136256215-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUgAFLO61VraHX8jwLt%2Fuploads%2F9JJuUXhYjFjTHzgAqUzD%2Fimage%20(18).png?alt=media&#x26;token=20925cac-92fb-4178-8377-9b71e62bdaa8" alt=""><figcaption></figcaption></figure>

* Give the segment name as CustomFit Experience Behavior. Alternatively, you can specify any name that would identify the segment—for instance, the name of an experienced behaviour. Then click on the **Add filter** option.&#x20;

<figure><img src="https://1136256215-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUgAFLO61VraHX8jwLt%2Fuploads%2FFtpxM80bfSOhnoKtN5n5%2Fimage%20(19).png?alt=media&#x26;token=684e3c16-56ae-4188-9a71-d7ef81871a88" alt=""><figcaption></figcaption></figure>

* Under the **Edit segment criteria** click on the property option and **choose users who have done** from the dropdown.&#x20;
* Then, from the event dropdown select the required **event**. For example, CustomFit Experience behavior.&#x20;
* Then, specify the **time range** and click on the **Label segment** button.&#x20;

<figure><img src="https://1136256215-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUgAFLO61VraHX8jwLt%2Fuploads%2FFCzVKySNQeQKliBBUmTg%2Fimage%20(20).png?alt=media&#x26;token=a501a545-7004-462a-91e9-31776f15aa82" alt=""><figcaption></figcaption></figure>
