Can't see totals for week, month or year

[BTW, I read the other post “Can’t display weekly and mothly stats, Only daily stats are diaplayed” and it does not help me!]

Just installed ver.8 but i can’t see week, month or year totals in Dashboard or All Websites view but can only see daily totals.

The only place I can see week, month or year totals is in the Visitor Log view.

I had previously successfully installed and used ver.7 and could see see totals for week, month and year totals.

To install ver 8 I deleted entire ver.7 files, dropped all tables, then reinstalled ver.8 from scratch. The installation was all green checks, everything else seems to work fine, i have setup about 10 websites, and all are tracking fine.

A resolution in another thread said it was due to php version but i have php ver 5.2.# and note that ver7 on same server/environment previously it worked!

  • i re-uploaded all files via FTP to make sure i didn’t miss a file
  • piwik_archive tables have counts for period=1 2 or 3
  • I dropped the archive tables and left Piwik recreate them

But no week, month or year in any website or All website view.

Any ideas what is cause of this?


I sometime have the same problem that everything except daily reports give no data.

For me, it goes and comes.

It also seems that i have a problem with hours in Piwik (or timezone) because tomorrow is often selectable hours before the time it should be (as if Piwik use a GMT 0 hour to tell when a new day is awaillable instead of using the America/Montreal like i’ve set everything to).

I think that this last problem cause the previous one.

Do you experience the same thing ?

My problem is constant … not like yours which comes and goes.

I might have hits registering “early” (eg they show at a UTC timezone time different from when they happened/should have been recorded) as you are experiencing but have to look into it some more.

However, that made me think … so I experimented … and changed one of my website’s timezone from UTC-7 to UTC 0 and voila that website’s week, month and year totals appeared in the Dashboard and All Website views.

I experimented with various UTC changes to see effect they would have:

UTC 0 to UTC -5 --> week, month and year totals appear!

UTC -5.30 and down --> did not show week, month and year totals : (

UTC 0 to UTC +14 --> week, month and year totals appear!

So my resolution is to change my websites’ UTC timezones to UTC 0 (I just picked one that would work) so that I can see week, month and year totals.

But in interest of more effective permanent resolution … can any Piwik developer or technically inclined person advise what queries, javascript, php module plays a role in the week, month and year totals? I bet there is a timezone variable in a query or other variable dependent on UTC timezone that is preventing week, month and year totals from appearing. The question is why does it not affect all users!

This is surprising. What kind of traffic do you have? Have you tried running the archiving script (How to Set up Auto-Archiving of Your Reports - Analytics Platform - Matomo )

If you send me by email bug desccription + url + login/pwd to your piwik, I can take a look.

To answer your questions:

  • visitors cumulative over life of Piwik installation < 50

  • i didn’t run the auto archive script but had “Allow Piwik archiving to trigger when reports are viewed from the browser” = Yes and “Reports for today will be processed at most every” = 10 seconds (isn’t auto archive script doing same function?)

However, I found success.

I did some more experimenting by dropping the piwik_archive_numeric_xx tables again. Then I changed timezone back to UTC-7 and I could see week, month or year totals in Dashboard or All Websites views! (Note that i dropped archive tables previously but with timezone = UTC -7 … it is only after switching to UTC = 0 and dropping archive tables that had this desired result)

Anyways, my issue is resolved, though it appears there is still some issue in Piwik.

I suspect it is likely that a UTC/timezone variable in a query or other variable dependent on UUTC/timezone that somehow selectively involved with presenting week, month and year totals from appearing. I say presenting bc, the archive tables had the required data for periods week, month and year but they were not being displayed.

Also, it appears that this is a sequential thing eg UTC -7 to UTC 0 then drop/recreate archive tables and it is back to normal.

Aw, it didn’t work. Now the week, month and year totals are not showing. It appears that this is definitely related to server time relative to the website timezone selected.

If any Piwik developer reads this, can you please list the files (php, js) which are involved in creating week, month and year totals and presenting them in All Websites and Dashboard views?


Is it possible to send me details of piwik (login pwd) to your Piwik?

I’ve had this problem since I started using Piwik a month ago. See “Stats zero out” post further up. Thx, Ian

And to make matters worse, 3 out of 5 of my sites strangely today are showing zero’s for the monthly stats and it’s 1500 hours, but everything else appears normal (I’m using v. 0.8, and have been since it came out).

Sorry Matthieu, nothing personal, but I don’t want to give out credentials for my installation of Piwik.

I did some more digging. Looking further at code I still suspect that for some installations of Piwik, the date/time used in retrieving archive table results for a period (week, month or year) results in a empty results.

There are only three things to consider:

  1. timezone selected by user for website (in Settings)
  2. timestamp from server (in log of visit)
  3. day, week, month, year report grouping selected by user (in Dashboard or All Websites views)

Also, there are really only two issues here:

  1. Period (week, month or year) results will appear at some times of the day and not appear at other times AND
  2. Changing timezone for website can make the period (week, month or year) results appear/not appear, the date/time calc must be resulting in an empty results when calcs of the 3 times above are done. …

Some reasons?:

  • Maybe functions addDay addHour etc result in something like date/time B minus date/time A is = 0 or is negative?

  • Maybe Start date/time is changed due to timezone and local time so that it is after End date/time?

  • Maybe for some reason some date/times are not in correct format after being processed (DATE_TIME_FORMAT = ‘Y-m-d H:i:s’;)?

  • Also, this note in date.php makes me think there is some lack of harmony in date calcs… : )

    // @fixme
    // The following code seems clunky - I thought the DateTime php class would allow to return timestamps
    // after applying the timezone offset. Instead, the underlying timestamp is not changed.
    // I decided to get the date without the timezone information, and create the timestamp from the truncated string.
    // Unit tests pass (@see Date.test.php) but I’m pretty sure this is not the right way to do it

  • Also, the functions compareWeek and compareMonth compare week/month being compared against the current week. Maybe the date calcs result in these not being equal (=0) so it thinks it is not in that week, month or year and doesn’t return results?

