I noticed in the default phpdig template the following code just below the </style> tag:
Code:
<phpdig:js_for_clicks/>
All of my header stuff for my template is in a php object, which I think would treat that as a literal rather than parsing it, so I started looking around for where js_for_clicks is defined (which is in search_function.php) and added the following code to my template header just below my CSS file definition:
Code:
<script language="JavaScript">
<!--
function clickit(cn,clink) {
if(document.images) {
(new Image()).src="clickstats.php?num="+cn+"&url="+clink+"&val=".urlencode($js_string)
}
return true;
}
//-->
</script>
However, the click stats still aren't getting logged. What am I missing? I don't understand a lot of javascript, so I don't know if the above code is incorrect or if it's something else that is the problem.
Thanks in advance.