ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

AJAX Linktracker - Tracking one click only?

February 01, 2012 7:19am

Subscribe [2]
  • #1 / Feb 01, 2012 7:19am

    JayJ

    10 posts

    Hi there,

    My company’s website use this third-party mod to track clicks on our downloads pages. This all works fine - however, one thing that I can’t seem to account for is multiple clicks.

    Scenario: someone ends up on one of our download pages and clicks a link… whether it’s because of our web server, their internet connection, their browser settings, the alignment of the planets - there isn’t an instant download pop up - so they click again, and again… All the time, the Linktracker code is registering a hit per click.

    I had someone register 26 clicks over a 1 minute period. I contacted the person to check if they had an issue with the website, and they told me their security doesn’t like downloads and so he was hoping to fool his settings by clicking faster… Ok…

    Anyways, I would like to know if anyone has tinkered with the Linktracker code so that it only registers one click per page? for those of you who are familiar with the mod, do you think it’s possible? I’m no expert with PHP, and don’t want to go breaking something - so was hoping there was something really simple I could do before I had to wade through a load of code that I most likely won’t understand lol.

    EE v1.6.9
    AJAZ Linktracker v1.0.2

    I know there is a v1.0.3, but the guy who built my website had to do some tinkering with the mod to get it to work with Firefox, and so I’ve been reluctant to make any changes.

    Suggestions appreciated.

  • #2 / Feb 01, 2012 9:07am

    Pv Ledoux

    95 posts

    To solve that kind of problem, we have used a javascript which disable the button for 30sec or so. It’s a bit brutal, but clicking 10 times because the download is a bit slow to start too 😉

  • #3 / Feb 03, 2012 10:21am

    JayJ

    10 posts

    I don’t suppose you have an example of this kind of code knocking around do you by chance? I’m not sure if that is the solution we would want to go with, but it seems the best on offer thus far.

    Cheers, Jay

  • #4 / Feb 03, 2012 5:03pm

    Pv Ledoux

    95 posts

    Yep! Somtehing like that:

    $(function(){
    if($('.download_button').length>0){
    
     $('.download_button').click(function(){
    
      var content =$(this).html();
      $(this).empty();
    
      $(this).append('<a>please wait the dialog box…</a>');
      var current=$(this);
    
      setTimeout(function(){
       current.empty();
       current.append(content);
      }, 5000)
     });
    
    }
    });

    This should a good start 😉

    Regards,

    Pv

  • #5 / Feb 17, 2012 8:17am

    JayJ

    10 posts

    Thank you Pv, apologies for the slow reply - I’ve been off.

    Cheers, Jay

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases