Loading the feedback tab asynchronously



  • Avatar
    Brett Cave

    the loading mechanism is shamelessly taken from Google Analytics async loading.

  • Avatar
    Dan Farrelly

    I personally use this to load the css & javascript async, then initialize Zenbox in the callback, granted you're using jQuery or Zepto or something similar.

    <script type="text/javascript">
      // async load of Zendesk
        function loadZendesk() {
          var c = document.createElement('link');
         c.rel = "stylesheet";
         c.type = "text/css";
         c.href = "//asset.zendesk.com/external/zenbox/v2.4/zenbox.css";
         var h = document.getElementsByTagName('head')[0];
           url: "//asset.zendesk.com/external/zenbox/v2.4/zenbox.js",
           dataType: "script",
           cache: true,
           success: function() {
               dropboxID: "200xxxxxx",
               url: "https://xxxxx.zendesk.com",
               tabID: "",
               tabColor: "black",
               tabPosition: "Right"

  • Avatar
    Jennifer Rowe

    Awesome, Dan! Thanks for sharing this!

Please sign in to leave a comment.

Powered by Zendesk