Forum Moderators: DixonJones
If you publish advertising banners on your site, there is an easy way for you to track which banners visitors click on to leave your site and which advertisers they visit.
First, make sure that you have installed the UTM-5 (available at ftp://ftp.urchin.com/urchin5/utm-5/) on your website.
Next, you will need to add some code to each of the banners.
For an animated GIF or other type of static banner ad, you would add the following code:
<a href="http://www.advertisersite.com"
onClick="javascript:urchinTracker
('/bannerads/advertisername/bannername');">
This code causes each click on the banner to be logged as though it were a pageview named /bannerads/advertisername/bannername. It is a good idea to log all of your advertising banners into a logical directory structure such as /bannerads/the name of the advertiser/the name of the banner. This way, you will be able to easily identify the number of referrals to each advertiser.
-------------------------------------------------
Would it be possible to add this to the text link, however what would be placed in the onClick event?
Graham
That code would work for a text link as it is.
<a href="http://www.advertisersite.com" onClick="javascript:urchinTracker ('/bannerads/advertisername/bannername');">This is a text link</a>
I guess it would just be logged as if it was a normal banner, but if you give your text links a "bannername" different than real banners, you'll be able to find them easier.
That code would work for a text link as it is.
<a href="http://www.advertisersite.com" onClick="javascript:urchinTracker ('/bannerads/advertisername/bannername');">This is a text link</a>
So I don't need to change the ('/bannerads/advertisername/bannername') part at all, or can this be made more descriptive, to allow me to locate the clicks easier in my stats program?
Graham
I'd like to do this on my site as well -- did this work?
Just a quick note to let everyone know that I have now sorted out this issue.
Yes, it will work if you are using Urchin for your tracking.
I am using Urchin version 5x, and was advised that I need to include the latest Urchin urchinTracker function which can be downloaded and added to your root folder from ftp://ftp.urchin.com/urchin5/utm-6/
If anyone still needs advice on this, drop a reply on the board
Thanks for all those who replied.
Graham