How do I encapsulate third-party JavaScript files so they don't pollute the global scope?
<p>One of my clients is asking if they can add some JavaScript to track user behavior to their website. At first glance I fear that it is going to interfere with other third-party analytics scripts on the site because it looks like both parties have used the same JavaScript compressor. I don't want to comb through and search for every possible naming collision so . . .</p>

<p>Is there a way I can include third-party scripts (script files which live on a separate domain) but wrap them in their own namespace or give them their own scope so they don't collide with other globally declared variables and functions?</p>
