Google Analytics Fixes Rare Javascript Message!

January 20th, 2009 | RSS Feed



If you're new here, you may want to subscribe to our Full RSS feed to get a daily digest of news around search engine industry.

Google Analytics has come up with an update on the code snippet that is placed on websites. The update is done to fix the rare display of a JavaScript message that was usually noticed by the users to sites using Google Analytics.

But why was it changed?

“Adding the try and catch to the snippet removes the possibility that your visitor sees a JavaScript message that doesn't apply to her. It's a fairly rare occurrence because messages like these (frequently in the form of an alert box) can only appear if JavaScript messaging has been enabled on the browser. Most browsers have JavaScript messaging turned off by default, but sometimes people unintentionally turn it on. For those visitors who have enabled messaging, the try and catch will have the effect of halting any messages from the Google Analytics tracking code snippet.â€

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>

<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-50020-1");
pageTracker._trackPageview();
} catch(err) {}
</script>

You just need to log into your Google Analytics account to access your account-specific code snippet.

Click here to subscribe to our RSS feed to get a daily digest of news around search engine industry. PageTraffic SEO Blog is updated four times a day and is ranked as one of the best search engine resources blog by Pandia!


 


Comments

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

Leave a Reply

Back to Top

Connect with us

Connect us on twitter
Connect us on facebook
Connect us on flickr
Connect us on youtube

Life@PageTraffic on Flickr

Cafe F5 Pagetraffic in makingOffice Gallery in makingOffice Gallery and Loo at the end!


More >>

Subscribe To Our SEO Blog


Enter your email address:

Delivered by FeedBurner

Search


PageTraffic on Facebook
SEO Blogs - Blog Catalog Blog Directory
Feedback Form