Combining code from multiple javascript blocks causes error?
<p>We are using the following tracking code in our site for third party tracking. The code was copied from the third party site, and works fine, but notice that it is split into three javascript tag blocks.  Since the blocks are right next to each other, I assumed I could combine the code into one block, and all would be well (I want to call this code in an AJAX callback section).  However, when I combine the code, I get a "Uncaught ReferenceError: mm_variables not defined".  </p>

<p>Given the code still executes in the same order and scope, I'm trying to understand how combining the tag sections would make any difference?  Are there scoping issues I'm unaware of? </p>

<pre><code>&lt;!-- Begin Metrics Tracking Code --&gt;
&lt;script type="text/javascript"&gt;
var mm_c = 'd76e1f47616000000000000000';
var mm_protocol = (("https:" == document.location.protocol) ? "https://" : "http://");
document.write(unescape("%3Cscript src='" + mm_protocol + "www.mongoosemetrics.com/jsfiles/js-correlation/mm-getvar.js' type='text/javascript'%3E%3C/script%3E"));

&lt;/script&gt;
&lt;script type="text/javascript"&gt;

/* Custom Parameters */
/* MANDATORY default_number Setup Parameter DO NOT REMOVE */
var default_number='8889996666'; /* 10 Digits Only i.e. 8881234567 */

&lt;/script&gt;
&lt;script type="text/javascript"&gt;

document.write(unescape("%3Cscript src='" + mm_protocol + "www.mongoosemetrics.com/jsfiles/js-correlation/mm-control.php%3F" + mm_variables + "' type='text/javascript'%3E%3C/script%3E"));
&lt;/script&gt;
&lt;!-- End Metrics Tracking Code --&gt;
</code></pre>
