> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bringits.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Window Data

> Retrieve and optionally map data from the browser window object

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

| Parameter   | Type                      | Description                                         | Required |
| ----------- | ------------------------- | --------------------------------------------------- | -------- |
| **path**    | Array of string or number | Path to the desired property in the `window` object | Yes      |
| **timeout** | number                    | Timeout in milliseconds                             | Yes      |
| **mapper**  | ObjectMapper              | Optional mapper for transforming extracted data     | No       |

### ObjectMapper

| Field             | Type                    | Description                                     |
| ----------------- | ----------------------- | ----------------------------------------------- |
| **properties**    | Array of string         | Properties to include (all if omitted)          |
| **mappers**       | Array of PropertyMapper | Property-level nested mappers                   |
| **globalMappers** | Array of PropertyMapper | Mappers applied globally to matching properties |

## Usage Examples

### Get a Window Property

```json theme={null}
{
  "command": "get-window-data",
  "params": {
    "path": ["app", "state", "currentUser"],
    "timeout": 10000
  }
}
```

### Get and Filter Properties

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

## Related Commands

* [Get Window Data Simple](/stream/commands/browser/get-window-data-simple) - Simpler dot-path variant
* [Set Window Data](/stream/commands/browser/set-window-data) - Write a value to the window object
