Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

[ TIP] Track outgoing hits, while still tracking the outgoing hits.

Quote Reply
[ TIP] Track outgoing hits, while still tracking the outgoing hits.

I had to write this for a client for a job today, so thought I would share it - as I can imagine quite a few people would wanna use this :)

Basically, it lets you link outgoing links in your directory, as if you were just using:

<a href="<%URL%>" target="_blank"><%Title%></a>

...but still tracks the outgoing hits.

The steps are:

1) Open up /static/utils.js, and add:

function trackclick(aid) {
(new Image()).src="/cgi-bin/directory/track.cgi?ID=" + aid;
return true;

(be sure to change the /cgi-bin/directory/ to the correct place of track.cgi)

2) In link.html, find the bit that links to jump.cgi, and add this;

onclick="return trackclick(<%ID%>);"

..so it would look something like:

<a href="<%URL%>" target="_blank" onclick="return trackclick(<%ID%>);"><%Title%></a>

3) Upload the attached script to your cgi-bin, and CHMOD to 755. Be sure to edit the "path" (between '') to your path to the Glinks admin area.

Then, give it a go (get an example link, check the number of "Hits" that exist for it, and then do a test jump - and see if it increased)

Anyway, hopefully this is useful to people Smile


Andy (mod)
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!

Last edited by:

Andy: Nov 12, 2008, 2:03 AM