Page 1 of 1

Counts clicks twice

Posted: Sat Jan 31, 2015 12:31 am
by Zavarzin
I added links to CCount and then shortened with Bit.ly but when I look at statistics CCount shows visits twice.

Is there any solution to this?

Re: Counts clicks twice

Posted: Sat Jan 31, 2015 9:12 am
by Klemen
Does the same thing happen in you use original CCount generated links?

Re: Counts clicks twice

Posted: Sat Jan 31, 2015 9:39 pm
by Zavarzin
No, this only happens when I shorten with Bitly.

Re: Counts clicks twice

Posted: Sun Feb 01, 2015 10:34 am
by Klemen
It appears Bitly sends a bot to the link used for something like determining popular links.

You can try opening click.php and just below

Code: Select all

define('IN_SCRIPT',1);
add

Code: Select all

if ( isset($_SERVER['HTTP_USER_AGENT']) && strpos($_SERVER['HTTP_USER_AGENT'], 'TweetmemeBot') !== false)
{
	die('');
}

Re: Counts clicks twice

Posted: Sun Feb 01, 2015 5:50 pm
by Zavarzin
Thanks. But if I insert this code, will my Twitter statistics still show clicks and country or they won't work?

Re: Counts clicks twice

Posted: Mon Feb 02, 2015 7:09 pm
by Klemen
It will block a bot used by Bitly, not your Twitter account.

Re: Counts clicks twice

Posted: Wed Feb 04, 2015 12:25 am
by Zavarzin
I've added the code, but unfortunately it doesn't solve the problem.

CCount shows 10s times more clicks than Twitter.

Re: Counts clicks twice

Posted: Wed Feb 04, 2015 6:42 am
by Klemen
In that case I can't be of help - CCount works fine (as proved if you use CCount generated links), but Twitter (or Bitly) probably verifies links and CCount counts visits from their bots.