Current Page Name PHP and HitBox Javascript Code


I am not sure how many people use HitBox... but for tracking page views and such...It can't be beat!
Except for the fact that you have to manually name a variable for each page... Who has time for that??!!??

Try this instead.....
Code:

<!-- BEGIN WEBSIDESTORY CODE -->
<!-- COPYRIGHT 1997-2001 WEBSIDESTORY, INC. ALL RIGHTS RESERVED. U.S.PATENT PENDING. Privacy notice at: http://websidestory.com/privacy -->
<!-- webbot bot="HTMLMarkup" startspan -->



<?
###this sets the variable pagename for use in the Javascript below###
$pagename = getenv(SCRIPT_NAME);
?>


<script type="text/javascript"> 
<!-- //
	//this is a dynamic call to get the page name
	var pagename = "<?php echo $pagename; ?>"; 
	//this is a category name (optional but darn handy for multiple sites in HitBox)
	var contentcat = "CATEGORY+NAME+GOES+HERE";
// -->
</script> 


 <script language="javascript">
var _pn= pagename;  	//page name(s)
var _mlc=contentcat;	//multi-level content category
var _cp="null"; 	//campaign
var _acct="HITBOX+ACCOUNT+NUMBER+GOES+HERE"; 	//account number(s)
var _pndef="title";	//default page name
var _ctdef="full"; 	//default content category
var _dlf="n";	//download filter
var _elf="n";	//exit link filter
var _epg="n"; 	//event page identifier
var _hcv=68;	//code version
var _mn="wp179"; //machine name
var _gn="ehg.hitbox.com"; //gateway name
var _lp=location.protocol.indexOf('https')>-1?'https://':'http://';
function _wn(_nm){if((_nm.indexOf("NAME")>0&&_nm.indexOf("PUT")>=0)||
(_nm.indexOf("CONTENT")>=0&&_nm.indexOf("CATEGORY")>0))return true;return false;}
function _gd(_x,_w){_ed = (_x.lastIndexOf("/"));
_be = (_w!="full")?(_x.lastIndexOf("/",(_ed-2))):(_x.indexOf("/"));
_dn = (_be==_ed)?"/":(_x.substring(_be, _ed));return _dn;}
function _gf(_x){_ed = (_x.length);_be = ((_x.lastIndexOf("/"))+1);
_fn = (_x.substring(_be, _ed));return _fn;}
function _vc(_ml){_mll=_ml.length-1;if(_ml.lastIndexOf("/")==_mll){_ml=_ml.substring(0,_mll)}
if(_ml.indexOf("/")!=0){_ml="/"+_ml;}return _ml;}
function _ps(_ip,_pml){if(!_ip){_pml=(_wn(_pml))?_gd(location.pathname,_ctdef):_vc(_pml);}
else{if (_wn(_pml)){if (_pndef=="title"){_pt=document.title; if (_pt!=""){_pml=_pt};}
else{_pml=_gf(location.pathname);if (_pml==""){_pml=_pndef};}};}return _pml;}
function _pm(_ml,_fml,_ipn){if (_ml.indexOf(";")!=-1){_nml=_ml.substring(0,(_ml.indexOf(";")));
_rm=_ml.substring((_ml.indexOf(";")+1),_ml.length);_fml+=_ps(_ipn,_nml)+";";
_fp=_pm(_rm,_fml,_ipn);return _fp;}else {_fml+=_ps(_ipn,_ml);return _fml;}}
var _sv=10;var _bn=navigator.appName;if(_bn.substring(0,9)=="Microsoft"){_bn="MSIE";};
var _bv=(Math.round(parseFloat(navigator.appVersion)*100));if((_bn=="MSIE")&&(parseInt(_bv)==2))_bv=301;
var _rf=escape(document.referrer);_mlc=_pm(_mlc,"",false);_pn=_pm(_pn,"",true);
</script><script language="javascript1.1" id="_hbc">_sv=11;</script>
<script language="javascript1.1" defer src="http://stats.hitbox.com/js/hbp.js"></script>
<script language="javascript">if (_sv==10){if (document.cookie.indexOf("CP=")!=-1){_ce="y";}else{
document.cookie="CP=null*; path=/; expires=Wed, 1 Jan 2020 00:00:00 GMT";
_ce=(document.cookie.indexOf("CP=")!=-1)?"y":"n";};if((_rf=="undefined")||(_rf=="")){_rf="bookmark";};
_x2="<img src='"+_lp+_gn+"/HG?hc="+_mn+"&hb="+escape(_acct)+"&n="+escape(_pn);
_x3="&cd=1&hv=6' border=0 height=1 width=1>";
_ar="&bn="+escape(_bn)+"&bv="+_bv+"&ce="+_ce+"&ss=na&sc=na&dt=&sv="+_sv+"&con="+escape(_ct);
_ar+="&vcon="+escape(_mlc)+"&epg="+_epg+"&hp=u&cy=u&ja=na&ln=na&cp="+escape(_cp)+"&pl=&rf="+_rf;
document.write(_x2+_ar+_x3);}document.write("<\!--");</script>
<noscript><img src="http://ehg.hitbox.com/HG?hc=wp179&cd=1&hv=6&ce=u&hb=WE520328KERF01EN3&n=PUT+PAGE+NAME+HERE&vcon=CONTENT+CATEGORY" border='0' width='1' height='1'>
</noscript><!--//-->
<!-- END WEBSIDESTORY CODE  -->


Thanks and drop me a line if you need help....

jeremy@aheadofmytime.com


AHEADOFMYTIME.COM is a full service web and interactive development firm. We offer electronic marketing that is supported by high quality print materials and campaigns for Chicago business. We are also a Microsoft Certified Partner for Network and PC Computer support and troubleshooting. Macromedia certified solution provider is also a title we carry in Geneva, Fox Valley, Oswego and Naperville. Flash is our middle name. Director of multimedia solutions is my title. Jeremy Faust President and CEO. Strategic marketing solutions for your sales efforts. We have done work for names like chevy abc television who wants to be a millionaire drew carey oscar awards oscar statue bridgestone firestone ford alias Disney internet group abc.com search engine optimization, seo, search engines, web design firm, web design firm illinois, web design firm chicago, graphic design firm illinois, graphic design firm, graphic design firm chicago, website design illinois, design firm illinois, web design illinois, graphic design illinois, graphic design chicago, print design chicago, web design chicago, marketing firm chicago, marketing agency chicago
AHEADOFMYTIME.COM is a full service web and interactive development firm. We offer electronic marketing that is supported by high quality print materials and campaigns for Chicago business. We are also a Microsoft Certified Partner for Network and PC Computer support and troubleshooting. Macromedia certified solution provider is also a title we carry in Geneva, Fox Valley, Oswego and Naperville. Flash is our middle name. Director of multimedia solutions is my title. Jeremy Faust President and CEO. Strategic marketing solutions for your sales efforts. We have done work for names like chevy abc television who wants to be a millionaire drew carey oscar awards oscar statue bridgestone firestone ford alias Disney internet group abc.com search engine optimization, seo, search engines, web design firm, web design firm illinois, web design firm chicago, graphic design firm illinois, graphic design firm, graphic design firm chicago, website design illinois, design firm illinois, web design illinois, graphic design illinois, graphic design chicago, print design chicago, web design chicago, marketing firm chicago, marketing agency chicago

View Jeremy Faust's profile on LinkedIn



Copyright 2007 AHEADOFMYTIME.COM Interactive Solutions
Mt. Vernon  | Downers Grove  | Hennepin  | Downers Grove  | Libertyville  | Geneseo - Illinois IL
.......  Web and Website Design and Development  .......