diTii.com Digital News Hub

Sign up with your email address to be the first to know about latest news and more.

I agree to have my personal information transfered to MailChimp (more information)

Jan172009

New Google Analytics tracking code with ‘try and catch’

Google made some changes to the analytics code and added a try and catch block which will have the effect of halting any messages from the Google Analytics tracking code snippet throwing up to the visitors who have enabled JavaScript messaging in their browsers. These addition should not have any impact on tracking if the old code is still in place.

New Google Analytics Tracking Code:

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

Share This Story, Choose Your Platform!

Do NOT follow this link or you will be banned from the site!