I spent a few hours trying to figure out how to implement our HitBox web analytics code into our Drupal site, and figured I'd post the info here for anyone else looking for it.
This tutorial explains how to implement the HitBox code using external .js files.
1)Start off by obtaining the HitBox analytics code from within your WebSideStory account. Paste this into a text editor.
2)Remove all instances of <javascript> and/or </javascript>
; basically anything that has HTML markup.
3)Your code should look like this in the beginning (note this is for HitBox professional, not HBX):
var _pn="PUT+PAGE+NAME+HERE"; //page name(s)
var _mlc="CONTENT+CATEGORY"; //multi-level content category
var _cp="null"; //campaign
var _acct="WR5605117NAC70EN3"; //account number(s)
var _pndef="title"; //default page name
var _ctdef="full"; //default content category
4)Make sure to remove the instances of the javascript tag reference throughout the lower portion of your code
5)Save this code to either your theme directory, or your root directory (you will reference this later). I chose the theme directory.
6)Open your page.tpl.php file and add the folowing code directly beneath the opening body tag:
<script src="/themes/box_grey/hitboxcode.js" language="javascript" type="text/javascript"></script>
The name of your file should be replaced where i wrote "hitboxcode.js". Make sure to reference to correct location of your .js file.