Possible culprits:

  • Date.php
    -> $timezone
    -> $timestamp
    -> $dateStartUTC
    -> $dateEndUTC
    -> $utcOffset


  • ArchiveProcessing.php
    -> $strDate

Can anyone help with this issue in this post? Again, I have 5 websites. I’m in the PST time zone. All 5 sites are set to the “America/Los Angeles” zone. At 1700 hours PST every day, my week, month, and year stats zero out (the real-time day stats remain). Thank you.

More pieces of the puzzle

  • I have just noticed my daily stats are out by 14 hours eg Aug 11 stats begin at 1400 hours on Aug 11 to 1400 hours on Aug 12.

  • my server time is UTC -5

  • when i set my website to any value between UTC -5 and UTC +14 the week, month & year totals appear, otherwise they do not show

There are so many date calcs around server time and website UTC time I am struggling to see where the problem lies. The “fixme” note in Piwik Date.php noted above clearly points to challenge dealing with this. Not sure it has to be so complex? php date and time get the server date and time.

We have users with web hosts running in a different timezone.

There are 3 variables:

  1. server date/time
  2. server date/time UTC
  3. website date/time UTC

Record server date/time in visit log then you do following:

  • Calculate UTC difference between server date/time UTC and website date/time UTC.

  • Calculate website date/time by adding/subtracting UTC difference from server date/time

Then use website date/time in dashboard etc.

Anyways, why are we having these issues? Can anyone please advise?

I have a ticket open for this issue. I haven’t had time to investigate this, so I don’t have an explanation. But you can try the following:

In core/ArchiveProcessing.php, change (around line 341):

                            && ($this->startTimestampUTC > time() || 
                                    ($this->startTimestampUTC <= time() && $this->endTimestampUTC > time()))


                            && $this->startTimestampUTC <= time() && $this->endTimestampUTC > time()

And delete your archive_blob / archive_numeric tables. (Assuming you haven’t purged any data from log_visits, Piwik will regenerate the summary tables.)

(The above reverts a recent change to address a different issue.)

Thanks, I tried the mod as shown above but I didn’t notice any difference in behaviour re this issue.

Looking closer, I have to revise statement made earlier

  • I have just noticed my daily stats are out by 14 hours eg Aug 11 stats begin at 1400 hours on Aug 11 to 1400 hours on Aug 12.

should read

I have just noticed my daily stats are out by 7 hours eg Aug 11 daily stats begin Aug 10 at 1700 hours and end Aug 11 at 1700 hours. This means my daily stats for Aug 11 are empty until Aug 11 after 1700 hoiurs (local time). (this corresponds to my website UTC = UTC -7)

Server date appears to be recorded separately from server time (due to shifting of hours by website UTC?)

This may affect week, month and year reporting in following way. After 1700 hours, the date shifts to next day. This may be affecting how the week, month and year reporting create results. They appear to rely on determining if current date is within the period and this may fail if current date is not actual date?

It would be great if you could propose a simple “How to reproduce bug” list of steps, from a new Piwik 0.9 install. We’ll make sure we take a look. The ticket is at:

Sorry, there isn’t anything special to say about my installation of Piwik .9 I have done it three times from scratch. I literally just follow instructions. It installs fine each time. It works fine, with exception of the bug described above by myself and others.

If it is happening to me and a few others, then I can’t help but think it is the same for all users. I am guessing a lot of users aren’t paying close attention to visit date/time or don’t see stats at certain times but aren’t reporting this.

If this is not true, then the only variables that may be different are the reported server time, and my selection in Piwik of default UTC time and the UTC time for the website. I have described these above too as have others.

I still think Piwik’s coding for time related variables is far too complex for what is required (as I described above). Rather than debugging this, why not revisit overall strategy to treatment of time?

There are 3 variables:

  1. server date/time
  2. server date/time UTC
  3. website date/time UTC

Record server date/time in visit log.

Then using code do the following to update the blob time:

  • Calculate UTC difference between server date/time UTC and website date/time UTC.
  • Calculate website date/time by adding/subtracting UTC difference from server date/time

Do this for each website (as they may have different timezones) in a loop. If user changes website timezone then update blob for that site to reflect new timezone based on visit log server date/time stamp.

Then use website blob date/time in dashboard, all websites view etc.

Maybe i am missing something?

For what it’s worth, I also am unable to view weekly/monthly stats. I’m using a brand new Piwik 0.9 installation. As described by others in this thread, everything else in my Piwik installation seems to work fine except for the lack of data generated for week/month/year views. Data for individual days is fine.

I have PHP version 5.2.13.

I am using a brand new installation as well, and my experiences mirror burlysac & rsteins. The daily totals work fine, but weekly, monthly, and yearly are all empty. I don’t mind providing you with my login credentials if you want to take a look Matthiu.

I have a brand new installation and have the same issues as everyone else. Also located in California.