Navigating within Web Objects in Tableau Server
Web objects give you the ability to embed live web pages in your Tableau dashboards. This can be useful for comparing information from other sources without having to build additional content within Tableau. Having multiple ways of viewing information can provide additional insight and – just as importantly – instill confidence in your users.
Cool… so what's the problem?
As awesome as web objects are, they come with limitations. By default, Tableau Server does not allow "insecure scripts.” Insecure scripts are triggered when you try to navigate to a different web page within a Web Object.
Basically, if you publish a dashboard with a web object to Tableau Server, you can't use the web object as a "web browser" and navigate to other pages.
How do I get around this?
If the web pages a user could/would navigate to are known, you can use a parameter and calculated fields as a workaround.
As an example, let's consider MorningStar.com. If you're not familiar, MorningStar provides financial institutions with prices for stocks, mutual funds, and other financial holdings. MorningStar's site has several tabs that users may want to navigate to. By default, they can't do this from Tableau Server, but a parameter lets them work around this issue.
1. In a web browser, navigate to each tab/page you want users to access via the Tableau dashboard. Copy the URL for each tab.
2. Look at each URL and identify any pattern(s) between them. This will allow you to minimize the amount of "hard coding" that needs to be done.
For reference, below are some sample URLs for the MorningStar fund summary pages:
- Quote - https://www.morningstar.com/funds/xnas/
- Chart - http://quotes.morningstar.com/chart/fund/chart?t=
- Performance - http://performance.morningstar.com/fund/performance-return.action?t=
Notice that each URL contains the ticker (
3. Create a parameter with the names of each URL you want to make available to your users. Below is a screenshot of the MorningStar fund summary page as well as the parameter that was created. The pages above are included along with several others.
4. Create calculated fields that return the correct URL for each parameter value. For the MorningStar fund summary pages, 2 calculated fields are required to create the full URL (along with the Ticker).
5. Now, create a dashboard action that pieces it all together. The sheet names on your dashboard may differ from the ones checked below; just make sure to select the sheets you want to trigger the action.
PRO TIP: Under the URL Target Section, select "Browser Tab if No Web Page Object Exists.” If one of your URLs ever changes, this will give you a more helpful message than the default error message in Tableau.
6. Finally, publish your workbook to Tableau Server and take it for a test drive. Everything should work properly.
Even if your site has a simple URL pattern, do not use a parameter that allows free-form text. This will most likely lead to errors and a poor user experience.
Tableau Desktop does not have the concept of "insecure scripts.” If you will only be using your dashboard within Tableau Desktop, you do not have to worry about this issue.
- If your users want to be able to select a significant number of pages within a web object, consider providing a link that opens the site directly within a web browser. This will allow the users to explore the site freely without constraints.