An Improved Click Tracking Method, technical

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • BestXXXPorn
    Confirmed User
    • Jun 2009
    • 2277

    #1

    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...
    ICQ: 258-202-811 | Email: eric{at}bestxxxporn.com
  • BestXXXPorn
    Confirmed User
    • Jun 2009
    • 2277

    #2
    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.
    ICQ: 258-202-811 | Email: eric{at}bestxxxporn.com

    Comment

    • OrangeContent
      Confirmed User
      • Mar 2009
      • 381

      #3
      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.
      START A REVIEW SITE GOOD PRICES ON WRITTEN REVIEWS CLICK HERE
      quote (at) orangecontent.com | ICQ: 564-113-756

      Comment

      • BestXXXPorn
        Confirmed User
        • Jun 2009
        • 2277

        #4
        Bump for anyone interested in improving their site...
        ICQ: 258-202-811 | Email: eric{at}bestxxxporn.com

        Comment

        Working...