Setting up Glean.js
Initializing Glean.js
Glean.js must be initialized to collect data and send pings.
Glean.initialize
Configuration
object
Glean.js-specific configuration options:
enableAutoPageLoadEvents
: Enables automatic page load events.enableAutoElementClickEvents
: Enables automatic click events.sessionLengthInMinutesOverride
: Overrides the default session length of 30 minutes.experimentationId
: Experimentation identifier to be set in all pings.
Full list of configuration options
When to initialize
Glean.js should be initialized as soon as possible at the start of the application. You should set all debugging options prior to Glean.initialize
.