Pass parameters to external JS file with drupal_add_js() My organization is using Eloqua, and to this point have been using the Eloqua module. The main point of this module is just to determine where the external tracking script should be loaded on the site, and then load the external script while passing it a couple of parameters. This call is creating a huge performance hit, and so after talking to Eloqua support, I copied the external file to the site so it could be cached. Since we need the file to be loaded for every page, we really don't need the module, and so all we really need to do is load the file and pass it the required parameters

The problem is determining how to pass the required parameters to the script. Here is the current eloqua.js:

var _elqQ = _elqQ || [];

(function ($) {

  Drupal.behaviors.eloquaTracking = {
    attach: function (context, settings) {

      _elqQ.push(['elqSetSiteId', Drupal.settings.eloqua.siteId]);
      _elqQ.push(['elqTrackPageView']);

      function async_load() {
        var s = document.createElement('script');
        s.type = 'text/javascript';
        s.async = true;
        s.src = '//img.en25.com/i/elqCfg.min.js';
        var x = document.getElementsByTagName('script')[0];
        x.parentNode.insertBefore(s, x);
      }
      if (window.addEventListener) {
        window.addEventListener('DOMContentLoaded', async_load, false);
      } else if (window.attachEvent) {
        window.attachEvent('onload', async_load);
      }
    }
  };
})(jQuery);


The _elqQ array is accessed by elqCfg.min.js, so I need to make it accessible to the script with the elqSetSiteId and elqTrackPageView parameters. Is there a way to do that while adding elqCfg.min.js via drupal_add_js() in template.php or somewhere else? 

CLARIFICATION: What I'm looking for here is a way to include this file and pass the parameters to it without having to create a whole module. That seems like a lot of unnecessary overhead for this one file.
I ended up just going with a modification of the current code. I modified the behavior above so that it just loads the variables:

var _elqQ = _elqQ || [];

(function ($) {

  Drupal.behaviors.eloquaTracking = {
    attach: function (context, settings) {

      _elqQ.push(['elqSetSiteId', Drupal.settings.eloqua.siteId]);
      _elqQ.push(['elqTrackPageView']);
    }
  };
})(jQuery);


and then used drupal_add_js() to load the tracking file in my module

drupal_add_js(drupal_get_path('module', 'eloqua') . '/elqCfg.min.js');