# Heap Analytics

**Heap** is a Product Analytics company that provides analytics infrastructure and helps their clients to focus on discovering insights and taking action, not writing tracking code.

The Heap Analytics integration allows you to send the AB Tasty campaign data to your Heap Analytics project.

## How Campaign Data Is Sent <a href="#h_01hdh9ty3e6rjw6tqsqpsmrma3" id="h_01hdh9ty3e6rjw6tqsqpsmrma3"></a>

AB Tasty campaign data is set as Heap **event properties** so that all Heap events that fire will contain the AB Tasty campaign data. The properties are set with an event. Here are the event properties set by AB Tasty:

* Event name is “**abtasty**”
* **abtasty\_campaign** contains the **Campaign ID** and **Campaign Name** formatted as **\[campaign\_id] campaign\_name**
* **abtasty\_variation**contains the **Variation ID** and **Variation Name** formatted as **\[variation\_id] variation\_name**

Event is sent using the `heap.track()` method and event properties are set using the `heap.addEventProperties()` method.

More information about Heap properties and event properties is [***here***](https://help.heap.io/define-analyze/data-management/creating-and-managing-properties/#intro-to-properties)***.***

## How to set up the integration <a href="#h_01hdh9ty3e9g2x2dmafq3skdv1" id="h_01hdh9ty3e9g2x2dmafq3skdv1"></a>

You can set up the integration in AB Tasty:

![](https://2350286830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6Yw9IRJ6KbbucQPwZUCZ%2Fuploads%2Fgit-blob-0568dba22e292eab0214439ce12fce0724ed6555%2Ff5d76d6c040d124248fe8139ccc90b49.png?alt=media)

1. Access **Integrations > Integration Hub**.
2. Search for and select **Heap Analytics**.
3. Click **Setup connector.**
4. Give a name to your connector so you can easily retrieve it.
5. \[Optional] Check the box to automatically add the connector to your future campaigns.
6. Click **Save and create connector.**

If you have checked the box, the connector will be automatically added to the Advanced step of your future campaigns. However, it is not applied retroactively to previously created campaigns.

If you left the box unchecked (default behavior), your connector won't be added automatically. You can still decide to send campaign data to your connector by selecting it from the *Advanced options* step of your campaign. More information on how to link a campaign is can be found in the [Advanced Options Step ](https://docs.abtasty.com/web-experimentation-and-personalization/campaign-flow-advanced-options)article.

You can also modify this behavior from the Integration hub, by editing your connector configuration (check or uncheck box).

**Heads up** ⚡\
You must update the **AB Tasty** tag to make your changes live.

More information on how to analyze A/B testing data within Heap Analytics is [***here***](https://help.heap.io/define-analyze/analysis-features/a-b-testing/)***.***

## Integration check <a href="#h_01hdh9ty3e4rwdna2d7gbs493g" id="h_01hdh9ty3e4rwdna2d7gbs493g"></a>

⭐️**Tip(s):** This integration relies on the presence of the Heap SDK in the webpage's global scope. You can make sure this is the case by running **window\.hea**p"\* in your developer tool console. If it is not undefined, the integration can work.

To test this integration, please open [***Heap’s live event visualizer***](https://heapanalytics.com/app/live), and browse any page of your website on which an AB Tasty campaign is running. If the integration is working, an **AB Tasty** event will soon appear in the live event visualizer.\
\
If you click on it, you will see that this event contains data describing the current campaign.

<figure><img src="https://2350286830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6Yw9IRJ6KbbucQPwZUCZ%2Fuploads%2Fgit-blob-9fa3e93037ffcfbf3b9f9eef4f5b8f8e60056787%2F5458908f3fbb77a35879f7a7eec9193a.png?alt=media" alt="" width="563"><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://docs.abtasty.com/integrations/push-integrations/heap-analytics.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.
