---
title: "JavaScript SDK: Environment"
description: "Set the environment attached to feedback reports with the Gleap JavaScript SDK. Follow the integration code examples."
url: https://docs.gleap.ai/en/articles/422-javascript-sdk-environment
collection: "JavaScript"
updated: 2026-11-01
language: en
---

# JavaScript SDK: Environment

Set the environment attached to feedback reports with the Gleap JavaScript SDK. Follow the integration code examples.

Gleap allows you to set the environment. The environment will be displayed along the environment data.

```javascript
Gleap.setEnvironment("dev");
```

The environment is set to 'prod' as default value. Possible values are: "dev" | "staging" | "prod".

`setEnvironment` only sets the `environment` field of the environment data; to leave out other fields or turn off environment data entirely, see [Environment data](https://gleap-developer-docs.gleap.help/en/articles/410-javascript-sdk-environment-data).

## Related

- [JavaScript SDK setup](https://docs.gleap.ai/en/articles/393-javascript-sdk-setup.md)
- [JavaScript SDK: Code snippet](https://docs.gleap.ai/en/articles/394-javascript-sdk-code-snippet.md)
- [JavaScript SDK: User identity](https://docs.gleap.ai/en/articles/395-javascript-sdk-user-identity.md)
- [JavaScript SDK: Callbacks](https://docs.gleap.ai/en/articles/396-javascript-sdk-callbacks.md)
- [JavaScript SDK: AI chatbar](https://docs.gleap.ai/en/articles/397-javascript-sdk-ai-chatbar.md)
