Inactivity Handling

Users may walk away from their device or fail to close the experience. It is best practice for Metalitix to stop recording data to prevent negative influence on some metrics.

By default, Metalitix will automatically stop recording session metrics after 2 minutes of user inactivity (120,000 milliseconds).

The inactivity interval can be changed in the Metalitix 8th Wall module's settings, where it is by default set to 120000 milliseconds.

The Metalitix Logger also provides functions for listening into inactivity events.

// Import the Metalitix logger from the 8th Wall Metalitix module.
import { getMetalitixLogger } from 'metalitix-aframe'
const logger = getMetalitixLogger()
FunctionDescription

logger.addInactivityListener(() => {...})

Adds a callback when a session is automatically stopped due to inactivity.

logger.clearInactivityListeners()

Removes all inactivity callbacks.

Last updated