After you've created an embed --- which can be done [publicly](https://docs.cloud.google.com/looker/docs/2622/publishing-looks-with-public-urls#public_embedding_with_iframes), [privately](https://docs.cloud.google.com/looker/docs/2622/private-embedding), with [signed embedding](https://docs.cloud.google.com/looker/docs/2622/single-sign-on-embedding), or through the [API](https://docs.cloud.google.com/looker/docs/2622/api-getting-started.md.txt) --- you can interact with those iframes using JavaScript. You can make your page more dynamic based on the status of the embedded item, and you can even make changes to the embedded item from your web page.

Be aware that Looker doesn't control the order in which browsers dispatch events to web applications. This means that the order of events is not guaranteed across browsers or platforms. Be sure to write your JavaScript appropriately to account for the event handling of different browsers.

You can use JavaScript in one of the following ways for Looker embedded content:

- Using Looker's embed Software Development Kit (SDK), described on the [Embed SDK](https://docs.cloud.google.com/looker/docs/2622/embed-sdk.md.txt) documentation page
- Using JavaScript events, described in the [Accessing events in JavaScript](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#event_type_reference) section on this page


## Preparation

Before you can interact with the embedded iframe, follow these steps:

- [Add an ID to the iframe](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#add_id).
- [Add the embed domain to the iframe `src` attribute](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#add_embed_domain).
- [Add the embed domain to the allowlist](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#adding_the_embed_domain_to_the_allowlist).


### Adding an ID to the iframe

Later, when you [retrieve data from the iframe](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#retrieving_data_from_the_iframe), you'll need to validate that the information you're working with has actually come from Looker's iframe. To facilitate this, be sure to add an ID to your iframe, if you haven't done so already. In the following example, you set the ID to `looker` by adding `id="looker"` to the iframe:

```javascript
<iframe id="looker" src="https://instance_name.looker.com/embed/dashboards/1"></iframe>
```


### Adding the embed domain to the iframe `src` attribute

In the iframe's `src` attribute, include the domain where the iframe is being used. In the following example, you can specify `myownpersonaldomain.com` as the domain by adding `?embed_domain=https://myownpersonaldomain.com"` to the end of the URL in the `src` attribute:

```javascript
<iframe
  id="looker"
  src="https://instance_name.looker.com/embed/dashboards/1?embed_domain=https://myownpersonaldomain.com">
</iframe>
```

If you're using [signed embedding](https://docs.cloud.google.com/looker/docs/2622/single-sign-on-embedding), make sure you add the `embed_domain` to the [embed URL](https://docs.cloud.google.com/looker/docs/2622/single-sign-on-embedding#embed_url_2).

> [!TIP]
> **Tip:** Don't include a trailing slash (`/`) in the value that you provide for the `embed_domain` parameter.

If you're using the [Embed SDK](https://docs.cloud.google.com/looker/docs/2622/embed-sdk.md.txt), add `sdk=3` to the end of the embed URL. The `sdk=3` parameter indicates that the SDK is present and that Looker can take advantage of additional features that the SDK provides, such as passing JavaScript events between the Looker iframe and your domain. The SDK can't add this parameter itself because it is part of the signed URL. For example:

```javascript
<iframe
  id="looker"
  src="https://instance_name.looker.com/embed/dashboards/1?embed_domain=https://myownpersonaldomain.com&sdk=2">
</iframe>
```


### Adding the embed domain to the allowlist

Finally, you'll need to add the domain where the iframe is being used to the allowlist on the [**Embed** page of Looker's **Admin** panel](https://docs.cloud.google.com/looker/docs/2622/admin-panel-platform-embed.md.txt) by following these steps:

1. In the **Embedded Domain Allowlist** field, enter the domain where the iframe is being used, and then press the Tab key so that the domain appears in a box within the field.

   > [!IMPORTANT]
   > **Important:** Don't include a trailing slash (`/`) in the domain URL.

2. Click **Update**.

You can use the `*` wildcard in the allowlist to create a domain pattern. For example, `https://*.myownpersonaldomain.com` would allow both `https://analytics.myownpersonaldomain.com` and `https://data.myownpersonaldomain.com`.

If you're using [cookieless embedding](https://docs.cloud.google.com/looker/docs/2622/cookieless-embed.md.txt) with Looker 23.8 or later, the embed domain can be specified when the cookieless session is acquired. This is an alternative to adding the embed domain to the allowlist using the **Admin \> Embed** panel. Review the [security best practices](https://docs.cloud.google.com/looker/docs/2622/security-best-practices-embedded-analytics) if you decide to take advantage of this feature.

## Retrieving data from the iframe

After completing the [preparation steps](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#prep), you can access the events that are passed between the Looker iframe and your domain by listening for [`postMessage`](https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage) events.

> [!IMPORTANT]
> **Important:** Be sure to check that the events have come from the Looker iframe and domain to avoid [malicious messages](https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage#Security_concerns).

The embedded iframe can create a few event types, as described in the [Event type reference](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#event_type_reference) section on this page.

### Accessing events in JavaScript

Here is an example of listening for these events in JavaScript, and then logging the events to the console:

```javascript
window.addEventListener("message", function(event) {
  if (event.source === document.getElementById("looker").contentWindow) {
    if (event.origin === "https://instance_name.looker.com") {
      console.log(JSON.parse(event.data));
    }
  }
});
```

Here is an example of listening for these events in jQuery, then logging them to the console:

```javascript
$(window).on("message", function(event) {
  if (event.originalEvent.source === $("#looker")[0].contentWindow) {
    if (event.origin === "https://instance_name.looker.com") {
      console.log(JSON.parse(event.data));
    }
  }
});
```

### Event type summary table

The following table summarizes event types. Select an event type to see the details about that event.

| Event Type | Event Cause |
|---|---|
| [`dashboard:loaded`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#dashboard:loaded) | On dashboards where the tiles are not set to auto-run, a dashboard and its elements have loaded but queries are not yet running. |
| [`dashboard:run:start`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#dashboard:run:start) | A dashboard has begun loading, and its tiles have started loading and querying for data. |
| [`dashboard:run:complete`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#dashboard:run:complete) | A dashboard has finished running and all tiles have finished loading and querying. |
| [`dashboard:download`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#dashboard:download) | A PDF of a dashboard has started downloading. |
| [`dashboard:edit:start`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#dashboard:edit:start) | Added 22.20 A dashboard has been switched to edit mode. The [`dashboard:save:complete`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#dashboard:save:complete) event will be fired when the dashboard is successfully saved. |
| [`dashboard:edit:cancel`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#dashboard:edit:cancel) | Added 22.20 A dashboard that is in edit mode has been exited from edit mode without saving. |
| [`dashboard:save:complete`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#dashboard:save:complete) | A dashboard has been edited and saved. |
| [`dashboard:delete:complete`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#dashboard:delete:complete) | A dashboard has been deleted. |
| [`dashboard:tile:start`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#dashboard:tile:start) | A tile has started loading or querying for data. |
| [`dashboard:tile:complete`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#dashboard:tile:complete) | A tile has finished running the query. |
| [`dashboard:tile:download`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#dashboard:tile:download) | A tile's data has started downloading. |
| [`dashboard:tile:explore`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#dashboard:tile:explore) | A user has clicked the **Explore From Here** option in a dashboard tile. |
| [`dashboard:tile:merge`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#dashboard:tile:merge) | Added 25.14 A user has clicked the Edit Merged Query button or menu item. |
| [`dashboard:tile:view`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#dashboard:tile:view) | A user has clicked the **View Original Look** option in a dashboard tile. |
| [`dashboard:filters:changed`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#dashboard:filters:changed) | A dashboard's filters have been applied or changed. |
| [`look:ready`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#look:ready) | A Look has begun to load query data, whether the query will run or not. |
| [`look:run:start`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#look:run:start) | A Look has begun to load query data and the query has begun to run. |
| [`look:run:complete`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#look:run:complete) | A Look has finished running the query. |
| [`look:edit:start`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#look:edit:start) | Added 25.10 A Look has been switched to edit mode. The `look:save:complete` event will be fired when the look is saved. |
| [`look:edit:cancel`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#look:edit:cancel) | Added 25.10 A Look that is in edit mode has been exited from edit mode without saving. |
| [`look:save:complete`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#look:save:complete) | A Look has been edited and saved. |
| [`look:delete:complete`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#look:delete:complete) | A Look has been moved into the [**Trash** folder](https://docs.cloud.google.com/looker/docs/2622/admin-spaces.md.txt). |
| [`drillmenu:click`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#drillmenu:click) | A user has clicked on a drill menu in a dashboard that was created with the [`link` LookML parameter](https://docs.cloud.google.com/looker/docs/2622/reference/param-field-link). |
| [`drillmodal:download`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#drillmodal:download) | A user has opened a drill dialog from a dashboard tile and clicked the **Download** option. |
| [`drillmodal:explore`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#drillmodal:explore) | A user has clicked the **Explore From Here** option in a drill dialog. |
| [`explore:ready`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#explore:ready) | An Explore has begun to load query data, whether the query will run or not. |
| [`explore:run:start`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#explore:run:start) | An Explore has begun to load query data and the query has begun to run. |
| [`explore:run:complete`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#explore:run:complete) | An Explore has finished running the query. |
| [`explore:state:changed`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#explore:state:changed) | An Explore page URL has changed as a result of the user's actions. |
| [`merge:ready`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#merge:ready) | A merge query has finished loading initial query data. |
| [`merge:run:start`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#merge:run:start) | A merge query has begun to run. |
| [`merge:run:complete`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#merge:run:complete) | A merge query has finished running the query. |
| [`merge:run:fail`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#merge:run:fail) | A merge query has failed to run and returned an error. |
| [`page:changed`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#page:changed) | A user has navigated to a new page within the iframe. |
| [`page:properties:changed`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#page:properties:changed) | The height of a dashboard iframe has changed. |
| [`session:tokens`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#session:tokens) | The Looker client requires tokens to continue. |
| [`session:expired`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#session:expired) | Added 25.10 The user's session has expired. |
| [`session:status`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#session:status) | Sends information about the status of a session. |
| [`env:client:dialog`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#env:client:dialog) | A dialog has been opened that may partially be out of view, such as a drill dialog. This event enables the hosting application to scroll the dialog into view. |

### Event type reference

The embedded iframe can create many different types of events:

#### `dashboard:loaded`

On dashboards where the tiles are not set to auto-run, this event is created after a dashboard and its elements have loaded but before queries are run.

```javascript

type: "dashboard:loaded",
status: "complete",
dashboard: {
  id: 1,
  title: "Business Pulse",
  canEdit: true,
  dashboard_filters: {
    "date": "Last 6 Years",
    "state": ""
  },
  absoluteUrl: "https://self-signed.looker.com:9999/embed/dashboards/1?embed_domain=https%3A%2F%2Fself-signed.looker.com%3A9999&date=Last+6+Years&state=",
  url: "/embed/dashboards/1?embed_domain=https%3A%2F%2Fself-signed.looker.com%3A9999&date=Last+6+Years&state=",
  options: {
    layouts: [
      {
        id: 1,
        dashboard_id: 1,
        type: "newspaper",
        active: true,
        column_width: null,
        width: null,
        deleted: false,
        dashboard_layout_components: [
          {
            id: 1,
            dashboard_layout_id: 1,
            dashboard_element_id: 1,
            row: 0,
            column: 0,
            width: 8,
            height: 4,
            deleted: false
          },
          {
            id: 2,
            dashboard_layout_id: 1,
            dashboard_element_id: 2,
            row: 0,
            column: 8,
            width: 8,
            height: 4,
            deleted: false
          }
        ]
      }
    ],
    elements: {
      1: {
        title: "Total Orders",
        title_hidden: false,
        vis_config: {
          type: "single_value",
          font_size: "medium",
          title: "Total Orders"
        }
      },
      2: {
        title: "Average Order Profit",
        title_hidden: false,
        vis_config: {
          type: "single_value",
          title: "Average Order Profit"
        }
      }
    }
  }
}
```

| Attribute | Format | Description |
|---|---|---|
| `status` | String | Indicates whether the dashboard and its elements have successfully loaded. |
| `dashboard.id` | Number/String | The ID of the dashboard. |
| `dashboard.title` | String | The title, as shown at the top of the dashboard. |
| `dashboard.canEdit` | Boolean | Added 22.20 When `true`, the user can edit the dashboard. |
| `dashboard.dashboard_filters` | Object | The filters applied to the dashboard. This object has the format: `{"Filter name 1": "value 1", "Filter name 2": "value 2", ...}` |
| `dashboard.absoluteUrl` | String | The full dashboard URL. |
| `dashboard.url` | String | The relative dashboard URL (just the path). |
| `dashboard.options` | Object | The [dashboard layout](https://docs.cloud.google.com/looker/docs/reference/looker-api/latest/methods/Dashboard/dashboard_layout.md.txt), [dashboard layout component](https://docs.cloud.google.com/looker/docs/reference/looker-api/latest/methods/Dashboard/dashboard_layout_component.md.txt), and [dashboard element](https://docs.cloud.google.com/looker/docs/reference/looker-api/latest/methods/Dashboard/dashboard_element.md.txt) properties and values. All properties returned in the `options` object can be given updated values using the [`dashboard:options:set`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#dashboard:options:set) event. |

#### `dashboard:run:start`

This event is created when a dashboard has begun loading, when its tiles will start loading and querying for data.

```javascript
type: "dashboard:run:start",
dashboard: {
  id: 23,
  title: "My Dashboard",
  canEdit: true,
  url: "/embed/dashboards/...",
  absoluteUrl: "https://instance_name.looker.com/embed/dashboards/...",
  dashboard_filters: {
    "Date": "Last 28 days",
    "Total Orders": "Greater than 100"
  }
}
```

| Attribute | Format | Description |
|---|---|---|
| `dashboard.id` | Number/String | The ID of the dashboard. |
| `dashboard.title` | String | The title, as shown at the top of the dashboard. |
| `dashboard.canEdit` | Boolean | Added 22.20 When `true`, the user can edit the dashboard. |
| `dashboard.url` | String | The relative dashboard URL (just the path). |
| `dashboard.absoluteUrl` | String | The full dashboard URL. |
| `dashboard.dashboard_filters` | Object | The filters applied to the dashboard. This object has the format: `{"Filter name 1": "value 1", "Filter name 2": "value 2", ...}` |

#### `dashboard:run:complete`

This event is created when a dashboard has finished running and all tiles have finished loading and querying. This event is created whether or not all tiles load successfully.

```javascript
type: "dashboard:run:complete",
status: "complete",
dashboard: {
  id: 23,
  title: "My Dashboard",
  canEdit: true,
  url: "/embed/dashboards/...",
  absoluteUrl: "https://my.looker.com/embed/dashboards/...",
  dashboard_filters: {
    "Date": "Last 28 days",
    "Total Orders": "Greater than 100"
  }
  options: {
    layouts: [
      {
        id: 1,
        dashboard_id: 1,
        type: "newspaper",
        active: true,
        column_width: null,
        width: null,
        deleted: false,
        dashboard_layout_components: [
          {
            id: 1,
            dashboard_layout_id: 1,
            dashboard_element_id: 1,
            row: 0,
            column: 0,
            width: 8,
            height: 4,
            deleted: false
          },
          {
            id: 2,
            dashboard_layout_id: 1,
            dashboard_element_id: 2,
            row: 0,
            column: 8,
            width: 8,
            height: 4,
            deleted: false
          }
        ]
      }
    ],
    elements: {
      1: {
        title: "Total Orders",
        title_hidden: false,
        vis_config: {
          type: "single_value",
          font_size: "medium",
          title: "Total Orders"
        }
      },
      2: {
        title: "Average Order Profit",
        title_hidden: false,
        vis_config: {
          type: "single_value",
          title: "Average Order Profit"
        }
      }
    }
  }
}
```

| Attribute | Format | Description |
|---|---|---|
| `status` | String | Indicates whether the dashboard and its elements have successfully run. If the dashboard and its elements were successfully run, `status` returns `"complete"`; otherwise, `status` returns `"error"`. If the running dashboard was stopped, either from the user interface or with the [`dashboard:stop`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#dashboard:stop) action, `status` will return `"stopped"`. |
| `dashboard.id` | Number/String | The ID of the dashboard. |
| `dashboard.title` | String | The title, as shown at the top of the dashboard. |
| `dashboard.canEdit` | Boolean | Added 22.20 When `true`, the user can edit the dashboard. |
| `dashboard.url` | String | The relative dashboard URL (just the path). |
| `dashboard.absoluteUrl` | String | The full dashboard URL. |
| `dashboard.dashboard_filters` | Object | The filters applied to the dashboard. This object has the format: `{"Filter name 1": "value 1", "Filter name 2": "value 2", ...}` |
| `dashboard.options` | Object | The [dashboard layout](https://docs.cloud.google.com/looker/docs/reference/looker-api/latest/methods/Dashboard/dashboard_layout.md.txt), [dashboard layout component](https://docs.cloud.google.com/looker/docs/reference/looker-api/latest/methods/Dashboard/dashboard_layout_component.md.txt), and [dashboard element](https://docs.cloud.google.com/looker/docs/reference/looker-api/latest/methods/Dashboard/dashboard_element.md.txt) properties and values. All properties returned in the `options` object can be given updated values using the [`dashboard:options:set`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#dashboard:options:set) action. |
| `dashboard.tileStatuses` | Object array | An array of objects providing tile statuses. Object properties are: <br /> - `tileId` --- the ID number of tile. - `status` --- If the tile query was successfully run, `status` returns `"complete"`; otherwise, `status` returns `"error"`. - `errors` --- Populated when the `status` property is `"error"`. An array of objects providing details of the error, including the error message text, a more detailed description of the error, and the tile's SQL query that produced the error. |

#### `dashboard:download`

This event is created when a PDF of a dashboard has started downloading.

```javascript
type: "dashboard:download",
dashboard: {
  id: 23,
  title: "My Dashboard",
  canEdit: true,
  url: "/embed/dashboards/...",
  absoluteUrl: "https://instance_name.looker.com/embed/dashboards/...",
  dashboard_filters: {
    "Date": "Last 28 days",
    "Total Orders": "Greater than 100"
  }
}
fileFormat: "pdf"
```

| Attribute | Format | Description |
|---|---|---|
| `dashboard.id` | Number/String | The ID of the dashboard. |
| `dashboard.title` | String | The title, as shown at the top of the dashboard. |
| `dashboard.canEdit` | Boolean | Added 22.20 When `true`, the user can edit the dashboard. |
| `dashboard.url` | String | The relative dashboard URL (just the path). |
| `dashboard.absoluteUrl` | String | The full dashboard URL. |
| `dashboard.dashboard_filters` | Object | The filters applied to the dashboard. This object has the format: `{"Filter name 1": "value 1", "Filter name 2": "value 2", ...}` |
| `fileFormat` | String | The format of the downloaded dashboard (only `"pdf"` at this time). |

#### `dashboard:edit:start`


Added 22.20
This event is created when a dashboard is [switched into edit mode](https://docs.cloud.google.com/looker/docs/2622/editing-user-defined-dashboards.md.txt#entering_edit_mode_in_dashboards).

```javascript
type: "dashboard:edit:start",
dashboard: {
  id: 23,
  title: "My Dashboard",
  canEdit: true,
  url: "/embed/dashboards/...",
  absoluteUrl: "https://instance_name.looker.com/embed/dashboards/...",
  dashboard_filters: {
    "Date": "Last 28 days",
    "Total Orders": "Greater than 100"
  }
}
```

| Attribute | Format | Description |
|---|---|---|
| `dashboard.id` | Number/String | The ID of the dashboard. |
| `dashboard.title` | String | The title, as shown at the top of the dashboard. |
| `dashboard.canEdit` | Boolean | Added 22.20 When `true`, the user can edit the dashboard. |
| `dashboard.url` | String | The relative dashboard URL (just the path). |
| `dashboard.absoluteUrl` | String | The full dashboard URL. |
| `dashboard.dashboard_filters` | Object | The filters applied to the dashboard. This object has the format: `{"Filter name 1": "value 1", "Filter name 2": "value 2", ...}` |

#### `dashboard:edit:cancel`


Added 22.20
This event is created when a dashboard that is in [edit mode](https://docs.cloud.google.com/looker/docs/2622/editing-user-defined-dashboards.md.txt#entering_edit_mode_in_dashboards) is exited from edit mode without saving.

```javascript
type: "dashboard:edit:cancel",
dashboard: {
  id: 23,
  title: "My Dashboard",
  canEdit: true,
  url: "/embed/dashboards/...",
  absoluteUrl: "https://instance_name.looker.com/embed/dashboards/...",
  dashboard_filters: {
    "Date": "Last 28 days",
    "Total Orders": "Greater than 100"
  }
}
```

| Attribute | Format | Description |
|---|---|---|
| `dashboard.id` | Number/String | The ID of the dashboard. |
| `dashboard.title` | String | The title, as shown at the top of the dashboard. |
| `dashboard.canEdit` | Boolean | Added 22.20 When `true`, the user can edit the dashboard. |
| `dashboard.url` | String | The relative dashboard URL (just the path). |
| `dashboard.absoluteUrl` | String | The full dashboard URL. |
| `dashboard.dashboard_filters` | Object | The filters applied to the dashboard. This object has the format: `{"Filter name 1": "value 1", "Filter name 2": "value 2", ...}` |

#### `dashboard:save:complete`

This event is created when a dashboard is [edited and then saved](https://docs.cloud.google.com/looker/docs/2622/editing-user-defined-dashboards.md.txt#entering_edit_mode_in_dashboards).

```javascript
type: "dashboard:save:complete",
dashboard: {
  id: 23,
  title: "My Dashboard",
  canEdit: true,
  dashboard_filters: {
    "Date": "Last 28 days",
    "Total Orders": "Greater than 100"
  }
  absoluteUrl: "https://instance_name.looker.com/embed/dashboards/...",
  url: "/embed/dashboards/...",
  options: {
    layouts: [
      {
        id: 1,
        dashboard_id: 1,
        type: "newspaper",
        active: true,
        column_width: null,
        width: null,
        deleted: false,
        dashboard_layout_components: [
          {
            id: 1,
            dashboard_layout_id: 1,
            dashboard_element_id: 1,
            row: 0,
            column: 0,
            width: 8,
            height: 4,
            deleted: false
          },
          {
            id: 2,
            dashboard_layout_id: 1,
            dashboard_element_id: 2,
            row: 0,
            column: 8,
            width: 8,
            height: 4,
            deleted: false
          }
        ]
      }
    ],
    elements: {
      1: {
        title: "Total Orders",
        title_hidden: false,
        vis_config: {
          type: "single_value",
          font_size: "medium",
          title: "Total Orders"
        }
      },
      2: {
        title: "Average Order Profit",
        title_hidden: false,
        vis_config: {
          type: "single_value",
          title: "Average Order Profit"
        }
      }
    }
  }
}
```

| Attribute | Format | Description |
|---|---|---|
| `dashboard.id` | Number/String | The ID of the dashboard. |
| `dashboard.title` | String | The title, as shown at the top of the dashboard. |
| `dashboard.canEdit` | Boolean | Added 22.20 When `true`, the user can edit the dashboard. |
| `dashboard.dashboard_filters` | Object | The filters applied to the dashboard. This object has the format: `{"Filter name 1": "value 1", "Filter name 2": "value 2", ...}` |
| `dashboard.absoluteUrl` | String | The full dashboard URL. |
| `dashboard.url` | String | The relative dashboard URL (just the path). |
| `dashboard.options` | Object | The [dashboard layout](https://docs.cloud.google.com/looker/docs/reference/looker-api/latest/methods/Dashboard/dashboard_layout.md.txt), [dashboard layout component](https://docs.cloud.google.com/looker/docs/reference/looker-api/latest/methods/Dashboard/dashboard_layout_component.md.txt), and [dashboard element](https://docs.cloud.google.com/looker/docs/reference/looker-api/latest/methods/Dashboard/dashboard_element.md.txt) properties and values. All properties returned in the `options` object can be given updated values using the [`dashboard:options:set`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#dashboard:options:set) event. |

#### `dashboard:delete:complete`

This event is created when a [dashboard is deleted](https://docs.looker.com/dashboards/editing-dashboards-beta#deleting_dashboards).

```javascript
type: "dashboard:delete:complete",
dashboard: {
  id: 23,
  title: "My Dashboard",
  canEdit: true,
  dashboard_filters: {
    "Date": "Last 28 days",
    "Total Orders": "Greater than 100"
  }
  absoluteUrl: "https://instance_name.looker.com/embed/dashboards/...",
  url: "/embed/dashboards/...",
  options: {
    layouts: [
      {
        id: 1,
        dashboard_id: 1,
        type: "newspaper",
        active: true,
        column_width: null,
        width: null,
        deleted: false,
        dashboard_layout_components: [
          {
            id: 1,
            dashboard_layout_id: 1,
            dashboard_element_id: 1,
            row: 0,
            column: 0,
            width: 8,
            height: 4,
            deleted: false
          },
          {
            id: 2,
            dashboard_layout_id: 1,
            dashboard_element_id: 2,
            row: 0,
            column: 8,
            width: 8,
            height: 4,
            deleted: false
          }
        ]
      }
    ],
    elements: {
      1: {
        title: "Total Orders",
        title_hidden: false,
        vis_config: {
          type: "single_value",
          font_size: "medium",
          title: "Total Orders"
        }
      },
      2: {
        title: "Average Order Profit",
        title_hidden: false,
        vis_config: {
          type: "single_value",
          title: "Average Order Profit"
        }
      }
    }
  }
}
```

| Attribute | Format | Description |
|---|---|---|
| `dashboard.id` | Number/String | The ID of the dashboard. |
| `dashboard.title` | String | The title, as shown at the top of the dashboard. |
| `dashboard.canEdit` | Boolean | Added 22.20 When `true`, the user can edit the dashboard. |
| `dashboard.dashboard_filters` | Object | The filters applied to the dashboard. This object has the format: `{"Filter name 1": "value 1", "Filter name 2": "value 2", ...}` |
| `dashboard.absoluteUrl` | String | The full dashboard URL. |
| `dashboard.url` | String | The relative dashboard URL (just the path). |
| `dashboard.options` | Object | The [dashboard layout](https://docs.cloud.google.com/looker/docs/reference/looker-api/latest/methods/Dashboard/dashboard_layout.md.txt), [dashboard layout component](https://docs.cloud.google.com/looker/docs/reference/looker-api/latest/methods/Dashboard/dashboard_layout_component.md.txt), and [dashboard element](https://docs.cloud.google.com/looker/docs/reference/looker-api/latest/methods/Dashboard/dashboard_element.md.txt) properties and values. All properties returned in the `options` object can be given updated values using the [`dashboard:options:set`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#dashboard:options:set) event. |

#### `dashboard:tile:start`

This event is created when a tile starts loading or querying for data.

```javascript
type: "dashboard:tile:start",
dashboard: {
  id: 23,
  title: "My Dashboard",
  canEdit: true,
  url: "/embed/dashboards/...",
  absoluteUrl: "https://instance_name.looker.com/embed/dashboards/...",
  dashboard_filters: {
    "Date": "Last 28 days",
    "Total Orders": "Greater than 100"
  }
}
tile: {
  id: 123,
  title: "Quarterly Sales",
  listen: {
    "Date": "order.date",
    "Total Orders": "order.count"
  }
}
```

| Attribute | Format | Description |
|---|---|---|
| `dashboard.id` | Number/String | The ID of the dashboard to which the tile belongs. |
| `dashboard.title` | String | The dashboard title, as shown at the top of the dashboard to which the tile belongs. |
| `dashboard.canEdit` | Boolean | Added 22.20 When `true`, the user can edit the dashboard. |
| `dashboard.url` | String | The relative dashboard URL (just the path) to which the tile belongs. |
| `dashboard.absoluteUrl` | String | The full dashboard URL to which the tile belongs. |
| `dashboard.dashboard_filters` | Object | The filters applied to the dashboard to which the tile belongs. This object has the format: `{"Filter name 1": "value 1", "Filter name 2": "value 2", ...}` |
| `tile.id` | Integer | The ID number of the event, not the tile. |
| `tile.title` | String | The tile title, as shown at the top of the tile. |
| `tile.listen` | Object | The global dashboard filters this tile is listening for. This object has the format: `{"Filter Label": "Filter Field", ...}` |

#### `dashboard:tile:complete`

This event is created when a tile has finished running the query.

```javascript
type: "dashboard:tile:complete",
dashboard: {
  id: 23,
  title: "My Dashboard",
  canEdit: true,
  url: "/embed/dashboards/...",
  absoluteUrl: "https://instance_name.looker.com/embed/dashboards/...",
  dashboard_filters: {
    "Date": "Last 28 days",
    "Total Orders": "Greater than 100"
  }
}
status: "complete",
truncated: false,
tile: {
  id: 123,
  title: "Quarterly Sales",
  listen: {
    "Date": "order.date",
    "Total Orders": "order.count"
  }
}
```

| Attribute | Format | Description |
|---|---|---|
| `dashboard.id` | Number/String | The ID of the dashboard to which the tile belongs. |
| `dashboard.title` | String | The dashboard title, as shown at the top of the dashboard to which the tile belongs. |
| `dashboard.canEdit` | Boolean | Added 22.20 When `true`, the user can edit the dashboard. |
| `dashboard.url` | String | The relative dashboard URL (just the path) to which the tile belongs. |
| `dashboard.absoluteUrl` | String | The full dashboard URL to which the tile belongs. |
| `dashboard.dashboard_filters` | Object | The filters applied to the dashboard to which the tile belongs. This object has the format: `{"Filter name 1": "value 1", "Filter name 2": "value 2", ...}` |
| `status` | String | Whether the tile query completed successfully. Possible values are `"complete"` or `"error"`. |
| `truncated` | Boolean | Whether the tile query results were truncated as a result of the query returning more rows than the query row limit. The row limit could be either a user-specified row limit or the Looker default row limit of 5,000. |
| `tile.id` | Integer | The ID number of the event, not the tile. |
| `tile.title` | String | The tile title, as shown at the top of the tile. |
| `tile.listen` | Object | The global dashboard filters this tile is listening for. This object has the format: `{"Filter Label": "Filter Field", ...}` |
| `tile.errors` | Object array | Populated when the `status` property is `"error"`. An array of objects providing details of the error, including the error message text, a more detailed description of the error, and the tile's SQL query that produced the error. |

#### `dashboard:tile:download`

This event is created when a tile's data has started downloading.

```javascript
type: "dashboard:tile:download",
dashboard: {
  id: 23,
  title: "My Dashboard",
  canEdit: true,
  url: "/embed/dashboards/...",
  absoluteUrl: "https://instance_name.looker.com/embed/dashboards/...",
  dashboard_filters: {
    "Date": "Last 28 days",
    "Total Orders": "Greater than 100"
  }
}
tile: {
  id: 123,
  title: "Quarterly Sales"
  listen: {
    "Date": "order.date",
    "Total Orders": "order.count"
  }
}
fileFormat: "pdf"
```

| Attribute | Format | Description |
|---|---|---|
| `dashboard.id` | Number/String | The ID of the dashboard to which the tile belongs. |
| `dashboard.title` | String | The dashboard title, as shown at the top of the dashboard to which the tile belongs. |
| `dashboard.canEdit` | Boolean | Added 22.20 When `true`, the user can edit the dashboard. |
| `dashboard.url` | String | The relative dashboard URL (just the path) to which the tile belongs. |
| `dashboard.absoluteUrl` | String | The full dashboard URL to which the tile belongs. |
| `dashboard.dashboard_filters` | Object | The filters applied to the dashboard to which the tile belongs. This object has the format: `{"Filter name 1": "value 1", "Filter name 2": "value 2", ...}` |
| `tile.id` | Integer | The ID number of the event, not the tile. |
| `tile.title` | String | The tile title, as shown at the top of the tile. |
| `tile.listen` | Object | The global dashboard filters this tile is listening for. This object has the format: `{"Filter Label": "Filter Field", ...}` |
| `fileFormat` | String | The format of the downloaded tile (only `"pdf"` at this time). |

#### `dashboard:tile:explore`

This event is created when a user clicks the **Explore From Here** option in a dashboard tile.

This event is cancellable, meaning that the embedding application can return `{cancel: true}` and Looker won't proceed with the triggering event.

```javascript
type: "dashboard:tile:explore",
label: 'Explore From Here',
url: '/embed/explore/model/view...',
dashboard: {
  id: 23,
  title: "My Dashboard",
  canEdit: true,
  url: "/embed/dashboards/...",
  absoluteUrl: "https://instance_name.looker.com/embed/dashboards/...",
  dashboard_filters: {
    "Date": "Last 28 days",
    "Total Orders": "Greater than 100"
  }
}
tile: {
  id: 123,
  title: "Quarterly Sales",
  listen: {
    "Date": "order.date",
    "Total Orders": "order.count"
  }
}
```

| Attribute | Format | Description |
|---|---|---|
| `label` | String | The button label. |
| `url` | String | The relative URL (just the path) of the Explore to be viewed. |
| `dashboard.id` | Number/String | The ID of the dashboard to which the tile belongs. |
| `dashboard.title` | String | The dashboard title, as shown at the top of the dashboard to which the tile belongs. |
| `dashboard.canEdit` | Boolean | Added 22.20 When `true`, the user can edit the dashboard. |
| `dashboard.url` | String | The relative dashboard URL (just the path) to which the tile belongs. |
| `dashboard.absoluteUrl` | String | The full dashboard URL to which the tile belongs. |
| `dashboard.dashboard_filters` | Object | The filters applied to the dashboard to which the tile belongs. This object has the format: `{"Filter name 1": "value 1", "Filter name 2": "value 2", ...}` |
| `tile.id` | Integer | The ID number of the event, not the tile. |
| `tile.title` | String | The tile title, as shown at the top of the tile. |
| `tile.listen` | Object | The global dashboard filters this tile is listening for. This object has the format: `{"Filter Label": "Filter Field", ...}` |

#### `dashboard:tile:view`

This event is created when a user clicks the **View Original Look** option in a dashboard tile.

This event is cancellable, meaning that the embedding application can return `{cancel: true}` and Looker won't proceed with the triggering event.

```javascript
type: "dashboard:tile:view",
label: 'View Original Look',
url: '/embed/look/...',
dashboard: {
  id: 23,
  title: "My Dashboard",
  canEdit: true,
  url: "/embed/dashboards/...",
  absoluteUrl: "https://instance_name.looker.com/embed/dashboards/...",
  dashboard_filters: {
    "Date": "Last 28 days",
    "Total Orders": "Greater than 100"
  }
}
tile: {
  id: 123,
  title: "Quarterly Sales",
  listen: {
    "Date": "order.date",
    "Total Orders": "order.count"
  }
}
```

| Attribute | Format | Description |
|---|---|---|
| `label` | String | The button label. |
| `url` | String | The relative URL (just the path) of the Look to be viewed. |
| `dashboard.id` | Number/String | The ID of the dashboard to which the tile belongs. |
| `dashboard.title` | String | The dashboard title, as shown at the top of the dashboard to which the tile belongs. |
| `dashboard.canEdit` | Boolean | Added 22.20 When `true`, the user can edit the dashboard. |
| `dashboard.url` | String | The relative dashboard URL (just the path) to which the tile belongs. |
| `dashboard.absoluteUrl` | String | The full dashboard URL to which the tile belongs. |
| `dashboard.dashboard_filters` | Object | The filters applied to the dashboard to which the tile belongs. This object has the format: `{"Filter name 1": "value 1", "Filter name 2": "value 2", ...}` |
| `tile.id` | Integer | The ID number of the event, not the tile. |
| `tile.title` | String | The tile title, as shown at the top of the tile. |
| `tile.listen` | Object | The global dashboard filters this tile is listening for. This object has the format: `{"Filter Label": "Filter Field", ...}` |

#### `dashboard:tile:merge`


Added 25.14
This event is generated when the user clicks the **Edit Merged Query** button or the **Edit Merged Query** menu item. The default behavior for this button is to open a new top-level window that allows the merge query to be edited.

This event is cancellable, meaning that the embedding application can return `{cancel: true}` and Looker won't proceed with the triggering event. This event allows the embedding application to open the merge query edit in an iframe rather than a top-level window. The embedding application shouldn't attempt to load the URL in the iframe that triggered the event. Instead, a new iframe should be created.
`javascript
type: dashboard:tile:merge,
label: 'Edit Merged Query',
dashboard_id: '13',
dashboard_modified: false,
tile_id: '218',
tile_title: 'Untitled',
url: '/embed/merge/edit?did=218&dbnx=1',
absoluteUrl: 'https://.../embed/merge/edit?did=218&dbnx=1',
target: '_blank',`

| Attribute | Format | Description |
|---|---|---|
| `label` | string | The button label. |
| `dashboard_id` | string | The ID of the dashboard to which the merged query tile belongs. |
| `dashboard_modified` | boolean | When `true`, this attribute indicates that the dashboard has been modified. Updates to the dashboard can be lost if the merge query edit proceeds. The embedding application can either cancel the merge query edit or warn the user that they may have unsaved changes if they proceed. |
| `tile_id` | string | The ID of the merged query tile. |
| `tile_title` | string | The title of the tile. |
| `url` | string | The URL of the merged query. This attribute may be used with the [embed SDK](https://docs.cloud.google.com/looker/docs/2622/embed-sdk-intro.md.txt) to create a new iframe for the merged query. |
| `absoluteUrl` | string | The full URL of the merged query. This attribute may be used as the `src` of the iframe element. Additional attributes will be required. |
| `target` | string | The ID to be used for the name of the window to be opened. |

#### `dashboard:filters:changed`

This event is created when a dashboard's filters have been applied or changed.

```javascript
type: "dashboard:filters:changed",
dashboard: {
  id: 23,
  title: "My Dashboard",
  canEdit: true,
  url: "/embed/dashboards/...",
  absoluteUrl: "https://instance_name.looker.com/embed/dashboards/...",
  dashboard_filters: {
    "Date": "Last 28 days",
    "Total Orders": "Greater than 100"
  }
  options: {
    layouts: [
      {
        id: 1,
        dashboard_id: 1,
        type: "newspaper",
        active: true,
        column_width: null,
        width: null,
        deleted: false,
        dashboard_layout_components: [
          {
            id: 1,
            dashboard_layout_id: 1,
            dashboard_element_id: 1,
            row: 0,
            column: 0,
            width: 8,
            height: 4,
            deleted: false
          },
          {
            id: 2,
            dashboard_layout_id: 1,
            dashboard_element_id: 2,
            row: 0,
            column: 8,
            width: 8,
            height: 4,
            deleted: false
          }
        ]
      }
    ],
    elements: {
      1: {
        title: "Total Orders",
        title_hidden: false,
        vis_config: {
          type: "single_value",
          font_size: "medium",
          title: "Total Orders"
        }
      },
      2: {
        title: "Average Order Profit",
        title_hidden: false,
        vis_config: {
          type: "single_value",
          title: "Average Order Profit"
        }
      }
    }
  }
}
```

| Attribute | Format | Description |
|---|---|---|
| `dashboard.id` | Number/String | The ID of the dashboard. |
| `dashboard.title` | String | The title, as shown at the top of the dashboard. |
| `dashboard.canEdit` | Boolean | Added 22.20 When `true`, the user can edit the dashboard. |
| `dashboard.url` | String | The relative dashboard URL (just the path). |
| `dashboard.absoluteUrl` | String | The full dashboard URL. |
| `dashboard.dashboard_filters` | Object | The filters applied to the dashboard. This object has the format: `{"Filter name 1": "value 1", "Filter name 2": "value 2", ...}` |
| `dashboard.options` | Object | The [dashboard layout](https://docs.cloud.google.com/looker/docs/reference/looker-api/latest/methods/Dashboard/dashboard_layout.md.txt), [dashboard layout component](https://docs.cloud.google.com/looker/docs/reference/looker-api/latest/methods/Dashboard/dashboard_layout_component.md.txt), and [dashboard element](https://docs.cloud.google.com/looker/docs/reference/looker-api/latest/methods/Dashboard/dashboard_element.md.txt) properties and values. All properties returned in the `options` object can be given updated values using the [`dashboard:options:set`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#dashboard:options:set) event. |

#### `look:ready`

This event is created when a Look begins to load query data, whether the query runs or not.

```javascript
type: "look:ready",
look: {
  url: "/embed/looks/...",
  absoluteUrl: "https://instance_name.looker.com/embed/looks/...",
  }
```

| Attribute | Format | Description |
|---|---|---|
| `look.url` | String | The relative Look URL (just the path) |
| `look.absoluteUrl` | String | The full Look URL |

#### `look:run:start`

This event is created when a Look begins to load query data and the query begins to run.

```javascript
type: "look:run:start",
look: {
  url: "/embed/looks/...",
  absoluteUrl: "https://instance_name.looker.com/embed/looks/...",
  }
```

| Attribute | Format | Description |
|---|---|---|
| `look.url` | String | The relative Look URL (just the path) |
| `look.absoluteUrl` | String | The full Look URL |

#### `look:run:complete`

This event is created when a Look has finished running the query.

```javascript
type: look:run:complete
look: {
  url: "/embed/looks/...",
  absoluteUrl: "https://instance_name.looker.com/embed/looks/...",
  }
```

| Attribute | Format | Description |
|---|---|---|
| `look.url` | String | The relative Look URL (just the path) |
| `look.absoluteUrl` | String | The full Look URL |

#### `look:edit:start`


Added 25.10
This event is fired when a Look is switched into edit mode.

```javascript
type: "look:edit:start",
look: {
  id: 46,
  title: "My Look",
  url: "/embed/looks/46",
  absoluteUrl: "https://instance_name.looker.com/embed/looks/46",
}
```

| Attribute | Format | Description |
|---|---|---|
| `look.id` | String | The ID of the Look. |
| `look.title` | String | The title of the Look. |
| `url` | String | The relative Look URL (just the path). |
| `absoluteUrl` | String | The full Look URL. |

#### `look:edit:cancel`


Added 25.10
This event is fired when a Look that is in edit mode is exited from edit mode without saving.

```javascript
type: "look:edit:cancel",
look: {
  id: 46,
  title: "My Look",
  url: "/embed/looks/46",
  absoluteUrl: "https://instance_name.looker.com/embed/looks/46",
}
```

| Attribute | Format | Description |
|---|---|---|
| `look.id` | String | The ID of the Look. |
| `look.title` | String | The title of the Look. |
| `url` | String | The relative Look URL (just the path). |
| `absoluteUrl` | String | The full Look URL. |

#### `look:save:complete`

This event is created when a Look is edited and saved. This event is created when a user performs one of the following tasks:

- [Clicks the **Edit** button to edit the Look](https://docs.cloud.google.com/looker/docs/2622/saving-and-editing-looks#editing_looks) and then clicks **Save**
- Saves a Look with the **Save** \> **Save As...** menu option
- Moves a Look from one folder to another

This event is not created if the Look is saved with the **Save** \> **To existing dashboard** or **Edit Settings** menu option.

```javascript
type: look:save:complete
look: {
  url: "/embed/looks/...",
  absoluteUrl: "https://instance_name.looker.com/embed/looks/...",
  folderid: 123
  }
```

| Attribute | Format | Description |
|---|---|---|
| `look.url` | String | The relative Look URL (just the path) |
| `look.absoluteUrl` | String | The full Look URL |
| `look.folderid` | Integer | The folder ID where the Look is stored |

#### `look:delete:complete`

This event is created when a Look is [moved to the **Trash** folder](https://docs.cloud.google.com/looker/docs/2622/saving-and-editing-looks#deleting_a_look).

```javascript
type: look:delete:complete
look: {
  url: "/embed/looks/...",
  absoluteUrl: "https://instance_name.looker.com/embed/looks/...",
  }
```

| Attribute | Format | Description |
|---|---|---|
| `look.url` | String | The relative Look URL (just the path) |
| `look.absoluteUrl` | String | The full Look URL |

#### `drillmenu:click`

This event is created when a user clicks on a drill menu in a dashboard created with the [`link` LookML parameter](https://docs.cloud.google.com/looker/docs/2622/reference/param-field-link). For example, the following LookML creates a drill menu where a user can view data filtered by the `state` dimension:

```javascript

dimension: state {
  type: string
  sql: ${TABLE}.state ;;
  link: {
    label: "Filter by {{ state | encode_uri }}"
    url: "filter::q={{ state | encode_uri }}"
    icon_url: "https://google.com/favicon.ico"
  }
}

```

When the `state` filter is set to `Illinois`, the `drillmenu:click` event returns the following to the host of the iframe:

```javascript
type: "drillmenu:click",
label: "Filter by Illinois",
link_type: "url",
modal: false,
target: '_self',
url: "#filter::state=Illinois"
context: ' '
```

This event is cancellable, meaning that the embedding application can return `{cancel: true}` and Looker won't proceed with the triggering event.

| Attribute | Format | Description |
|---|---|---|
| `label` | String | The link label as shown on the drill menu |
| `link_type` | String | The type of object at the link destination |
| `modal` | Boolean | Whether the drill dialog will be used instead of browser navigation |
| `target` | String | Is `_self` if the link destination will replace the current iframe, `_blank` if the link destination will open a new window |
| `url` | String | The URL of the link destination |
| `context` | String | Internal attribute used by some types of visualizations |

[Sandboxing](https://www.w3schools.com/tags/att_iframe_sandbox.asp) the iframe will prevent drill menu clicks from opening in a new window. Use these sandboxing values inside the iframe tag:

```javascript
sandbox = "allow-same-origin allow-scripts"
```

#### `drillmodal:download`

This event is created when a user opens a drill dialog from a dashboard tile and clicks the **Download** option.

```javascript
{
type: "drillmodal:download",
dashboard: {
  id: 23,
  title: "My Dashboard",
  url: "/embed/dashboards/...",
  absoluteUrl: "https://instance_name.looker.com/embed/dashboards/...",
  dashboard_filters: {
    "Date": "Last 28 days",
    "Total Orders": "Greater than 100"
  }
}
drillExploreUrl: "/embed...",
fileFormat: "pdf"
}
```

| Attribute | Format | Description |
|---|---|---|
| `dashboard.id` | Number/String | The ID of the dashboard to which the tile belongs. |
| `dashboard.title` | String | The dashboard title, as shown at the top of the dashboard to which the tile belongs. |
| `dashboard.url` | String | The relative dashboard URL (just the path) to which the tile belongs. |
| `dashboard.absoluteUrl` | String | The full dashboard URL to which the tile belongs. |
| `dashboard.dashboard_filters` | Object | The filters applied to the dashboard to which the tile belongs. This object has the format: `{"Filter name 1": "value 1", "Filter name 2": "value 2", ...}` |
| `drillExploreUrl` | String | The relative Explore URL (just the path) to be downloaded. |
| `fileFormat` | String | The file format of the data download. |

#### `drillmodal:explore`

This event is created when a user clicks the **Explore From Here** option in a drill dialog.

This event is cancellable, meaning that the embedding application can return `{cancel: true}` and Looker won't proceed with the triggering event.

```javascript
type: "drillmodal:explore",
label: "Explore From Here",
url: "/embed/explore/model/view..."
```

| Attribute | Format | Description |
|---|---|---|
| `label` | String | The button label as shown on the drill menu |
| `url` | String | The relative Explore URL (just the path) to be viewed |

#### `explore:ready`

This event is created when an Explore begins to load query data, whether the query runs or not.

```javascript
type: "explore:ready",
explore: {
  url: "/embed/explore/...",
  absoluteUrl: "https://instance_name.looker.com/embed/explore/...",
  }
```

| Attribute | Format | Description |
|---|---|---|
| `explore.url` | String | The relative Explore URL (just the path) |
| `explore.absoluteUrl` | String | The full Explore URL |

#### `explore:run:start`

This event is created when an Explore begins to load query data and the query begins to run.

```javascript
type: "explore:run:start",
explore: {
  url: "/embed/explore/...",
  absoluteUrl: "https://instance_name.looker.com/embed/explore/...",
  }
```

| Attribute | Format | Description |
|---|---|---|
| `explore.url` | String | The relative Explore URL (just the path) |
| `explore.absoluteUrl` | String | The full Explore URL |

#### `explore:run:complete`

This event is created when an Explore has finished running the query.

```javascript
type: "explore:run:complete",
explore: {
  url: "/embed/explore/...",
  absoluteUrl: "https://instance_name.looker.com/embed/explore/...",
  }
}
```

| Attribute | Format | Description |
|---|---|---|
| `explore.url` | String | The relative Explore URL (just the path) |
| `explore.absoluteUrl` | String | The full Explore URL |

#### `explore:state:changed`

This event is created when an Explore page URL changes as a result of the user's actions.

```javascript
type: "explore:state:changed",
explore: {
  url: "/embed/explore/...",
  absoluteUrl: "https://instance_name.looker.com/embed/explore/..."
}
```

| Attribute | Format | Description |
|---|---|---|
| `explore.url` | String | The relative Explore URL (just the path) |
| `explore.absoluteUrl` | String | The full Explore URL |

#### `merge:ready`

This event is created when a merge query finishes loading initial query data.

```javascript
{
  type: "merge:ready",
  mergeQuery: {
    id: "123",
    client_id: "abc"
  }
}
```

| Attribute | Format | Description |
|---|---|---|
| `mergeQuery.id` | String | The ID of the merge query. |
| `mergeQuery.client_id` | String | The client ID of the merge query. |

#### `merge:run:start`

This event is created when a merge query begins to run.

```javascript
{
  type: "merge:run:start",
  mergeQuery: {
    id: "123",
    client_id: "abc"
  }
}
```

| Attribute | Format | Description |
|---|---|---|
| `mergeQuery.id` | String | The ID of the merge query. |
| `mergeQuery.client_id` | String | The client ID of the merge query. |

#### `merge:run:complete`

This event is created when a merge query has finished running the query.

```javascript
{
  type: "merge:run:complete",
  mergeQuery: {
    id: "123",
    client_id: "abc"
  }
}
```

| Attribute | Format | Description |
|---|---|---|
| `mergeQuery.id` | String | The ID of the merge query. |
| `mergeQuery.client_id` | String | The client ID of the merge query. |

#### `merge:run:fail`

This event is created when a merge query fails to run and returns an error.

```javascript
{
  type: "merge:run:fail",
  mergeQuery: {
    id: "123",
    client_id: "abc"
  },
  error: "Execution timeout"
}
```

| Attribute | Format | Description |
|---|---|---|
| `mergeQuery.id` | String | The ID of the merge query. |
| `mergeQuery.client_id` | String | The client ID of the merge query. |
| `error` | String | The error message returned when the merge query fails to run. |

#### `page:changed`

This event is created when a user navigates to a new page within the iframe.

```javascript
type: "page:changed",
page: {
  type: "dashboard",
  url: "/embed/dashboards/...",
  absoluteUrl: "https://instance_name.looker.com/embed/dashboards/..."
}
```

| Attribute | Format | Description |
|---|---|---|
| `page.type` | String | The type of page that has just been navigated to, such as `"dashboard"`, `"look"`, or `"explore"` |
| `page.url` | String | The relative URL (just the path) of the page that has just been navigated to |
| `page.absoluteUrl` | String | The full URL of the page that has just been navigated to |

#### `page:properties:changed`

This event is created when the height of a dashboard iframe changes. It is not available for Looks or Explores because those items automatically adjust their height to the size of the iframe.

```javascript
type: "page:properties:changed",
height: 1000
```

| Attribute | Format | Description |
|---|---|---|
| `height` | Integer | The height of the dashboard iframe in pixels |

#### `session:tokens`

This event indicates that the Looker client requires tokens to continue. This event is created immediately on creation of the iframe and periodically afterwards for the duration of the session.

```javascript
{
  "type": "session:tokens",
  "api_token": "eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3NlbGYtc2lnbmVkLmxvb2tlci5jb206OTk5OSIsImV4cCI6MTY3MDYyNjMzMCwic3ViIjoiYVdrNWFGUzM4RnRwNzFFWXhuS3ZaMXdKRmV3ZjB2VzYtTV9zLWtCcHE1dXIiLCJ0b2tlbl90eXBlIjoiYXBpX3Rva2VuIiwicmFuZG9taXplciI6IkxjYnpOeDNTVjNOb3o3UVlqTVJjNmhlMkdodjh1a2UwWUhiZWNRMHVCYm1KIn0.CBv1__QGc_H7bKNe31SHMMQCsc5ya1xOiEv1UDWAyxM",
  "api_token_ttl": 463,
  "navigation_token": "eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3NlbGYtc2lnbmVkLmxvb2tlci5jb206OTk5OSIsImV4cCI6MTY3MDYyNjMzMCwic3ViIjoiYVdrNWFGUzM4RnRwNzFFWXhuS3ZaMXdKRmV3ZjB2VzYtTV9zLWtCcHE1dXIiLCJ0b2tlbl90eXBlIjoibmF2aWdhdGlvbl90b2tlbiIsInJhbmRvbWl6ZXIiOiJHVVNlc00tdTRPRDlNdktodFJDU2pEcVFhUkJNeTh5dm42Q1FDUXhuLTNxMiJ9.sWo7LUEI5LeragVmeDamUR7u2myXpFJ0aqK_IIALUqI",
  "navigation_token_ttl": 463,
  "session_reference_token_ttl": 2924
}
```

| Attribute | Format | Description |
|---|---|---|
| `authentication_token` | String | Authentication token. Included when the iframe is created. Not included with a response to a request to generate tokens or if the session has expired. |
| `authentication_token_ttl` | Number | Authentication token time to live in seconds. Included when the iframe is created. Not included with a response to a request to generate tokens or if the session has expired. |
| `api_token` | String | API token. Not included if the session has expired. |
| `api_token_ttl` | Number | API token time to live in seconds. Not included if the session has expired. |
| `navigation_token` | String | Navigation token. Not included if the session has expired. |
| `navigation_token_ttl` | Number | Navigation token time to live in seconds. Not included if the session has expired. |
| `session_references_token_ttl` | Number | Session time to live in seconds. The value will be 0 when the session has expired. To recover, the embedding application must acquire a new session. |

#### `session:expired`


Added 25.10
This event is fired when the embed user's session expires.

```javascript
type: "session:expired",
```

This event does not have a payload.

#### `session:status`

The event is generated when the embedded Looker application handles requests for session tokens.

```javascript
{
  "type": "session:status",
  "session_ttl": 0,
  "expired": true,
  "interrupted": false
}
```

| Attribute | Format | Description |
|---|---|---|
| `session_ttl` | Number | Session time to live in seconds. |
| `expired` | Boolean | When `true`, indicates the session has expired. |
| `interrupted` | Boolean | When `true`, indicates that a request for session tokens was not responded to. This could indicate that a server is temporarily unavailable. |
| `recoverable` | Boolean | Only populated when interrupted is `true`. Indicates whether the session can be recovered or not. A value of `false` likely means there is a problem with the embedding application. |

#### `env:client:dialog`

The event is generated when a dialog has been opened that may partially be out of view, such as a drill dialog. This event enables the hosting application to scroll the dialog into view with the [`env:host:scroll`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#env:host:scroll) action.

```javascript
{
  type: "env:client:dialog",
  dialogType: 'drilling',
  placement: 'cover',
  open: true
}
```

| Attribute | Format | Description |
|---|---|---|
| `type` | String | `env:client:dialog` indicates that a dialog has been opened or closed. Only the drill dialog is supported, but other dialogs may be added in the future. It is possible that the top of the drill dialog is not in view since the dialog covers the iframe viewport. This event allows the host application to scroll the top of the dialog into view. |
| `dialogType` | String | The type of dialog. Only the opening or closing of the "drilling" dialog type triggers this event. |
| `placement` | String | The placement of the dialog. dialogs of type "drilling" always use a `placement` of "cover". |
| `open` | Boolean | Indicates whether the dialog is opened or scrolled. |

## Making changes to the iframe

After you've [prepped](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#prep) your iframe for data retrieval, you can make changes to the iframe with the following steps:

1. [Write your request in JSON](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#write_json).
2. [Post the request to the iframe's `contentWindow`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#post_to_iframe).


### Writing your request in JSON

You can make several changes to the iframe, which you'll submit in JSON form. The available options are described in the [Action reference](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#action_reference) section on this page. Don't forget to use `JSON.stringify` to turn your action into JSON, like this:

```javascript
var my_request = JSON.stringify(
  {
    type: "dashboard:run"
  }
);
```


### Posting the request to the iframe's `contentWindow` property

Finally, post your message to the iframe's `contentWindow`, like this:

```javascript
var my_iframe = document.getElementById("my_iframe_id");

my_iframe.contentWindow.postMessage(my_request, 'https://instance_name.looker.com');
```

### Action summary table

The following table summarizes actions. Select an action to see the details about that action.

| Action | Action Description |
|---|---|
| [`page:load`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#page:load) | Loads a new page in the iframe, replacing the existing page. |
| [`dashboard:load`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#dashboard:load) | Loads a new dashboard in the iframe, replacing an existing dashboard. |
| [`dashboard:run`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#dashboard:run) | Runs the dashboard in the iframe. |
| [`dashboard:edit`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#dashboard:edit) | Added 22.20 Switches the dashboard into [edit mode](https://docs.cloud.google.com/looker/docs/2622/editing-user-defined-dashboards.md.txt#entering_edit_mode_in_dashboards). |
| [`dashboard:filters:update`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#dashboard:filters:update) | Updates an existing dashboard filter in the iframe. |
| [`dashboard:options:set`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#dashboard:options:set) | Writes new values to dashboard layout and dashboard element properties. |
| [`dashboard:schedule_modal:open`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#dashboard:schedule_modal:open) | Opens the Scheduler, which lets users deliver Looker content to various destinations. |
| [`dashboard:stop`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#dashboard:stop) | Stops a dashboard that is running or reloading data. |
| [`look:run`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#look:run) | Runs the Look in the iframe. |
| [`look:filters:update`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#look:filters:update) | Updates an existing Look filter in the iframe. |
| [`explore:run`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#explore:run) | Runs the Explore in the iframe. |
| [`explore:filters:update`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#explore:filters:update) | Updates or removes an existing Explore filter in the iframe. |
| [`merge:run`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#merge:run) | Runs the merge query in the iframe. |
| [`session:tokens:request`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#session:tokens:request) | Sends tokens in response to a `session:tokens:request` event. |
| [`env:host:scroll`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#env:host:scroll) | Sends information about the current scroll position of the host iframe to the embedded Looker application. |

### Action reference

These are the available actions you can post to the embedded iframe:

#### `page:load`

Use this action to navigate to new content within the iframe, replacing the existing content. This action is similar to the [`dashboard:load`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#dashboard:load) action but is more flexible, as additional parameters can be specified in the URL.

There are differences in behavior that should be considered before using `page:load`. `dashboard:load` will prevent the navigation from happening if the current dashboard is being edited. `page:load` doesn't prevent the navigation from happening. The host application may determine if a dashboard or Look is being edited by tracking [`dashboard:edit:start`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#dashboard:edit:start), [`look:edit:start`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#look:edit:start), and their corresponding edit end events. For this reason, we recommend using the embed SDK. The embed SDK tracks whether a dashboard or Look is being edited, and so the connection can be queried to see if content is being edited prior to navigation.

```javascript
{
    type: 'page:load',
    url: '/embed/dashboard/32?state=california,
    pushHistory: false
}
```

| Attribute | Format | Description |
|---|---|---|
| `type` | String | Using the type `page:load` indicates that you want to load new content into the iframe. |
| `url` | String | The URL of the content to load. |
| `pushHistory` | Boolean | If `true`, the content loaded creates a new browser history entry, and the user can use the browser's back button to return to the previous content. If `false`, the current content is replaced and browser navigation can't be used to return to it. |

#### `dashboard:load`

Use this action to load a new dashboard in the iframe, replacing an existing dashboard. The new dashboard will begin executing queries as if a new dashboard page had been opened.

```javascript
{
  type: "dashboard:load",
  id: "101",
  pushHistory: false
}
```

| Attribute | Format | Description |
|---|---|---|
| `type` | String | Using the type `dashboard:load` indicates that you want to load a new dashboard into the iframe. |
| `id` | String | The ID of the dashboard to load. |
| `pushHistory` | Boolean | If `true`, the dashboard that is loaded creates a new browser history entry, and the user can use the browser's back button to return to the previous dashboard. If `false`, the current dashboard is replaced and browser navigation can't be used to return to it. |


#### `dashboard:run`

Use this action to run the dashboard in the iframe. This is the same action as hitting the **Run** or **Reload Data** button on the dashboard.

```javascript
{
  type: "dashboard:run"
}
```

| Attribute | Format | Description |
|---|---|---|
| `type` | String | Using the type `dashboard:run` indicates that you want to run the dashboard. |

#### `dashboard:edit`


Added 22.20
Use this action to switch an existing dashboard in the iframe to [edit mode](https://docs.cloud.google.com/looker/docs/2622/editing-user-defined-dashboards.md.txt#entering_edit_mode_in_dashboards). This is the same action as selecting **Edit dashboard** from the dashboard menu.

```javascript
{
  type: "dashboard:edit"
}
```

| Attribute | Format | Description |
|---|---|---|
| `type` | String | Using the type `dashboard:edit` indicates that you want to switch the dashboard into [edit mode](https://docs.cloud.google.com/looker/docs/2622/editing-user-defined-dashboards.md.txt#entering_edit_mode_in_dashboards). |


#### `dashboard:filters:update`

Use this action to update an existing dashboard filter in the iframe. You can't add a new filter to the dashboard by using this method.

```javascript
{
  type: "dashboard:filters:update",
  filters: {
    "Sale date": "Last 28 days",
    "Sale amount": "Greater than 100"
  }
}
```

| Attribute | Format | Description |
|---|---|---|
| `type` | String | Using the type `dashboard:filters:update` indicates that you want to update the filters used by the dashboard. |
| `filters` | Object | The new filters you want to apply to the dashboard. This object has the format: `{"Filter name 1": "value 1", "Filter name 2": "value 2", ...}` |

#### `dashboard:options:set`

This action is available after the [`dashboard:run:complete`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#dashboard:run:complete) event occurs.

The embedder creates the message and sends it to the iframe, but the dashboard does not respond until after `dashboard:run:complete` occurs. The `dashboard:options:set` action writes new values to dashboard layout and dashboard element properties. Only properties that have been returned in the `options` attribute of the `dashboard:run:complete` event can be updated using `dashboard:options:set`. Any properties set that were not previously returned by the `options` attribute of the `dashboard:run:complete` event are ignored.

```javascript
{
  type: "dashboard:options:set",
  layouts: [
    {
      id: 1,
      dashboard_id: 1,
      type: "newspaper",
      active: true,
      column_width: null,
      width: null,
      deleted: false,
      dashboard_layout_components: [
        {
          id: 1,
          dashboard_layout_id: 1,
          dashboard_element_id: 1,
          row: 0,
          column: 0,
          width: 8,
          height: 4,
          deleted: false
        },
        {
          id: 2,
          dashboard_layout_id: 1,
          dashboard_element_id: 2,
          row: 0,
          column: 8,
          width: 8,
          height: 4,
          deleted: false
        }
      ]
    }
  ],
  elements: {
    1: {
      title: "Total Orders",
      title_hidden: false,
      vis_config: {
        type: "single_value",
        font_size: "medium",
        title: "Total Orders"
      }
    },
    2: {
      title: "Average Order Profit",
      title_hidden: false,
      vis_config: {
        type: "single_value",
        title: "Average Order Profit"
      }
    }
  }
}
```

| Attribute | Format | Description |
|---|---|---|
| `type` | String | Using the type `dashboard:options:set` indicates that you want to write new values to dashboard layout and dashboard element properties. |
| `layouts` | Object | The [dashboard layout](https://docs.cloud.google.com/looker/docs/reference/looker-api/latest/methods/Dashboard/dashboard_layout.md.txt) properties returned by the `options` attribute in the `dashboard:run:complete` event. These will be in a format similar to: <br /> - `id: "string",` - `dashboard_id: "string",` - `type: "newspaper",` - `active: boolean,` - `column_width: number,` - `width: number` |
| `layouts.dashboard_layout_components` | Object | One or more [dashboard layout component](https://docs.cloud.google.com/looker/docs/reference/looker-api/latest/methods/Dashboard/dashboard_layout_component.md.txt) objects returned by the `options` attribute in the `dashboard:run:complete` event. These will be in a format similar to: <br /> - `id: "string",` - `dashboard_layout_id: "string",` - `dashboard_element_id: "string",` - `row: number,` - `column: number,` - `width: number,` - `height: number,` - `deleted: boolean,` |
| `elements` | Object | One or more [dashboard element](https://docs.cloud.google.com/looker/docs/reference/looker-api/latest/methods/Dashboard/dashboard_element.md.txt) objects returned by the `options` attribute in the `dashboard:run:complete` event. These will be in a format similar to: <br /> <br /> `id: { <br /> title: "string", <br /> title_hidden: boolean, <br /> vis_config: { <br /> type: "string", title: "string" <br /> } <br /> }` |

#### `dashboard:schedule_modal:open`

Use this action to open the Scheduler, which lets users [deliver Looker content](https://docs.cloud.google.com/looker/docs/2622/scheduling) to various destinations.

```javascript
{
  type: "dashboard:schedule_modal:open"
}
```

| Attribute | Format | Description |
|---|---|---|
| `type` | String | Using the type `dashboard:schedule_modal:open` indicates that you want to open the **Schedule** dialog. |

#### `dashboard:stop`

Use this action to stop a dashboard that is running or reloading data. This is the same action as clicking the **Cancel** button on the dashboard. A dashboard that is stopped using `dashboard:stop` sends a [`dashboard:run:complete`](https://docs.cloud.google.com/looker/docs/2622/embedded-javascript-events.md.txt#dashboard:run:complete) event with `status:` set to `"stopped"`.

```javascript
{
  type: "dashboard:stop"
}
```

| Attribute | Format | Description |
|---|---|---|
| `type` | String | Using the type `dashboard:stop` indicates that you want to stop the running dashboard. |


#### `look:run`

Use this action to run the query on which the Look is based in the iframe. This action is similar to hitting the **Run** button on the Look, with the exception that `look:run` always queries the database directly and does not retrieve data from the [Looker cache](https://docs.cloud.google.com/looker/docs/2622/caching-and-datagroups.md.txt).

```javascript
{
  type: "look:run"
}
```

| Attribute | Format | Description |
|---|---|---|
| `type` | String | Using the type `look:run` indicates that you want to run the Look. |


#### `look:filters:update`

Use this action to update an existing Look filter in the iframe. You can't add a new filter to the Look by using this method.

```javascript
{
  type: "look:filters:update",
  filters: {
    "orders.created_at": "90 days",
    "products.department": "sweaters"
  }
}
```

| Attribute | Format | Description |
|---|---|---|
| `type` | String | Using the type `look:filters:update` indicates that you want to update the filters used by the Look. |
| `filters` | Object | The new filters you want to apply to the Look. This object has the format: `{"view_name.field_name_1": "value 1", "view_name.field_name_1": "value 2", ...}` |

#### `explore:run`

Use this action to run the Explore in the iframe. This action is similar to hitting the **Run** button on the Explore, with the exception that `explore:run` always queries the database directly and does not retrieve data from the [Looker cache](https://docs.cloud.google.com/looker/docs/2622/caching-and-datagroups.md.txt).

```javascript
{
  type: "explore:run"
}
```

| Attribute | Format | Description |
|---|---|---|
| `type` | String | Using the type `explore:run` indicates that you want to run the Explore. |

#### `explore:filters:update`

Use this action to update or remove an existing Explore filter in the iframe. Including a new filter that references a valid field will add the new filter to the Explore.

```javascript
{
  type: "explore:filters:update",
  filters: {
    "orders.created_at": "90 days",
    "orders.status": "complete"
  }
  deleteFilters:  ["products.department"]
}
```

| Attribute | Format | Description |
|---|---|---|
| `type` | String | Using the type `explore:filters:update` indicates that you want to update the filters used by the Explore. |
| `filters` | Object | The new filters that you want to apply to the Explore. If `filters` includes a filter that doesn't exist in the Explore but that does reference a valid field, that filter will be added to the Explore. This object has the format `{"view_name.field_name_1": "value 1", "view_name.field_name_1": "value 2", ...}`. |
| `deleteFilters` | Array | The existing filters you want remove from the Explore. The array has the format: `["view_name.field_name_1", "view_name.field_name_2", ...]` |

#### `merge:run`

Use this action to run the merge query in the iframe.

```javascript
{
  type: "merge:run"
}
```

| Attribute | Format | Description |
|---|---|---|
| `type` | String | Using the type `merge:run` indicates that you want to run the merge query. |

#### `session:tokens:request`

Use this action to send tokens in response to a `session:tokens:request` request.

```javascript
{
  type: "session:tokens:request",
}
```

| Attribute | Format | Description |
|---|---|---|
| `type` | String | Using the type `session:tokens:request` indicates that you want to send tokens in response to a `session:tokens:request` event. |

#### `env:host:scroll`

Use this action to send information about the current scroll position of the host iframe to the embedded Looker application.

```javascript
{
  type: "env:host:scroll",
  offsetTop: 10,
  offsetLeft: 10,
  scrollX: 5,
  scrollY: 5
}
```

| Attribute | Format | Description |
|---|---|---|
| `type` | String | Using the type `env:host:scroll` indicates that you want to send information about the current scroll position of the host iframe to the embedded Looker application. |
| `offsetTop` | Number | The offset top of the iframe. |
| `offsetLeft` | Number | The offset left of the iframe. |
| `scrollX` | Number | The scrollX position of the application host. |
| `scrollY` | Number | The scrollY position of the application host. |