Javascript, replace a string with a variable value in aspx page for Google Analytics
<p>How do I replace the <code>'UA-XXXXXXXX-XX'</code> with <code>'UA-AAAAAAAA-AA'</code> via script code in an ASPX page ?  I can assign mGoogle_Id "<code>UA-AAAAAAAA-AA</code>' from my session variable and that works.  But I don't know how to use the variable mGoogleID in the <code>_gaq.push(['_setAccount', 'UA-XXXXXXXX-XX']);</code> line.  You would think that just putting the variable mGoogleId would work, but it does not.</p>

<pre><code>    var mGoogleId='&lt;%=Session("Google_Id")%&gt;';

    var _gaq = _gaq || [];

    _gaq.push(['_setAccount', 'UA-XXXXXXXX-XX']);

    _gaq.push(['_setAccount', mGoogleId]); ***************** This Does Not Work *****

    _gaq.push(['_trackPageview']);

    (function () {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    })();
</code></pre>
