# @coveo/relay

> A library for sending analytics events using Coveo's Event protocol.

Latest version **2.1.3** (published 2026-08-04) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @coveo/relay
pnpm add @coveo/relay
yarn add @coveo/relay
bun add @coveo/relay
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.1.3 |
| Published | 2026-08-04 |
| First published | 2022-02-02 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM |
| Node | ^20.9.0 \|\| ^22.11.0 \|\| ^24.11.0 |
| Dependencies | 2 |
| Unpacked size | 117.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 70 |
| Author | Coveo |
| Maintainers | oa-npmcoveo |
| Keywords | Coveo, Event Protocol, analytics, event |

## Links

- npm: https://www.npmjs.com/package/@coveo/relay
- Repository: https://github.com/coveo/ui-kit
- Homepage: https://github.com/coveo/ui-kit/tree/main/packages/relay#readme
- Issues: https://github.com/coveo/ui-kit/issues
- npm.io page: https://npm.io/package/@coveo/relay

## Dependencies (2)

- [uuid](https://npm.io/package/uuid.md) 14.0.1
- [@coveo/explorer-messenger](https://npm.io/package/@coveo/explorer-messenger.md) 0.5.0

## Alternatives

- [async-exit-hook](https://npm.io/package/async-exit-hook.md) — 3.7M weekly downloads
- [evnty](https://npm.io/package/evnty.md) — 7.2K weekly downloads
- [eleventy-plugin-asciidoc](https://npm.io/package/eleventy-plugin-asciidoc.md) — 3.5K weekly downloads
- [@jswork/next-get2get](https://npm.io/package/@jswork/next-get2get.md) — 945 weekly downloads
- [@dashersw/axon](https://npm.io/package/@dashersw/axon.md) — 934 weekly downloads

## Recent versions

- 2.1.3 (latest) — 2026-08-04
- 2.1.1 (beta) — 2026-03-20
- 2.1.2 — 2026-07-27
- 2.0.4 — 2026-02-24
- 2.0.3 — 2026-02-19
- 2.0.2 — 2026-02-17
- 2.0.1 — 2026-02-12
- 2.0.0 — 2026-02-04
- 1.2.15 — 2026-01-27
- 1.2.14 — 2025-10-28
- 1.2.13 — 2025-10-22
- 1.2.12 — 2025-10-21
- 1.2.11 — 2025-10-02
- 1.2.10 — 2025-09-23
- 1.2.9 — 2025-09-15
- … 70 more at https://npm.io/package/@coveo/relay/versions

## README

# @coveo/relay

Relay is a compact library for emitting Event Protocol analytics events. It simplifies tracking relevant user interactions. This analytics data powers reports and helps train Coveo Machine Learning models.

## Usage

First, create an instance of Relay in your project. This instance can then be used to emit an event or perform other actions.

```js
import { createRelay } from "@coveo/relay";

const config = {...};
const relay = createRelay(config);

const payload = {...};
relay.emit('itemView', payload);
```

## Official documentation

- [Learn more about Relay](https://docs.coveo.com/en/relay/latest/)
- [List of Event API schemas and reference types](https://docs.coveo.com/en/n9da0377/build-a-search-ui/event-api-reference)

---
_Source: https://npm.io/package/@coveo/relay · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
