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

mr.j’s picture

Hi, I posted a hack for this here:
http://drupal.org/node/182334

hass’s picture

This 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.

StevenSokulski’s picture

I 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.

mr.j’s picture

True 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).

hass’s picture

Status: Active » Closed (duplicate)