How do I add a website to Google Analytics that has urchin code tracking?

Today I was making some changes for a client to an outdated website that I created for them back in 2003. Actually this one was likely a 2005 incarnation considering all the Flash that was involved in it and the design style I used to have. I came across some good, old fashioned Google Analytics Urchin code.

You know the old school stuff when they first acquired Urchin Tracker. Here’s the code snippet:

<script src="" type="text/javascript">
<script type="text/javascript">// < ![CDATA[
_uacct = "UA-XXXXX-2";
// ]]></script>

Where the XXXXX is actually my account number. Now here’s the problem. I still use that account number for a number of sites, but the domain in question isn’t showing in my list of sites. I’d be happy to upgrade the outdated urchin.js code to the new Google Analytics code.

<script type="text/javascript">// < ![CDATA[
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXX-2']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
// ]]></script>

My concern though is that I would like to have access to the historical data. I’m sure that it’s still recording it somewhere. When I decide to add the site it creates a new id for the site (i.e. instead of -2 it’s -45).

So my question I guess is this:

How do I add a website to Google Analytics that has urchin code tracking?

Hopefully some geniuses that are attending PubCon this week in Las Vegas will be able to help me out with an answer.

1 Comment | Filed under Code Development, Internet

Pace Calculation

With all the running I’ve been doing I’ve been trying to figure out roughly what my pace is. In theory it’s easy. Take the amount of time you’ve run, or walked, or biked, or ‘insert blank here’ and divide that into sixty to get miles or kilometers per hour. The issue of course is turning the seconds into a fraction. This too is easy, simply divide them by sixty, because there’s sixty seconds in a minute. My formula looks something like this:

pace = 60 / (minutes + (seconds / 60))

Initially I had made a little Excel document to do the calculation for me but figured I should be able to whip it up in JavaScript pretty quick and have included it here for your use. Let me know your thoughts.


No Comments | Filed under Code Development, Fitness, Life

Does the Sukerfish suck?

A project I’m working on has a multi-level menu system. The one we’re currently using is a hacked up version of something old school that requires heavy JavaScript code to do browser detects, redraws and more. No I’m serious…it’s 442 lines of code in an ultimately powerful JavaScript file that’s just shy of 2300 lines…and most of it has been optimized and minified. So I went on my search to find another solution. Something more CSS based that our wonderful search engines will pickup on a little more effectively. I came across the Suckerfish Menu from A List Apart. Most of their stuff is really solid, and this tutorial doesn’t fall short of expectations. That being said after a little more fun with Google I came across Son of Suckerfish Dropdowns and immediately became intrigued. Both examples utilize a small chunk of JavaScript code (12-17 lines) a far cry from the 442 lines. For some reason it seems that the Son of Suckerfish Dropdowns works better, faster and is easier to implement. So I’m going to run through it and tweak it to my liking and specific needs.

It does post a question to ponder though…is there anything better, and if it doesn’t suck so much, why call it Suckerfish?

EDIT: Moments after posting this I suddenly realized that I’m also using jQuery already, so maybe there’s an easier way! I hit a quick Google search and sure enough there’s a jQuery Suckerfish Menu. Poking around a little more though and there’s a Superfish Menu – Suckerfish on ‘roids apparently. Maybe I’ll have to try them both. Any other suggestions?

No Comments | Filed under JavaScript, jQuery