# gatsby-telemetry

> Gatsby Telemetry

Latest version **4.14.0** (published 2024-11-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install gatsby-telemetry
pnpm add gatsby-telemetry
yarn add gatsby-telemetry
bun add gatsby-telemetry
```

## Health

**Score 50/100 (C)** — status: stable.

Positive: no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no types; no esm support.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 4.14.0 |
| Published | 2024-11-06 |
| First published | 2019-03-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=18.0.0 |
| Dependencies | 5 |
| Unpacked size | 122.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 55944 |
| Author | Jarmo Isotalo |
| Maintainers | mlgualtieri-gatsby, serhalp-netlify, kathmbeck, pieh, tylerbarnes, daniellewgatsby, fk |
| Keywords | telemetry |

## Links

- npm: https://www.npmjs.com/package/gatsby-telemetry
- Repository: https://github.com/gatsbyjs/gatsby
- Homepage: https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-telemetry#readme
- Issues: https://github.com/gatsbyjs/gatsby/issues
- npm.io page: https://npm.io/package/gatsby-telemetry

## Dependencies (5)

- [git-up](https://npm.io/package/git-up.md) ^7.0.0
- [fs-extra](https://npm.io/package/fs-extra.md) ^11.2.0
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.20.13
- [@babel/code-frame](https://npm.io/package/@babel/code-frame.md) ^7.18.6
- [gatsby-core-utils](https://npm.io/package/gatsby-core-utils.md) ^4.14.0

## Recent versions

- 4.14.0 (latest) — 2024-11-06
- 4.15.0-next.0 (next) — 2024-11-07
- 2.15.0 (latest-v3) — 2022-12-07
- 3.25.0 (latest-v4) — 2022-12-07
- 4.0.0-alpha-drupal-proxyurl.14 (drupal-proxyurl) — 2022-11-22
- 3.14.0-alpha-transformer-json.26 (alpha-transformer-json) — 2022-10-12
- 4.0.0-alpha-v5.d20221012t101120.57 (alpha-v5) — 2022-10-12
- 3.23.0-alpha-preview-gh-api.26 (preview-gh-api) — 2022-09-08
- 3.23.0-alpha-9689ff.25 (alpha-9689ff) — 2022-08-31
- 3.20.0-mdxv4-rc.124 (mdxv4-rc) — 2022-07-27
- 3.18.0-alpha-drupal-self-reference.18 (drupal-self-reference) — 2022-07-19
- 3.18.0-alpha-mdx-v2.68 (alpha-mdx-v2) — 2022-06-30
- 3.15.0-alpha-wp-image-cdn-auth.45 (wp-image-cdn-auth) — 2022-05-20
- 3.9.0-alpha-image-service2.14 (image-cdn) — 2022-02-21
- 3.8.0-alpha-image-service.35 (image-service) — 2022-02-13
- … 463 more at https://npm.io/package/gatsby-telemetry/versions

## README

# gatsby-telemetry

Check out [gatsby.dev/telemetry](https://gatsby.dev/telemetry) for more information.

## API

### captureEvent(type, tags)

Capture an event of type `type` and decorate the generated event with these tags (note: allowed tags are filtered on server side)

### trackCli(type, tags)

_This one does the same thing as the `captureEvent` function described above._

Capture an event of type `type` and decorate the generated event with these tags (note: allowed tags are filtered on server side)

### trackError(type, tags)

Capture an error of type `type`. The exception maybe passed in tags and it will be sanitized to anonymize the contents.

### trackBuildError(type, tags)

Capture an build error of type `type`. The exception maybe passed in tags and it will be sanitize to anonymize the contents.

### setDefaultTags(tags)

Set additional tags to be included in all future events.

### decorateEvent(type, tags)

Attach additional tags to the next event generated of type `type`.

### setTelemetryEnabled(enabled)

Enable or disable the telemetry collection.

### expressMiddleware(type)

Returns a debounced events tracker for collecting general activity information for incoming requests.

## ENV Variables

- Set `GATSBY_TELEMETRY_DEBUG` to `1` to print the telemetry data instead of sending it over
- Set `GATSBY_TELEMETRY_DISABLED` to `1` to opt out of all telemetry
- Set `GATSBY_TELEMETRY_VERBOSE` to `1` to log all telemetry

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