In addition to public embedding, you can also embed Looks, Explores, and dashboards privately, so that authentication using a Looker login, Google OAuth, or OpenID Connect is required. If a user is not authenticated, you have the option to show an error message or display a login screen.
Users who are logged in and accessing privately embedded content are subject to the settings in the Sessions Admin panel, which determine how long they can stay logged in, if they can log in from multiple browsers, and if they will be logged out after a period of inactivity.
If you require a more advanced or customizable embedded solution, check out our Single sign-on (SSO) embedding documentation page.
Embedded content always reflects the production version of the content. Any changes made while in Development Mode that affect content and that have not been deployed to production will not appear in an embed.
Embedding a Look
Follow these steps to embed a Look’s visualization:
- Open a saved Look.
- Copy the URL.
Change
/looks/
to/embed/looks/
in the URL. For example, this:https://instance_name.looker.com/looks/4
changes to:
https://instance_name.looker.com/embed/looks/4
Place your new URL into an iframe. For example:
<iframe src="https://instance_name.looker.com/embed/looks/4" width="600" height="300" frameborder="0"> </iframe>
Embed the iframe as desired.
Embedding an Explore
Follow these steps to embed an Explore’s visualization:
- Choose Explore from Here from a saved Look, or navigate to the Explore page and create the desired visualization.
- Copy the URL from the Explore page. Or, if you want to modify or add URL parameters, choose Share from the gear menu in the upper right and then copy the Expanded URL.
Change
/explore/
to/embed/explore/
in the URL. For example, this:https://instance_name.looker.com/explore/my_model/my_explore?...
changes to:
https://instance_name.looker.com/embed/explore/my_model/my_explore?...
Place your new URL into an iframe. For example:
<iframe src="https://instance_name.looker.com/embed/explore/my_model/my_explore?..." width="1000" height="1000" frameborder="0"> </iframe>
Embed the iframe as desired.
Embedding a dashboard
Follow these steps to embed a dashboard:
- Open a saved dashboard.
- Copy the URL.
- For a dashboard that uses the new dashboard experience, change
/dashboards/
to/embed/dashboards/
in the URL. For a legacy dashboard, change/dashboards-legacy/
to/embed/dashboards-legacy/
in the URL. For example, this:
https://instance_name.looker.com/dashboards/1
changes to:
https://instance_name.looker.com/embed/dashboards/1
- Place your new URL into an iframe. For example:
<iframe
src="https://instance_name.looker.com/embed/dashboards/1"
width="1000"
height="2000"
frameborder="0">
</iframe>
- Embed the iframe as desired.
Changing the embedded appearance of a dashboard
Viewing a dashboard with /embed
in the URL shows you how the dashboard will appear when it’s embedded. For a legacy dashboard, you can also select Preview Dashboard from the dashboard’s gear menu to see how your dashboard will appear when it’s embedded.
By default, an embedded dashboard is displayed using the default theme for your Looker instance. You can change the appearance of your embedded dashboard in several ways, depending on the type of dashboard you are using:
- For any type of dashboard, you can specify a different theme name in the embed URL to change the theme used to display the dashboard.
- For any type of dashboard, you can use the
_theme
URL argument to change individual dashboard theme elements. - For a legacy dashboard, you can also modify the embedded appearance of a dashboard using the Edit Embed Settings option in the dashboard’s gear menu.
- For a LookML dashboard, you can also modify the embedded appearance of a dashboard through the
embed_style
parameter.
Using the theme
URL argument, the Edit Embed Settings option, or the embed_style
parameter makes changes only to the dashboard the argument, option, or parameter is applied to. If you want to customize the appearance of multiple embedded dashboards, use a theme instead.
Some display settings override others. For more information, see the Creating and applying themes for embedded dashboards and Explores documentation page.
Legacy dashboard embed settings
The embed settings for a legacy dashboard will be overridden by any non-default theme that is specified in the dashboard’s embed URL or by any individual theme elements that are specified in the URL.
To configure the way a legacy dashboard is displayed when it’s embedded:
- Click the dashboard’s gear menu and select Edit Embed Settings. This opens an embed settings pane:
- Choose to show or hide the dashboard’s title or filters.
- Click on the color boxes to adjust the color of the dashboard elements.
- Optionally, you can click Undo Changes to go back to the last saved embed settings for the dashboard, or you can click Reset to Defaults to change all settings back to the default settings that are used for all embedded dashboards on your Looker instance.
- Click Save to save your changes or Cancel to close the window without saving changes.
Removing embed settings for a legacy dashboard
If you want to remove special embed settings for a legacy dashboard:
- Click the dashboard’s gear menu and select Edit Embed Settings to open the embed settings pane.
- Click Reset to Defaults.
- Click Save.
Enable login screen for private embeds
You can add the parameter allow_login_screen=true
to your embed URL if you want to display a login screen to users who haven’t logged in already. For example:
^^^^^^^^^^^^^^^^^^^^^^^
If you do not add this parameter, a 401 error will be displayed to users who are not already logged in.
Using same-origin protections for your Looker login pages might prevent you from enabling a login screen for private embeds.