2 Replies Latest reply on Dec 7, 2018 12:29 PM by Susan King

    Embed code not working when viewing on phone

    Susan King

      Our Tableau public data works fine embedded into our website's test page on a desktop, but does not show up correctly on iPhones when using Safari or Chrome. The following Tableau code doesn't look like the example codes others have posted or in the Tableau reference information on embedding. What exactly should I be doing differently?

       

       

      <div class='tableauPlaceholder' id='viz1544131525466' style='position: relative'>

      <noscript>
      <a href='#'>
      <img alt=' ' src='https:&#47;&#47;public.tableau.com&#47;static&#47;images&#47;PJ&#47;PJ6NGYQGX&#47;1_rss.png' style='border: none' />
      </a>
      </noscript>

      <object class='tableauViz'  style='display:none;'>
      <param name='host_url' value='https%3A%2F%2Fpublic.tableau.com%2F' />
      <param name='embed_code_version' value='3' />
      <param name='path' value='shared&#47;PJ6NGYQGX' />
      <param name='toolbar' value='yes' />
      <param name='static_image' value='https:&#47;&#47;public.tableau.com&#47;static&#47;images&#47;PJ&#47;PJ6NGYQGX&#47;1.png' />
      <param name='animate_transition' value='yes' />
      <param name='display_static_image' value='yes' />
      <param name='display_spinner' value='yes' />
      <param name='display_overlay' value='yes' />
      <param name='display_count' value='yes' />
      <param name='filter' value='publish=yes' />
      </object>
      </div>

      <script type='text/javascript'> var divElement = document.getElementById('viz1544131525466'); var vizElement = divElement.getElementsByTagName('object')[0]; vizElement.style.width='100%';vizElement.style.height=(divElement.offsetWidth*0.75)+'px'; var scriptElement = document.createElement('script'); scriptElement.src = 'https://public.tableau.com/javascripts/api/viz_v1.js'; vizElement.parentNode.insertBefore(scriptElement, vizElement);
      </script>