# Heap

> Enable Heap Analytics on your HowdyGo demos to track user interactions and gain insights into demo performance. Follow our guide to set up Heap integration, including modifying the embed code and testing event flow.

> [!NOTE]
> **The Heap integration** is available on the **Pro** plan and above.

The Heap integration allows you to send events to your Heap instance.

> [!TIP]
> **Note:** This is available only on pages where a demo is embedded.

## Setup

1. Make sure Heap is installed and setup on your website.
2. Enable HowdyGo to send events to Heap by modifying the script tag from the "Website embed" code in your website by adding `data-hg-heap` to the tag.

  ```html
  <script data-hg-heap src="https://js.howdygo.com/v1.2.1/index.js"></script>
  ```

3. Test to make sure it is working as expected and events are flowing through. The [Live data feed](https://help.heap.io/data-management/data-management-features/qa-events-with-live-data-feed/) is very useful for testing here

## Events

### Session start
When a prospect starts a session

```json
{
  "event": "howdygo_session_start",
  "properties": {
    "demo_id": {
      "type": "string",
      "format": "uuid"
    },
    "demo_title": {
      "type": "string"
    },
    "demo_url": {
      "type": "string",
      "format": "uuid"
    }
  }
}
```

### Step Viewed
When a prospect views a step of a demo

```json
{
  "event": "howdygo_step_viewed",
  "properties": {
    "demo_id": {
      "type": "string",
      "format": "uuid"
    },
    "demo_title": {
      "type": "string"
    },
    "demo_url": {
      "type": "string",
      "format": "uuid"
    },
    "step_id": {
      "type": "string",
      "format": "uuid"
    },
    "step_index": {
      "type": "number"
    }
  }
}
```

### CTA Click
When a prospect clicks on a call to action

```json
{
  "event": "howdygo_cta_click",
  "properties": {
    "demo_id": {
      "type": "string",
      "format": "uuid"
    },
    "demo_title": {
      "type": "string"
    },
    "demo_url": {
      "type": "string",
      "format": "uuid"
    },
    "cta_id": {
      "type": "string",
      "format": "uuid"
    },
    "cta_url": {
      "type": "string",
      "format": "uuid"
    }
  }
}
```

### Player end
When a prospect completes a demo

```json
{
  "event": "howdygo_player_end",
  "properties": {
    "demo_id": {
      "type": "string",
      "format": "uuid"
    },
    "demo_title": {
      "type": "string"
    },
    "demo_url": {
      "type": "string",
      "format": "uuid"
    }
  }
}
```
