# List tag.js

URL: https://docs.hanzo.ai/docs/openapi/event/get-event-tagjs

> Serves the browser tag that autocaptures pageviews (initial and SPA) and uncaught errors onto the canonical wire at POST /v1/event.

`GET /v1/event/tag.js`

> [Event →](https://docs.hanzo.ai/docs/openapi/event) · [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|               |                                        |
| ------------- | -------------------------------------- |
| **Address**   | `https://api.hanzo.ai/v1/event/tag.js` |
| **Method**    | `GET`                                  |
| **Operation** | `get_event_tag.js`                     |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY` |

Serves the browser tag that autocaptures pageviews (initial and SPA) and uncaught errors onto the canonical wire at POST /v1/event.

Install is one line, and it is the same line for a Hanzo property and for a customer's own page:

\<script defer src="<https://api.hanzo.ai/v1/event/tag.js>" data-key="pk-…">\</script>

`data-key` is the publishable key the project mints; `data-product` optionally names the emitting surface. The key may also ride the src as `?key=` for a host that strips data attributes.

WITHOUT A KEY THE TAG SENDS NOTHING. A keyless beacon is accepted 200 into $public, a reserved tenant the owning org cannot read — so silence is the honest failure, and the tag picks it rather than reporting success into a tenant nobody reads.

## Request

`GET /v1/event/tag.js` takes no parameters and no body — the credential is the whole request.

## Response

| Status | Body   | Meaning |
| ------ | ------ | ------- |
| `2XX`  | string | Success |

`2XX` body — 1 field.

| Field    | In   | Type            | Always | Description |
| -------- | ---- | --------------- | ------ | ----------- |
| `(body)` | body | string (binary) | yes    |             |

Failure carries the platform error shape — see [Errors](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo event tag.js
```

**SDK**

**.ts**

```ts
import { Configuration, EventApi } from 'hanzoai';

const api = new EventApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getEventTagJs();
```

**.py**

```python
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import EventApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = EventApi(client).get_event_tag_js()
```

**.go**

```go
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.EventAPI.GetEventTagJs(context.Background()).Execute()
if err != nil {
	return err
}
```

**.rs**

```rust
use hanzo_client::apis::{configuration::Configuration, event_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = event_api::get_event_tag_js(&cfg, Default::default()).await?;
```

**.java**

```java
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.EventApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new EventApi(client).getEventTagJs();
```

**HTTP**

```bash
curl https://api.hanzo.ai/v1/event/tag.js \
  -H "Authorization: Bearer $HANZO_API_KEY"
```

**MCP**

MCP reaches **event** through the `event` tool, which names its 9 operations with its own verbs — this one among them, under a name only MCP declares. `describe` explains any of them:

```bash
curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "describe",
         "arguments": {
           "op": "get_event_economic"
         }
       }
     }'
```

---

[Event API](https://docs.hanzo.ai/docs/openapi/event) · [All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
