Magento 1.4 Google Analytics Bug Fix

We recently upgraded our Magento ecommerce stores to version 1.4, starting with our new projects Bumble&bailey and Sound Affects Music. We always integrate all our websites with Google Analytics to keep track of website performance and conversion rates, but we started noticing some serious anomalies with the reporting for both these websites. We where receiving data for the Sound Affects website but not the online shop, and Bumble&bailey was showing a 98% bounce rate and just 1 visitor, data that we knew was just plain wrong. As we use Magento's built in Google Analytics integration we had a look at the tracking code, and sure enough that's where the problem lies.