I'd like to display a Tableau Public URL in Salesforce.
The URL itself works fine, but when I try to display it as a "Web Tab" or Visualforce page I get:
"public.tableau.com refused to connect."
For the Web Tab I simply enter the link and click "preview."
For the Visualforce page, my code is:
<apex:iframe src="https://public.tableau.com/app/profile/sydney.howard/viz/shared/9NSZCTRQ3" scrolling="true" id="theIframe"/>
This is not our Tableau public link, just an example of what our Tableau Public page looks like:
https://public.tableau.com/app/profile/sydney.howard/viz/shared/9NSZCTRQ3
Best Answer
Install this Tableau Viz Lightning Web Component from App Exchange. Once you installed you can see this below LWC Component in Lightning App Builder under Custom - Managed section.
Drag this Component to the Lightning Page where you want to embed as below.
Now go to the Public Tableau Report and follow the below steps and copy the URL to be embeded in Salesforce.
Puth the URL copied from the previous step into the URL field of the LWC Component as below.
https://public.tableau.com/views/LocatorMap/Dashboard1?:language=en-US&:display_count=n&:origin=viz_share_link
Now you can see the Public Tableau Report inside Salesforce. You can add this LWC Component in Home Page, Record Page and Lightning Page to embed Public Tableau Reports.
Follow this link to get more details: https://help.tableau.com/current/pro/desktop/en-us/embed_ex_lwc.htm