Skip to main content
The Get Window Data command (Command Type: 7) retrieves a value at a specified path in the browser’s window object and optionally transforms it using an ObjectMapper.

Command Type

Command Type ID: 7

Parameters

ParameterTypeDescriptionRequired
pathArray of string or numberPath to the desired property in the window objectYes
timeoutnumberTimeout in millisecondsYes
mapperObjectMapperOptional mapper for transforming extracted dataNo

ObjectMapper

FieldTypeDescription
propertiesArray of stringProperties to include (all if omitted)
mappersArray of PropertyMapperProperty-level nested mappers
globalMappersArray of PropertyMapperMappers applied globally to matching properties

Usage Examples

Get a Window Property

{
  "command": "get-window-data",
  "params": {
    "path": ["app", "state", "currentUser"],
    "timeout": 10000
  }
}

Get and Filter Properties

{
  "command": "get-window-data",
  "params": {
    "path": ["dataLayer", 0],
    "timeout": 10000,
    "mapper": {
      "properties": ["eventName", "eventData"]
    }
  }
}