Covid-19: Valuable Marketing Resources and Information.

Articles in The 'gatc' Tag


November 14 2008

Che Sta Accadendo? Another change to the GA Tracking Code?

by MoreVisibility

My Italian friends at goanalytics.info have probably already noticed this as well – when I logged in to my Google Analytics account today to create a new profile (using an existing domain), I saw a GA Tracking Code that looked different:

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

The Legacy Tracking Code (urchin.js) also has been updated to include these new “try – catch” enclosure:

<script src="https://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
try {
_uacct = "UA-XXXXXX-1";
urchinTracker();
} catch(err) {}
</script>

It does not appear that any data collection has been affected, which means you most likely won’t have to change any coding on your website, unless Google Analytics officially releases a statement via their blog. However, I am big proponent of having the most up-to-date code on your website if possible, so if these new coding variables stick around for a while, you may want to go ahead and update your website to match.

Also, as a side note, there is a known bug with the Reverse Goal Path report in the Goals section of your Google Analytics profile(s). If you’re noticing some strange data appearing in there – don’t worry, the folks at Google Analytics are well aware of this issue and are doing their best to repair the report, as soon as they possibly can.

August 6 2008

Rest in Peace, _initData.

by MoreVisibility

Take a look at the following two sets of Google Analytics Tracking Code. Can you spot the difference between the two?

Old GA.js Tracking Code:

<script type="text/javascript">
var gaJshost = (("https:" == document.location.protocol) ? "https://ssl." :
"http://www.");
document.write(unescape("%3C script src='" + gaJsHost + "google-analytics.com/ga.js'
type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-1234567-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>

New GA.js Tracking Code:

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

As of very recently, the great folks at Google Analytics have removed the following line of code:

pageTracker._initData();

…and have modified the actual GA.js tracking file to execute this command automatically.

What this means for you:

Until Google Analytics makes some sort of announcement about it, this does not mean anything to you. There has been no interruption in the collection of data or the display of data in all of your Google Analytics Accounts. Also, it will not “hurt” you to keep _initData in your Google Analytics Tracking Code on the pages of your website. So, don’t worry, and don’t send in that request to your IT or Web Development team quite yet.

If you’d like to be proactive about it, simply remove:

pageTracker._initData();

from the GA Tracking Code on all of the pages on your website, and you should be good to go.

© 2021 MoreVisibility. All rights reserved.