Refreshing the data in an embedded view can be done automatically. This article describes how to embed a Tableau view into your web page and set the view to refresh every 30 seconds.
Step 1
Publish the Tableau view and copy the URL from the share button.
If your view is published already, navigate to it and copy the URL.
Note:If a hash symbol (#) and number, or a ":iid= " appear at the end of the URL, do not include those characters. For example, in the following URL, you would not copy the #3 characters:
http://server-name.com/views/AutoRefreshExample/AutoRefreshExample#3
Step 2
Create a new web page or open an existing one in which you want to embed the view. Display the page in the text view.
If you’re creating a new page, here is an example of a standard format for a basic HTML document:
Nifty embedded Tableau view that refreshes automatically
Step 3
Insert an iframe between the
body
tags and configure it as follows:- Use the URL that you copied in Step 1 as the target of the iframe.
- Include any URL parameters for the view. In this example: ?
:embed=yes&:refresh=yes
. Here, ":embed=yes" removes the Tableau Server user interface from the view, and ":refresh=yes" prevents Tableau Server from using the cache and ensures that new data is always shown. - (Optional) Customize the text that appears when users’ browsers cannot display iframe content.
Step 4
In the
head
section of the HTML document, add a meta
tag with http-equiv
and content
attributes to set the refresh rate to 30 seconds.
The following code shows the complete web page.
Nifty embedded Tableau view that refreshes automatically