View Full Version : Google Urchin Tracker
Hi all,
Just wondering how can i place urchintracker code from google to track goals on "buy now" image?
any idea?
Thanks
KS
I dont know anything about urchintracker but if it's only to track clicks on the buy now image, you could put it in goto.php
dear andy,
Thanks for your reply, can you explain a little detail how this can be done?
ks
Ah, just looked up urchin tracker!
Its javascript, so in order for it to work, you will have to execute it to the browser.
So, try this............... (untested!!)
open goto.php
Find: the php function sendUser($sPClickUrl)
straight after the first curly brace { you'll see this:
header("Location: ".$sPClickUrl);
exit;
replace it with something like this:
?><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>redirecting...</title>
<meta http-equiv="refresh" content="0">
</head>
<body>
<center>redirecting</center>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct="UA-xxxx-x";
urchinTracker();
</script>
</body>
</html><?PHP
That would (should) track every user that goes through that file.
If you want it on all the other pages, look in templates/YOURTEMPLATE/
Those tpl files are where you should be putting your urchintracker code.
As I said, UNTESTED, so you might have to play around abit.
Good luck!!