In addition to public embedding, you can also embed Looks and dashboards privately, so that a Looker login is required. If a user is not authenticated you have the option to show a “permission denied” type of message, or to display a login screen (instructions below).
Embedding a Look
To embed a Look you should follow these steps:
- Load a saved Look, or create the desired visualization, so that you are viewing it in the Explore page.
- Copy the URL from the explore page.
/embed/query/in the URL, for example:
https://mycomp.com/explore/my_model/my_explore?... ^^^^^^^^^ change to /embed/query/
Place your new URL into an iframe, for example:
<iframe src="https://mycomp.com/embed/query/my_model/my_explore?..." width="600" height="338" frameborder="0"> </iframe>
- Embed the iframe as desired.
Embedding a Dashboard
To embed a dashboard you should navigate to the desired dashboard and copy its URL. Then, add
/embed/ to the URL after the domain and before
/dashboards/. For example:
https://yourcompany.looker.com/embed/dashboards/my_model/my_dashboard ^^^^^^^ https://yourcompany.looker.com/embed/dashboards/32 ^^^^^^^
Then, place this URL into an iframe:
<iframe src="https://yourcompany.looker.com/embed/dashboards/32" width="600" height="338" frameborder="0"> </iframe>
Finally, embed the iframe as desired.
If you require a more advanced or customizable embedded solution (e.g. SSO with passive login), please contact your Looker account manager.
Customizing Backgrounds and Colors of Embedded Dashboards
For information on how to customize the background style or colors of an embedded dashboard, read this article.
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:
<iframe src="https://mycomp.com/embed/query/my_model/my_explore?...&allow_login_screen=true"></iframe> ^^^^^^^^^^^^^^^^^^^^^^^^
If you do not add this parameter a 401 error will be displayed to users who are not already logged in.