Closed (duplicate)
Project:
Google Analytics
Version:
7.x-1.x-dev
Component:
Code
Priority:
Minor
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
22 Nov 2007 at 15:07 UTC
Updated:
30 Dec 2007 at 01:53 UTC
When I use explicit calls to the urchin_tracker in my page, i.e. to track clicks on outbound links, I need the urchin_tracker include at top of my page.
Currently the code is inserted via hook_footer at the bottom of <body>. Maybe it's possible to provide a switch in the admin ui to have the code inserted at the top.
Thx a lot.
Rainer
Comments
Comment #1
mr.j commentedHi, I posted a hack for this here:
http://drupal.org/node/182334
Comment #2
hass commentedThis outbound link tracking function is only called after a user clicks on the link. This will only happens after the page is fully loaded. After the page is fully loaded - all urchin functions are available and you can add outbound link tracking in a higher code position then the urchin JS file is included... it may be better to move up - for sure, but not absolutely required.
Comment #3
StevenSokulski commentedI would suggest against doing this, as the urchin.js file is rather large and unless you have it cached loading it at the beginning prevents the rest of your page from loading until urchin is present.
Comment #4
mr.j commentedTrue but if you don't want to miss clicks that are done before the script (which is the last thing on the page) has fully loaded, then you need to move it to the head of the page.
There will only be a delay until the script is cached (first page load).
Comment #5
hass commentedhttp://drupal.org/node/182334