Google has updated the ga.js tracking code due to a number of problems Google Analytics users were experiencing. The initial release of the new Google Analytics Tracking Code (GATC) prevented websites from validating, did not publish correctly within Blogger templates and the new code did not work with ASP websites. The updated tracking code solves these problems.
Updated version of the ga.js 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">
var pageTracker = _gat._getTracker("UA-XXXX-XX");
pageTracker._initData();
pageTracker._trackPageview();
</script>This updated tracking code does not validate for XHTML Strict websites, however adding CDATA tags solves this problem.
XHTML compliant version of the updated ga.js tracking code:<script type="text/javascript">
//<![CDATA[
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">
//<!--[CDATA[
var pageTracker = _gat._getTracker("UA-XXXX-XX");
pageTracker._initData();
pageTracker._trackPageview();
//]]-->
</script>Here is a copy of the tracking code before the update for those of you who are interested.
Previous version of the tracking code:<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write("\
\<\/script>" );
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-XXXX-XX");
pageTracker._initData();
pageTracker._trackPageview();
</script>Thank you to Justin Cutroni who posted about the updated ga.js tracking code and Jason Green who provided the XHTML Strict solution.
Labels: ga.js, Google Analytics, new Google Analytics features
The
new Google Analytics Tracking Code (ga.js) is now live. The new tracking code will give you access to new features as they are released, the first new feature will be Event Tracking.
Key features:- Smaller tracking code = faster loading speed
- Easier to use
- Automatic detection of HTTPS
- Required for new features
You will have to replace the legacy tracking code (urchin.js) with the new tracking code on your website. Google has stated that the legacy tracking code will continue to function for at least 12 months from the release of the new tracking code.
The following steps show you how to find the new Google Analytics Tracking Code:
Step 1Click 'Edit' next to the desired profile.
Step 2Click 'Check Status' on the Profile Settings page.
Step 3Replace the tracking code on your website with the new ga.js tracking code.

Labels: ga.js, Google Analytics, new Google Analytics features
I received a email newsletter from a popular email marketing company and was surprised that they violated the Google Analytics Terms of Service.
The Terms of Service clearly state "You will not (and will not allow any third party to) use the Service to track or collect personally identifiable information of Internet users". This includes things like names, email addresses and phone numbers.
You can clearly see my email address is being logged in the utm_content element of the campaign tag within the email newsletter below.

Labels: Google Analytics, privacy
This morning I attended 'An Industry in Transition - Web Analytics to Marketing Optimization' in Vancouver, Canada which was the first breakfast series put on by the Web Analytics Association (WAA) and eMetrics.

John Hossack of VKI Studios, a Google Analytics Authorized Consultant, who I previously met at Google's Headquarters in Mountain View, California presented a case study around the use of Google Analytics and Google Website Optimizer. It was great to see John's presentation and how they are using Google's products within the Canadian market place.
Jim Sterne was the keynote speaker at the event, Jim is heavily involved within the analytics industry and is currently the Chairman of the WAA. I was surprised by his presentation's content due to the lack of insights and depth. The event was described as "sharing insight into the level of expertise among practitioners today; challenges faced; opportunities available; and the role we play as companies adopt the continuous improvement method of marketing optimization", so I am quite disappointed.
Jim's presentation did provide a engaging walk through of the historical development of web analytics, but it seemed to be aimed at organizations that are just beginning to realize the potential of analytics as a business and marketing tool. This got me thinking about the maturity of the analytics industry in Australia and how it is still very new to a lot of Australian companies.
I created the following graphic by overlaying two graphs from Google Trends. It presents the search volume for the phrase "Google Analytics" within Australia compared to the global search volume. I believe this is a fairly accurate reflection of how much Australian companies need to catch up, it is fair to say Australia is 18 months behind in the adoption of analytics.

Search volume for "Google Analytics"
(The spike on the left reflect the initial release of Google Analytics.)
Labels: Google Analytics Authorized Consultant, Google Website Optimizer, web analytics association