GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   An Improved Click Tracking Method, technical (https://gfy.com/showthread.php?t=917120)

BestXXXPorn 07-21-2009 10:18 AM

An Improved Click Tracking Method, technical
 
I wrote previously how some sponsors strip the query string when receiving traffic from a header redirect (IOW, you lose your affiliate ID if you send traffic from a header redirect).

In search of a better solution to this so that I could have 100% reliable click tracking AND 100% of sponsors wouldn't lose my affiliate information I came up with this technique:

On any outgoing link, rather than sending them to a forwarding page add an onclick handler to the link tag:

Code:

<a href="http://somesponsor.com/?foo=bar" onclick="return clickTrack(yourTrackingId);">Some Anchor Text</a>
In your JS function "clickTrack" simply perform an AJAX request to your tracking script and pass in the necessary information you require for tracking. If you use Prototype something like this:

Code:

function clickTrack(id)
{
  var url = '/link?from='+escape(document.location.href.toString())+'&id='+id;
  new Ajax.Request(url, {
    method: 'get',
    onSuccess: function(transport) {
      return true;
    }
  });
       
  return true;  //Added in case the request fails...
}

This was made simply as an example but it works great without worrying about how any sponsor will receive your clicks since they are all sent using the standard link. We're just adding in an in between step... Of course, you can add in any number of tracking items to be passed through such as which link on the page they clicked (specifically), the x, y coordinates of the click, sky is the limit and you have quite a bit more UI options since this is handled through Javascript.

Anyway, just thought I would share...

BestXXXPorn 07-21-2009 10:19 AM

Final note: If you're worried about linking directly to a sponsor for SEO reasons (or other)... then this may not be an option for you.

OrangeContent 07-21-2009 10:59 AM

Thanks for your idea.

I hope someone utilizes it / improves it and then implements it.

I sometimes wonder how many sales I'm actually missing out on due to deleted / overwritten cookies.

BestXXXPorn 07-21-2009 12:29 PM

Bump for anyone interested in improving their site...


All times are GMT -7. The time now is 02:11 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123