New Google Analytics Code

closeThis post was published 12 years 28 days ago. A number of changes have been made to the site since then, so please contact me if anything is broken or seems wrong.

Google has released a new version of the Google Analytics JavaScript, as well, named ga.js. It replaces the old function- and variable-based calls with a new object-oriented style, and was rewritten to support event tracking. Other new features include the currently in-beta outbound link tracking and the in-rollout site search tracking. The code’s structure has changed completely, so sites using calls to urchinTracker() in multiple places (i.e. not just in the tracking code) will need to plan their upgrades so as not to leave data holes. The old urchin.js should be supported for a while, as the old Analytics reporting interface was earlier this year. I’ll have to update all of my sites (I have several using GA), but fortunately, I only have one, maybe two, instances of extra calls to urchinTracker(), and I will probably remove those when outbound link tracking is enabled or replace them with the new event tracking.

dgw

I am an avid technology and software user, in addition to being reasonably well-versed in CSS, JavaScript, HTML, PHP, Python, and (though it still scares me) Perl. Aside from my technological tendencies, I am also a theatre technician, sound designer, violinist, singer, and actor.

Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail (or subscribe without commenting)

Comments are subject to moderation, and are licensed for display in perpetuity once posted. Learn more.