Could the inclusion of the Google Analytics JavaScript snippet be moved from directly before the HTML end-body tag to directly after start-body tag, to allow the use of manual tracking functions such as urchinTracker()? Such placement is perfectly valid for normal tracking, and is required when performing manual tracking.

Comments

Jurjen de Vries’s picture

I've the same feature request, but also with the posibility to rewrite all outgoing external URL's to the Google outgoing javascript code
'onClick="javascript:urchinTracker('/outgoing/orginal-url)'

Also see http://www.google.com/support/googleanalytics/bin/answer.py?answer=55527...

This should by handy so I don't have to rewrite all outgoing URL's by hand in the page editor.

budda’s picture

The Urchin script is included at the footer of the site to prevent delays in page loading due to slow loading of the javascript from an external domain.

This post mentions adding the tracking javascript just before the closing body tag.

I'm open to patches which will move the output script around if people want to track onclick events. I was under the impression onclick JavaScript wasn't executed/parsed until the event triggered?

racakg’s picture

Tracking external outgoing clicks with google analytics module would be good.

See here: http://www.terenzani.it/54/urchintrack-utility-tracciare-link-esterni-e-...

budda’s picture

Status: Active » Postponed (maintainer needs more info)

Ignoring the outbound link tracking, as that is a different issue...

What is wanted here? just to move the optional advanced snippet code placement to the top of the ? I'm not clear what advantage this would have, as the rest of the document would not have loaded yet.

budda’s picture

Status: Postponed (maintainer needs more info) » Fixed

I've just added some download and outbound link tracking code to the dev version of GAnalytics module.

racakg’s picture

Awesome! Working like a charm! Thank you budda. :)

Anonymous’s picture

Status: Fixed » Closed (fixed)
vkr11’s picture

Subscribe