Skip to content

Installing Glean.js

Terminal window
npm i @mozilla/glean

The way you import Glean changes depending on your platform. Please reference the platforms page for more details about available platforms.

Web

Usage

import Glean from '@mozilla/glean/web';

Deprecated platforms

To use the following platforms, you need to use a version of Glean.js <= 2.0.5.

Terminal window
npm i @mozilla/glean@2.0.5

There are two deprecated platforms that can still be used

  1. Web extensions
  2. Node

Web extensions

import Glean from '@mozilla/glean/webext';

Node

import Glean from '@mozilla/glean/node';