# Google Analytics

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

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

The Google Analytics (GA4) integration allows you to send analytics to your GA property. For more on HowdyGo's built-in analytics, see the [analytics dashboard](https://docs.howdygo.com/grow).

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

## Setup

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

  ```html
  <script data-hg-ga 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 [Google Tag Assistant](https://tagassistant.google.com/) is extremely useful here.

## Events

### Session start
When a prospect starts a session

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

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

```json
{
  "event": "howdygo_step_viewed",
  "params": {
    "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"
    }
  },
  "timestamp_micros": {
    "type": "string",
    "format": "timestamp"
  }
}
```

### Demo Engagement
When a prospect engages with a demo (clicks next on the first step)

```json
{
  "event": "howdygo_demo_engagement",
  "params": {
    "demo_id": {
      "type": "string",
      "format": "uuid"
    },
    "demo_title": {
      "type": "string"
    },
    "demo_url": {
      "type": "string",
      "format": "uuid"
    }
  },
  "timestamp_micros": {
    "type": "string",
    "format": "timestamp"
  }
}
```

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

```json
{
  "event": "howdygo_cta_click",
  "params": {
    "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"
    }
  },
  "timestamp_micros": {
    "type": "string",
    "format": "timestamp"
  }
}
```

### Player end
When a prospect completes a demo

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