Tableau - Embedding dashboards in websites using Tableau service account
Dashboards may be published to the Tableau Server and then websites may be linked to the Tableau Server to display dashboards within a web page. AITS has created a web service to simplify this feature. Embedded dashboards link to the Tableau Server using a service account and do not require individual authentication to the Tableau Server in order to display the dashboard.
The following steps may be used to embed a dashboard in a web page.
- The dashboard (Tableau Workbook) must be published to the Tableau Server. The data must be available without requiring a data source password prompt (i.e. embedded account and password).
- The service account must be granted viewer access to the dashboard.
- To use the default service account, add the account UOFI\tableau-webviewer to your Active Directory viewer group assigned to your project.
- If you wish to use your own service account, contact AITS to coordinate the account setup. The request may be submitted to servicedeskaits@uillinois.edu . Please state that you wish to use a service account with the Tableau Server and the request will be routed to the appropriate group.
- Group memberships are synchronized overnight, so please allow time for the access to be updated on the Tableau Server.
- In your web page, you will need to insert an iframe statement. The syntax for the Tableau-Test server is:
<iframe src="https://tableau-test.admin.uillinois.edu:7443/tableau/tableauservlet.do?dst=views/xxxxxx/xxxxxx&:embed=yes&:toolbar=no&:tabs=no " width="999" height="999">
</iframe>
The /xxxxx/xxxxx is the path to the dashboard. Assign the appropriate width and height sizes for your web page. Here is an example of a dashboard which simply identifies the account used to access the dashboard (in this example it is using the default service account).
<iframe src="https://tableau-test.admin.uillinois.edu:7443/tableau/tableauservlet.do? dst=views/TableauServerAccountVerification/TableauServerUserVerification&:embed=yes&:toolbar=no&:tabs=no " width="400" height="100">
</iframe>
Here is the syntax for using the production Tableau Server:
<iframe src="https://tableau.admin.uillinois.edu:7443/tableau/tableauservlet.do?dst=views/xxxxxx/xxxxxx&:embed=yes&:toolbar=no&:tabs=no " width="999" height="999">
</iframe>
How to find the path to the dashboard view
One method for finding the path to the dashboard is to go to the dashboard on the Tableau Server. In the top right corner is a link titled “Share”.
Copy the text displayed in the link box:
Paste the text in an editor.
https://tableau-test.admin.uillinois.edu/views/TableauServerAccountVerification/TableauServerUserVerification?:embed=y&:showShareOptions=true&:display_count=no&:showVizHome=no
The text in red is the path you are looking for.
List of Embed Parameters
You can embed a view using either an Iframe tag, which uses URL parameters, or a JavaScript tag, which uses object parameters. The following table lists both sets of parameters and how to use them.