Closed (fixed)
Project:
Google Analytics
Version:
5.x-1.2
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
11 Jul 2007 at 01:13 UTC
Updated:
13 Mar 2008 at 18:29 UTC
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
Comment #1
Jurjen de Vries commentedI'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.
Comment #2
buddaThe 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?
Comment #3
racakg commentedTracking external outgoing clicks with google analytics module would be good.
See here: http://www.terenzani.it/54/urchintrack-utility-tracciare-link-esterni-e-...
Comment #4
buddaIgnoring 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.
Comment #5
buddaI've just added some download and outbound link tracking code to the dev version of GAnalytics module.
Comment #6
racakg commentedAwesome! Working like a charm! Thank you budda. :)
Comment #7
(not verified) commentedComment #8
vkr11 commentedSubscribe