• Home
  • Archives
Subscribe: Posts | Comments | E-mail
  • Tech CornerNews and tips on latest gadgets.
  • Web Analytics / MarketingTips on SEO, Google Analytics, WebTrends
  • Web DevelopmentHTML, CSS, JavaScript, Ajax, jQuery, PHP, Flash.

Dr. Div

Posted on April 25, 2009 - by Dr. Div

Google Analytics Tracking Code Gets an Update: Try/Catch

Web Analytics / Marketing

Google Analytics recently made a revision on its tracking code (GA) and added the try/catch function at the end of the the code to possibly prevent any error messages or “Exceptions” from being displayed to end users. If you’re using Google Analytics on your website, I recommend updating your tracking code by copying from the code from your Google Analytics Account > Analytics Settings > Profile Settings > Tracking Code.

<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-XXXXXXX-X");
pageTracker._trackPageview();
} catch(err) {}
</script>

Dr.Div

0 Comments



Leave a Comment

All Symptoms Welcome

  1. Name (required)

    Mail (required)

    Website

    Message

  • Worth-a-watch Ads

  • RSS Latest Gadget News by Engadget

    • Efika MX Smartbook now on sale for an exceedingly unattractive price
    • Garmin's nuLink! 1695 attracts high-end GPS buyers, nuvi 2200 and 2300 mop up the rest
    • HTC's dual-mode CDMA / GSM Android slider hits the FCC, decked out in shades of Verizon
    • Dell moves back up to #2 position in global PC sales, Acer slips to 3rd, HP still reigns supreme
    • BlackBerry Torch 9800 gets the Colorware treatment, sees value increase infinitely
  • Tag Cloud

    • Adobe Amazon Android apple App Store AT&T BlackBerry Bluetooth Engadget Facebook Gadgets Gaming Google Hardware Hewlett-Packard Home Theater HTC Intel iPad iPhone iPhone 4 iPod Touch latest gadgets LG Mac Microsoft Mobile Motorola Nexus One Nokia Online Other PC Samsung Software Sony Sprint Steve Jobs T-Mobile Twitter Verizon wifi Windows 7 Windows Mobile YouTube
© 2009 Dr. Div - Website Prognosis & Therapy