Visitor Log

Hello,

first of all sorry for my bad english :wink:

Today i recognized that yesterday at 10 o clock there were many more visitors as on other timesā€¦

Is it possible to get visitor details from some day at a special time?
e.g. i click on a time at ā€œvisits by server timeā€ => I get a list with IP, Referer, and so on from every visitor?

E.G: Data from visitors->visitor log-> and now filter only this day and hour which i clicked beforeā€¦

Thanks in advance!

Iā€™m sorry but i fear that Piwik canā€™t do hourly reports.

You could have detailled information like you wish, but the time frame would span an whole day.

Adding hourly reports would multiply the data in the database by 24.

I currently have 12 sites in my piwik and most of them only receive a few visit per day if any, and my last clean installation of Piwik was in the middle of May. Yet my database is already taking a lot of space. Doing some math, i think currently for one year of usage, my DB would take as much as 60 MB on my host.

Do you really that to get multiplied by 24 ? This would result in about 1 GB of data per year and remember that my sites dont get a lot of visits.

But, for the details information about visitors, it could look like this :

synaptique.ca/visitpathinfo/pathinfo.htm

[quote=TulipVorlax @ Jun 21 2010, 08:44 AM]Iā€™m sorry but i fear that Piwik canā€™t do hourly reports.

You could have detailled information like you wish, but the time frame would span an whole day.

Adding hourly reports would multiply the data in the database by 24.

I currently have 12 sites in my piwik and most of them only receive a few visit per day if any, and my last clean installation of Piwik was in the middle of May. Yet my database is already taking a lot of space. Doing some math, i think currently for one year of usage, my DB would take as much as 60 MB on my host.

Do you really that to get multiplied by 24 ? This would result in about 1 GB of data per year and remember that my sites dont get a lot of visits.

But, for the details information about visitors, it could look like this :[/quote]

usually i user google analytics to see that informationā€¦

By the way, the new Visitor log show details of each visit with the pages they visited.

Hey, I found this thread by google searching as I was trying to find hourly reporting for piwik. Seeing that there wasnā€™t hourly reporting, I ended up looking at the database and found it had all the information necessary so I created the database calls and printed out the hourly info in a nice format using php. Furthermore, I created an html form to let one type in the necessary info to get the information.

Iā€™m using this for tracking campaign information (Not ā€œvisitorsā€), as I use campaigns for tracking images using my own custom code, so I only need to type in the campaign name and keyword to retrieve the hourly info. Iā€™ve attaced the files should it be helpful to anyone else.

PHP hourly reporting code (Filename:getHourlyStats.php)


<?php
// Make a MySQL Connection
$host        =    "localhost";
$user        =    "craigs15_admin";
$pass        =    "cowabunga";
$tablename    =    "craigs15_everythingelse";

    $con = mysql_connect($host,$user,$pass) ;
    
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }
  
  mysql_select_db($tablename, $con);
  
$query = "select visit_first_action_time
from piwik_log_visit
where referer_name LIKE '%".$_GET["name"]."%' AND referer_keyword LIKE '%".$_GET["keyword"]."%'
order by visit_first_action_time ASC"; 
	 
$result = mysql_query($query) or die(mysql_error());

$i = 0;
$ithHour=0;
$numWithinHour=0;
$lowestDate;
$lowestDateInSecs;
$nextHourInSecs;
$nextHourInDate;
while($row = mysql_fetch_array($result))
{
	$date=$row['visit_first_action_time'];
	
	//$datetime1 = new DateTime('1970-10-11');
	$datetime2 = new DateTime($date);
	
	
	
	//$interval = date_diff($datetime1, $datetime2);
	$dateInSecs = $datetime2->format('U');//$interval->format('%s');
	
	if($i==0)
	{
		$lowestDate = $datetime2;
		$lowestDateInSecs = $dateInSecs;
		$nextHourInSecs = $lowestDateInSecs+60*60;
		$nextHourInDate = $lowestDate;
		date_add($nextHourInDate, date_interval_create_from_date_string('1 hour'));
	}
	//echo $dateInSecs.":".$nextHourInSecs."<br>";
	if($dateInSecs>$nextHourInSecs)
	{
		$nextHourDateAdj = clone $nextHourInDate;
		date_sub($nextHourDateAdj, date_interval_create_from_date_string('7 hours'));
		echo "Hour ".$ithHour.": ".$numWithinHour." views   ...  ".$nextHourDateAdj->format('Y-m-d H:i:s')."<br>";
		$nextHourInSecs+=60*60;
		$numWithinHour=0;
		$ithHour++;
		date_add($nextHourInDate, date_interval_create_from_date_string('1 hour'));
	}
	else
	{
	  $numWithinHour++;
	}
	$i++;

}

echo $i;

?>

HTML form to access the data, search by campaign name & keyword


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"><title>GetHourlyReport</title></head><body><form method="get" action="getHourlyStats.php" name="hourstats"><table style="text-align: left; width: 100%;" border="1" cellpadding="2" cellspacing="2"><tbody><tr><td>campaign name:</td><td><input name="name"></td></tr><tr><td>keyword:</td><td><input name="keyword"></td></tr></tbody></table><input name="submit" value="submit" type="submit"><br></form></body></html>