Google Blogoscoped


Change Google Analytics code [PersonRank 10]

Friday, November 14, 2008
15 years ago2,609 views

I noticed a change in the Google Analytics code,

New is,
"} catch(err) {}"

   <script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "' type='text/javascript'%3E%3C/script%3E"));
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("XXXXXXX");
} catch(err) {}</script>

Jeremy Kuo [PersonRank 0]

15 years ago #

I noticed that too. I think it's a preventative measure for IE7 woes. The "try catch" statement prevents the runtime error dialog box from loading up when a JS error is encountered. [PersonRank 10]

15 years ago #

Strange, now when i look in Analytics i see the old code again......

Forum home


Blog  |  Forum     more >> Archive | Feed | Google's blogs | About


This site unofficially covers Google™ and more with some rights reserved. Join our forum!