Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Contributor Greg Ross

    (@gregross)

    Have you enabled the honey pot option?

    If you enable exclusion tracking, what reasons have values?

    Thread Starter paul331

    (@paul331)

    I didn’t enable any specific options. I just installed and use default options. I checked: Honey Pot option is disabled. Record exclusions also disabled.

    I think that some visits incorrectly divided by days. For example in one days it says 50 visits on 250 visitors and the next day 2000 visit on 270 visitors. Probubly some of those 2000 are from the previous day.

    Plugin Contributor Greg Ross

    (@gregross)

    Unlikely, I think I may have found a race condition that could cause this if a lot of visits happened at nearly the same time.

    I’ve added a fix for the race condition to the next release (which should be out in the next couple of days).

    Thread Starter paul331

    (@paul331)

    Thank you. I hope that after the new release those lapses will go away. I really like your plugin and there is not much good alternatives. I used to use JetPack Statistics and those work pretty well, but the problem with JetPack that its like an elephant and dramatically slows down the site.

    Plugin Contributor Greg Ross

    (@gregross)

    If your feeling adventurous, you can edit wordpress/wp-content/plugins/wp-statistics/includes/classes/hits.class.php, line 273-281 should be:

    $this->db->update(
    	$this->tb_prefix . "statistics_visit",
    	array(
    		'last_visit'	=>	$this->Current_Date(),
    		'visit'			=>	$this->result->visit + $this->coefficient
    	),
    	array(
    		'last_counter'	=>	$this->result->last_counter
    	)
    );

    replace them with:

    $sqlstring = $this->db->prepare( 'UPDATE ' . $this->tb_prefix . 'statistics_visit SET visit = visit + %d, last_visit = %s WHERE last_counter = %s', $this->coefficient, $this->Current_Date(), $this->result->last_counter );
    
    $this->db->query( $sqlstring );
    Thread Starter paul331

    (@paul331)

    Thank you. I did the change in php file.
    Here is the sceenshot of mine wp_statistics_visit database

    Link1

    As you can see there some duplicate dates for some reason.

    Also I did SQL query for 03-05-2015 and got 1287 hits.

    Link2

    Why do you need wp_statistics_visit table? If you can get hits from wp_statistics_visitor table. And what is wp_statistics_visitor2 for?

    Plugin Contributor Greg Ross

    (@gregross)

    The duplicate dates are due to a race condition I haven’t been able to resolve yet (the first time a hit happens in a day if there are two very close together, like a bot hitting the site, two entries may get created).

    The addition of hits for visitors is relatively new, but even so having to sum each time you want a daily total would be a significant performance hit on the SQL server.

    I don’t know what wp_statisitcs_visitor2 is, we don’t create a table with that name.

    Thread Starter paul331

    (@paul331)

    After I made the changes for the hits.class.php that you suggested it started to dublicate multiple records for the same day in wp_statistics_visit. Is it suppose to be like that?

    Link1

    Thread Starter paul331

    (@paul331)

    Could that be the problem because people visit from different timezones?

    My server is in Ukraine and the timezone is GMT+2. So when someone visits the site from US with timezone GMT-5 that creates the problem. For example in Ukraine it is 03-07-2015 3:00AM but in US it is still 03-06-2015 8:00PM. Will his visit count for 03-07-2015 or for 03-06-2015?

    I looked at the function Current_Date and you use date function. Whould it be more correct to use gmdate insted of date?

    Thread Starter paul331

    (@paul331)

    Actually I noteced that those duplicates in visit’s tables started from mid-February. Before that everything was fine.

    Plugin Contributor Greg Ross

    (@gregross)

    The next release is going to have a significant change that should resolve the duplicate entries once and for all.

    Plugin Contributor Greg Ross

    (@gregross)

    Version 9.1 includes the fix for the duplicate entries.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Visits number is incorrect’ is closed to new replies.