KNOWLEDGE BASE

Embedding Tableau Public Views in iFrame


Published: 30 May 2014
Last Modified Date: 24 Aug 2022

Question

How to embed Tableau Public views in iFrame. 

Environment

Tableau Public

Answer

  1. Go to the view in Tableau Public. 
  2. Select the option "Share" at the bottom of the view and copy the link provided in the Link section. 
  3. Add the link in the iframe code. For more information about how to embed URLs, see Writing embed code.
  4. When embedding Tableau Public views in iFrame, the URL must include the following parameters:
    • showVizHome=no 
    • embed=true 
The following example shows code that can be used to embed a Tableau Public view in an iFrame, where the source (src) is the URL for the view:
<iframe src="https://public.tableau.com/views/public_exercise/Dashboard1?:showVizHome=no&:embed=true"
 width="645" height="955"></iframe>

Note: When you use the view’s URL for the iframe src attribute, do not include the number sign (#) and number at the very end of the URL.

Correct src contents:

https://public.tableau.com/views/public_exercise/Dashboard1?:showVizHome=no&:embed=true
Incorrect src contents:
https://public.tableau.com/views/public_exercise/Dashboard1?:showVizHome=no&:embed=true#2
To ensure the original view will be displayed by default in an embedded view, make sure the embed code URL for the name parameter does not explicitly refer to a custom view, and include the following filter parameter in the embed code:<param name="filter" value=":original_view=yes"/>. For more information, see: Embed Code for Custom Views.
Did this article resolve the issue?