Support » Plugin: Autoptimize » Loading external script

  • Resolved Anonymous User 14869400

    (@anonymized-14869400)


    I have a Zoho chat box on a website, it is a external JS script.
    This is inserted into the Themes header code additions box, like on many themes.

    Everything Autoptimize wise is working perfectly, but it seems to just remove this script all together..

    I’ve no idea how I can put it back into the site without just removing the entire plugin?

    Any help would be greatly appreciated.

    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Anonymous User 14869400

    (@anonymized-14869400)

    Little update, its actually the ‘Async JavaScript’ plugin.
    So maybe I went a little overboard there.

    If using this additional plugin, is it possible to exclude this script?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    yeah; you can also exclude “stuff” in Async JS, so maybe try doing so for the Zoho script?

    Thread Starter Anonymous User 14869400

    (@anonymized-14869400)

    It did not work, as its the actual script code..
    How would I add this code?

    <script type="text/javascript">
    var $zoho=$zoho || {};$zoho.salesiq = $zoho.salesiq || {widgetcode:"f07dd8c94912283a3f411d2b73849e0931526de78ba67c5f506379f9c1d76c912bc03952879d51041bb09298f4c74dc1", values:{},ready:function(){}};var d=document;s=d.createElement("script");s.type="text/javascript";s.id="zsiqscript";s.defer=true;s.src="https://salesiq.zoho.com/widget";t=d.getElementsByTagName("script")[0];t.parentNode.insertBefore(s,t);d.write("<div id='zsiqwidget'></div>");
    </script>
    Plugin Author Optimizing Matters

    (@optimizingmatters)

    hmm, AsyncJS will not touch that, but AO might if you have “also aggregate inline JS” on? in that case you can exclude it by adding zoho.salesiq to the comma-seperated JS optimization exclusion list.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    Given the lack of further feedback I’m assuming this is fixed so closing the topic. Don’t hesitate to follow up though if you still have questions/ remarks concerning this!

    frank

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Loading external script’ is closed to new replies.